diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/video')
120 files changed, 6569 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/video/aegisub/default.nix b/nixpkgs/pkgs/applications/video/aegisub/default.nix new file mode 100644 index 000000000000..3df616824801 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/aegisub/default.nix @@ -0,0 +1,78 @@ +{ config, stdenv, fetchurl +, libX11, wxGTK +, libiconv, fontconfig, freetype +, libGLU_combined +, libass, fftw, ffms +, ffmpeg, pkgconfig, zlib # Undocumented (?) dependencies +, icu, boost, intltool # New dependencies +, spellcheckSupport ? true, hunspell ? null +, automationSupport ? true, lua ? null +, openalSupport ? false, openal ? null +, alsaSupport ? stdenv.isLinux, alsaLib ? null +, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio ? null +, portaudioSupport ? false, portaudio ? null }: + +assert spellcheckSupport -> (hunspell != null); +assert automationSupport -> (lua != null); +assert openalSupport -> (openal != null); +assert alsaSupport -> (alsaLib != null); +assert pulseaudioSupport -> (libpulseaudio != null); +assert portaudioSupport -> (portaudio != null); + +with stdenv.lib; +stdenv.mkDerivation rec { + name = "aegisub-${version}"; + version = "3.2.2"; + + src = fetchurl { + url = "http://ftp.aegisub.org/pub/releases/${name}.tar.xz"; + sha256 = "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"; + }; + + # Fixup build with icu-59 + postPatch = "sed '1i#include <unicode/unistr.h>' -i src/utils.cpp"; + + buildInputs = with stdenv.lib; + [ pkgconfig intltool libX11 wxGTK fontconfig freetype libGLU_combined + libass fftw ffms ffmpeg zlib icu boost boost.out libiconv + ] + ++ optional spellcheckSupport hunspell + ++ optional automationSupport lua + ++ optional openalSupport openal + ++ optional alsaSupport alsaLib + ++ optional pulseaudioSupport libpulseaudio + ++ optional portaudioSupport portaudio + ; + + enableParallelBuilding = true; + + hardeningDisable = [ "bindnow" "relro" ]; + + # compat with icu61+ https://github.com/unicode-org/icu/blob/release-64-2/icu4c/readme.html#L554 + CXXFLAGS = [ "-DU_USING_ICU_NAMESPACE=1" ]; + + # this is fixed upstream though not yet in an officially released version, + # should be fine remove on next release (if one ever happens) + NIX_LDFLAGS = [ + "-lpthread" + ]; + + postInstall = "ln -s $out/bin/aegisub-* $out/bin/aegisub"; + + meta = { + description = "An advanced subtitle editor"; + longDescription = '' + Aegisub is a free, cross-platform open source tool for creating and + modifying subtitles. Aegisub makes it quick and easy to time subtitles to + audio, and features many powerful tools for styling them, including a + built-in real-time video preview. + ''; + homepage = http://www.aegisub.org/; + license = licenses.bsd3; + # The Aegisub sources are itself BSD/ISC, + # but they are linked against GPL'd softwares + # - so the resulting program will be GPL + maintainers = [ maintainers.AndersonTorres ]; + platforms = [ "i686-linux" "x86_64-linux" ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/avidemux/bootstrap_logging.patch b/nixpkgs/pkgs/applications/video/avidemux/bootstrap_logging.patch new file mode 100644 index 000000000000..8f45251d26c2 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/avidemux/bootstrap_logging.patch @@ -0,0 +1,26 @@ +diff --git a/bootStrap.bash b/bootStrap.bash +index 646a5e048..6429199ba 100644 +--- a/bootStrap.bash ++++ b/bootStrap.bash +@@ -4,6 +4,7 @@ + # + # By default we use qt5 now + # ++set -e # hard fail if something fails + packages_ext="" + rebuild=0 + do_core=1 +@@ -66,10 +67,10 @@ Process() + fi + cd $BUILDDIR + cmake $COMPILER $PKG $FAKEROOT $QT_FLAVOR -DCMAKE_EDIT_COMMAND=vim $INSTALL_PREFIX $EXTRA $BUILD_QUIRKS $ASAN $DEBUG -G "$BUILDER" $SOURCEDIR || fail cmakeZ +- make $PARAL >& /tmp/log$BUILDDIR || fail "make, result in /tmp/log$BUILDDIR" +- if [ "x$PKG" != "x" ] ; then ++ make $PARAL ++ if [ "x$PKG" != "x" ] ; then + $FAKEROOT_COMMAND make package DESTDIR=$FAKEROOT_DIR/tmp || fail package +- fi ++ fi + # we need the make install so that other packcges can be built against this one + make install DESTDIR=$FAKEROOT_DIR + } diff --git a/nixpkgs/pkgs/applications/video/avidemux/default.nix b/nixpkgs/pkgs/applications/video/avidemux/default.nix new file mode 100644 index 000000000000..7912fe60bbc8 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/avidemux/default.nix @@ -0,0 +1,94 @@ +{ stdenv, lib, fetchurl, cmake, pkgconfig +, zlib, gettext, libvdpau, libva, libXv, sqlite +, yasm, freetype, fontconfig, fribidi +, makeWrapper, libXext, libGLU, qttools, qtbase +, alsaLib +, withX265 ? true, x265 +, withX264 ? true, x264 +, withXvid ? true, xvidcore +, withLAME ? true, lame +, withFAAC ? false, faac +, withVorbis ? true, libvorbis +, withPulse ? true, libpulseaudio +, withFAAD ? true, faad2 +, withOpus ? true, libopus +, withVPX ? true, libvpx +, withQT ? true +, withCLI ? true +, default ? "qt5" +, withPlugins ? true +}: + +assert withQT -> qttools != null && qtbase != null; +assert default != "qt5" -> default == "cli"; +assert !withQT -> default != "qt5"; + +stdenv.mkDerivation rec { + name = "avidemux-${version}"; + version = "2.7.3"; + + src = fetchurl { + url = "mirror://sourceforge/avidemux/avidemux/${version}/avidemux_${version}.tar.gz"; + sha256 = "17x2mnnr5h8pp764p55l1xcn2ljnzhbj8cykajlllvk4rc4qwxld"; + }; + + patches = [ + ./dynamic_install_dir.patch + ./bootstrap_logging.patch + ]; + + nativeBuildInputs = [ yasm cmake pkgconfig ]; + buildInputs = [ + zlib gettext libvdpau libva libXv sqlite fribidi fontconfig + freetype alsaLib libXext libGLU makeWrapper + ] ++ lib.optional withX264 x264 + ++ lib.optional withX265 x265 + ++ lib.optional withXvid xvidcore + ++ lib.optional withLAME lame + ++ lib.optional withFAAC faac + ++ lib.optional withVorbis libvorbis + ++ lib.optional withPulse libpulseaudio + ++ lib.optional withFAAD faad2 + ++ lib.optional withOpus libopus + ++ lib.optionals withQT [ qttools qtbase ] + ++ lib.optional withVPX libvpx; + + buildCommand = let + qtVersion = "5.${stdenv.lib.versions.minor qtbase.version}"; + wrapProgram = f: "wrapProgram ${f} --set ADM_ROOT_DIR $out --prefix LD_LIBRARY_PATH : ${libXext}/lib"; + in '' + unpackPhase + cd "$sourceRoot" + patchPhase + + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libXext}/lib" + ${stdenv.shell} bootStrap.bash \ + --with-core \ + ${if withQT then "--with-qt" else "--without-qt"} \ + ${if withCLI then "--with-cli" else "--without-cli"} \ + ${if withPlugins then "--with-plugins" else "--without-plugins"} + + mkdir $out + cp -R install/usr/* $out + + ${wrapProgram "$out/bin/avidemux3_cli"} + + ${stdenv.lib.optionalString withQT '' + ${wrapProgram "$out/bin/avidemux3_qt5"} --prefix QT_PLUGIN_PATH : ${qtbase}/lib/qt-${qtVersion}/plugins + ${wrapProgram "$out/bin/avidemux3_jobs_qt5"} --prefix QT_PLUGIN_PATH : ${qtbase}/lib/qt-${qtVersion}/plugins + ''} + + ln -s "$out/bin/avidemux3_${default}" "$out/bin/avidemux" + + fixupPhase + ''; + + meta = with stdenv.lib; { + homepage = http://fixounet.free.fr/avidemux/; + description = "Free video editor designed for simple video editing tasks"; + maintainers = with maintainers; [ abbradar ma27 ]; + # "CPU not supported" errors on AArch64 + platforms = [ "i686-linux" "x86_64-linux" ]; + license = licenses.gpl2; + }; +} diff --git a/nixpkgs/pkgs/applications/video/avidemux/dynamic_install_dir.patch b/nixpkgs/pkgs/applications/video/avidemux/dynamic_install_dir.patch new file mode 100644 index 000000000000..803cde02ec2e --- /dev/null +++ b/nixpkgs/pkgs/applications/video/avidemux/dynamic_install_dir.patch @@ -0,0 +1,12 @@ +diff -ru3 avidemux_2.6.15-old/avidemux_core/ADM_core/src/ADM_folder_linux.cpp avidemux_2.6.15/avidemux_core/ADM_core/src/ADM_folder_linux.cpp +--- avidemux_2.6.15-old/avidemux_core/ADM_core/src/ADM_folder_linux.cpp 2016-11-23 02:13:41.406566362 +0300 ++++ avidemux_2.6.15/avidemux_core/ADM_core/src/ADM_folder_linux.cpp 2016-11-23 02:14:33.433566147 +0300 +@@ -92,7 +92,7 @@ + + char *ADM_getInstallRelativePath(const char *base1, const char *base2, const char *base3) + { +- return ADM_getRelativePath(ADM_INSTALL_DIR, base1, base2, base3); ++ return ADM_getRelativePath(getenv("ADM_ROOT_DIR"), base1, base2, base3); + } + const std::string ADM_getI8NDir(const std::string &flavor) + { diff --git a/nixpkgs/pkgs/applications/video/avxsynth/default.nix b/nixpkgs/pkgs/applications/video/avxsynth/default.nix new file mode 100644 index 000000000000..a76608bdd900 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/avxsynth/default.nix @@ -0,0 +1,43 @@ +{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig +, cairo, ffmpeg, ffms, libjpeg, log4cpp, pango +, avxeditSupport ? false, qt4 ? null +}: + +let + inherit (stdenv.lib) enableFeature optional; +in + +stdenv.mkDerivation rec { + name = "avxsynth-${version}"; + version = "2015-04-07"; + + src = fetchFromGitHub { + owner = "avxsynth"; + repo = "avxsynth"; + rev = "80dcb7ec8d314bc158130c92803308aa8e5e9242"; + sha256 = "0kckggvgv68b0qjdi7ms8vi97b46dl63n60qr96d2w67lf2nk87z"; + }; + + configureFlags = [ + "--enable-autocrop" + "--enable-framecapture" + "--enable-subtitle" + "--enable-ffms2" + (enableFeature avxeditSupport "avxedit") + "--with-jpeg=${libjpeg.out}/lib" + ]; + + nativeBuildInputs = [ autoreconfHook pkgconfig ]; + + buildInputs = [ cairo ffmpeg ffms libjpeg log4cpp pango ] + ++ optional avxeditSupport qt4; + + meta = with stdenv.lib; { + description = "A script system that allows advanced non-linear editing"; + homepage = https://github.com/avxsynth/avxsynth; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ codyopel ]; + platforms = platforms.linux; + broken = true; # 2018-04-10 + }; +} diff --git a/nixpkgs/pkgs/applications/video/bino3d/default.nix b/nixpkgs/pkgs/applications/video/bino3d/default.nix new file mode 100644 index 000000000000..d98b39796608 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/bino3d/default.nix @@ -0,0 +1,25 @@ +{ stdenv, lib, fetchurl, pkgconfig, ffmpeg, glew, libass, openal, qtbase }: + +stdenv.mkDerivation rec { + name = "bino-${version}"; + version = "1.6.7"; + + src = fetchurl { + url = "https://bino3d.org/releases/${name}.tar.xz"; + sha256 = "04yl7ibnhajlli4a5x77az8jxbzw6b2wjay8aa6px551nmiszn9k"; + }; + + nativeBuildInputs = [ pkgconfig ]; + + buildInputs = [ ffmpeg glew libass openal qtbase ]; + + enableParallelBuilding = true; + + meta = with lib; { + description = "Stereoscopic 3D and multi-display video player"; + homepage = https://bino3d.org/; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ orivej ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/bombono/default.nix b/nixpkgs/pkgs/applications/video/bombono/default.nix new file mode 100644 index 000000000000..4b97db56e978 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/bombono/default.nix @@ -0,0 +1,48 @@ +{ stdenv, fetchFromGitHub, wrapGAppsHook, gtk2, boost, gtkmm2, scons, +mjpegtools, libdvdread, dvdauthor, gettext, dvdplusrwtools, libxmlxx, ffmpeg, +enca, pkgconfig, fetchpatch }: + +let fetchPatchFromAur = {name, sha256}: +fetchpatch { + inherit name sha256; + url = "https://aur.archlinux.org/cgit/aur.git/plain/${name}?h=e6cc6bc80c672aaa1a2260abfe8823da299a192c"; +}; in +stdenv.mkDerivation rec { + name = "bombono-${version}"; + version = "1.2.4"; + src = fetchFromGitHub { + owner = "muravjov"; + repo = "bombono-dvd"; + rev = version; + sha256 = "1lz1vik6abn1i1pvxhm55c9g47nxxv755wb2ijszwswwrwgvq5b9"; + }; + + patches = map fetchPatchFromAur [ + {name="fix_ffmpeg_codecid.patch"; sha256="1asfc0lqzk4gjssrvjmsi1xr53ygnsx2sh7c8yzp5r3j2bagxhp7";} + {name="fix_ptr2bool_cast.patch"; sha256="0iqzrmbg38ikh4x9cmx0v0rnm7a9lcq0kd8sh1z9yfmnz71qqahg";} + {name="fix_c++11_literal_warnings.patch"; sha256="1zbf12i77p0j0090pz5lzg4a7kyahahzqssybv7vi0xikwvw57w9";} + {name="autoptr2uniqueptr.patch"; sha256="0a3wvwfplmqvi8fnj929y85z3h1iq7baaz2d4v08h1q2wbmakqdm";} + {name="fix_deprecated_boost_api.patch"; sha256="184gdz3w95ihhsd8xscpwvq77xd4il47kvmv6wslax77xyw50gm8";} + {name="fix_throw_specifications.patch"; sha256="1f5gi3qwm843hsxvijq7sjy0s62xm7rnr1vdp7f242fi0ldq6c1n";} + {name="fix_operator_ambiguity.patch"; sha256="0r4scsbsqfg6wgzsbfxxpckamvgyrida0n1ypg1klx24pk5dc7n7";} + {name="fix_ffmpeg30.patch"; sha256="1irva7a9bpbzs60ga8ypa3la9y84i5rz20jnd721qmfqp2yip8dw";} + ]; + + nativeBuildInputs = [ wrapGAppsHook scons pkgconfig gettext ]; + + buildInputs = [ + gtk2 gtkmm2 mjpegtools libdvdread dvdauthor boost dvdplusrwtools + libxmlxx ffmpeg enca + ]; + + prefixKey = "PREFIX="; + + enableParallelBuilding = true; + + meta = { + description = "a DVD authoring program for personal computers"; + homepage = "http://www.bombono.org/"; + license = stdenv.lib.licenses.gpl2; + maintainers = with stdenv.lib.maintainers; [ symphorien ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/bomi/default.nix b/nixpkgs/pkgs/applications/video/bomi/default.nix new file mode 100644 index 000000000000..bbac10140344 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/bomi/default.nix @@ -0,0 +1,117 @@ +{ config, stdenv, fetchFromGitHub +, fetchpatch, pkgconfig, perl, python, which +, libX11, libxcb, libGLU_combined +, qtbase, qtdeclarative, qtquickcontrols, qttools, qtx11extras, qmake, makeWrapper +, libchardet +, ffmpeg + +, mpg123 +, libass +, libdvdread +, libdvdnav +, icu +, libquvi +, alsaLib +, libvdpau, libva +, libbluray +, jackSupport ? false, jack ? null +, portaudioSupport ? false, portaudio ? null +, pulseSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio ? null +, cddaSupport ? false, libcdda ? null +, youtubeSupport ? true, youtube-dl ? null +}: + +with stdenv.lib; + +assert jackSupport -> jack != null; +assert portaudioSupport -> portaudio != null; +assert pulseSupport -> libpulseaudio != null; +assert cddaSupport -> libcdda != null; +assert youtubeSupport -> youtube-dl != null; + +stdenv.mkDerivation rec { + name = "bomi-${version}"; + version = "0.9.11"; + + src = fetchFromGitHub { + owner = "xylosper"; + repo = "bomi"; + rev = "v${version}"; + sha256 = "0a7n46gn3n5098lxxvl3s29s8jlkzss6by9074jx94ncn9cayf2h"; + }; + + patches = [ + (fetchpatch rec { + name = "bomi-compilation-fix.patch"; + url = "https://svnweb.mageia.org/packages/cauldron/bomi/current/SOURCES/${name}?revision=995725&view=co&pathrev=995725"; + sha256 = "1dwryya5ljx35dbx6ag9d3rjjazni2mfn3vwirjdijdy6yz22jm6"; + }) + (fetchpatch rec { + name = "bomi-fix-expected-unqualified-id-before-numeric-constant-unix.patch"; + url = "https://svnweb.mageia.org/packages/cauldron/bomi/current/SOURCES/${name}?revision=995725&view=co&pathrev=995725"; + sha256 = "0n3xsrdrggimzw30gxlnrr088ndbdjqlqr46dzmfv8zan79lv5ri"; + }) + ]; + + buildInputs = with stdenv.lib; + [ libX11 + libxcb + libGLU_combined + qtbase + qtx11extras + qtdeclarative + qtquickcontrols + ffmpeg + libchardet + + mpg123 + libass + libdvdread + libdvdnav + icu + libquvi + alsaLib + libvdpau + libva + libbluray + ] + ++ optional jackSupport jack + ++ optional portaudioSupport portaudio + ++ optional pulseSupport libpulseaudio + ++ optional cddaSupport libcdda + ; + + preConfigure = '' + patchShebangs configure + ''; + + preBuild = '' + patchShebangs src/mpv/waf + patchShebangs build-mpv + ''; + + postInstall = '' + wrapProgram $out/bin/bomi \ + ${optionalString youtubeSupport "--prefix PATH ':' '${youtube-dl}/bin'"} + ''; + + dontUseQmakeConfigure = true; + + configureFlags = with stdenv.lib; + [ "--qmake=qmake" ] + ++ optional jackSupport "--enable-jack" + ++ optional portaudioSupport "--enable-portaudio" + ++ optional pulseSupport "--enable-pulseaudio" + ++ optional cddaSupport "--enable-cdda" + ; + + nativeBuildInputs = [ makeWrapper pkgconfig perl python which qttools qmake ]; + + meta = with stdenv.lib; { + description = "Powerful and easy-to-use multimedia player"; + homepage = https://bomi-player.github.io/; + license = licenses.gpl2Plus; + maintainers = [ maintainers.abbradar ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/byzanz/add-amflags.patch b/nixpkgs/pkgs/applications/video/byzanz/add-amflags.patch new file mode 100644 index 000000000000..aeaa195798a4 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/byzanz/add-amflags.patch @@ -0,0 +1,12 @@ +diff --git a/Makefile.am b/Makefile.am +index 6eedb51..7b54313 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,5 +1,7 @@ + SUBDIRS = macros data gifenc src po + ++ACLOCAL_AMFLAGS = -I macros ++ + EXTRA_DIST = \ + MAINTAINERS \ + depcomp \ diff --git a/nixpkgs/pkgs/applications/video/byzanz/default.nix b/nixpkgs/pkgs/applications/video/byzanz/default.nix new file mode 100644 index 000000000000..ea8cb5aa3ffa --- /dev/null +++ b/nixpkgs/pkgs/applications/video/byzanz/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchgit, wrapGAppsHook, which, gnome3, glib, intltool, pkgconfig, libtool, cairo, gtk3, gst_all_1, xorg }: + +stdenv.mkDerivation rec { + version = "0.2.3.alpha"; + name = "byzanz-${version}"; + + src = fetchgit { + url = git://github.com/GNOME/byzanz; + rev = "1875a7f6a3903b83f6b1d666965800f47db9286a"; + sha256 = "0a72fw2mxl8vdcdnzy0bwis4jk28pd7nc8qgr4vhyw5pd48dynvh"; + }; + + patches = [ ./add-amflags.patch ]; + + preBuild = '' + ./autogen.sh --prefix=$out + ''; + + NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ which gnome3.gnome-common glib intltool libtool cairo gtk3 xorg.xwininfo ] + ++ (with gst_all_1; [ gstreamer gst-plugins-base gst-plugins-bad gst-plugins-good gst-plugins-ugly gst-libav wrapGAppsHook ]); + + meta = with stdenv.lib; { + description = "Tool to record a running X desktop to an animation suitable for presentation in a web browser"; + homepage = https://github.com/GNOME/byzanz; + license = licenses.gpl3; + platforms = platforms.linux; + maintainers = [ ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/cinelerra/default.nix b/nixpkgs/pkgs/applications/video/cinelerra/default.nix new file mode 100644 index 000000000000..eb3946b9ed03 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/cinelerra/default.nix @@ -0,0 +1,50 @@ +{ stdenv, fetchgit, autoconf, automake, libtool +, pkgconfig, faad2, faac, a52dec, alsaLib, fftw, lame, libavc1394 +, libiec61883, libraw1394, libsndfile, libvorbis, libogg, libjpeg +, libtiff, freetype, mjpegtools, x264, gettext, openexr +, libXext, libXxf86vm, libXv, libXi, libX11, libXft, xorgproto, libtheora, libpng +, libdv, libuuid, file, nasm, perl +, fontconfig, intltool }: + +stdenv.mkDerivation { + name = "cinelerra-unstable-2016-01-12"; + + src = fetchgit { + url = "git://git.cinelerra-cv.org/j6t/cinelerra.git"; + rev = "454be60e201c18c1fc3f1f253a6d2184fcfc94c4"; + sha256 = "1n4kshqhgnr7aivsi8dgx48phyd2nzvv4szbc82mndklvs9jfb7r"; + }; + + # touch config.rpath: work around bug in automake 1.10 ? + preConfigure = '' + find -type f -print0 | xargs --null sed -e "s@/usr/bin/perl@${perl}/bin/perl@" -i + touch config.rpath + ./autogen.sh + sed -i -e "s@/usr/bin/file@${file}/bin/file@" ./configure + ''; + + buildInputs = + [ automake + autoconf libtool pkgconfig file + faad2 faac + a52dec alsaLib fftw lame libavc1394 libiec61883 + libraw1394 libsndfile libvorbis libogg libjpeg libtiff freetype + mjpegtools x264 gettext openexr + libXext libXxf86vm libXv libXi libX11 libXft xorgproto + libtheora libpng libdv libuuid + nasm + perl + fontconfig intltool + ]; + + # $ make -C cinelerra edl.o + # edl.C:50:25: fatal error: versioninfo.h: No such file or directory + enableParallelBuilding = false; + + meta = { + description = "Video Editor"; + homepage = http://www.cinelerra.org; + maintainers = [ stdenv.lib.maintainers.marcweber ]; + license = stdenv.lib.licenses.gpl2; + }; +} diff --git a/nixpkgs/pkgs/applications/video/clickshare-csc1/default.nix b/nixpkgs/pkgs/applications/video/clickshare-csc1/default.nix new file mode 100644 index 000000000000..34c80e1050b4 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/clickshare-csc1/default.nix @@ -0,0 +1,124 @@ +{ lib +, stdenv +, fetchurl +, alsaLib +, autoPatchelfHook +, binutils-unwrapped +, gnutar +, libav_0_8 +, libnotify +, libresample +, libusb1 +, qt4 +, rpmextract +, unzip +, xorg +, usersGroup ? "clickshare" # for udev access rules +}: + + +# This fetches the latest firmware version that +# contains a linux-compatible client binary. +# Barco no longer supports linux, so updates are unlikely: +# https://www.barco.com/de/support/clickshare-csc-1/knowledge-base/KB1191 + + +stdenv.mkDerivation rec { + name = "clickshare-csc1-${version}"; + version = "01.07.00.033"; + src = fetchurl { + name = "clickshare-csc1-${version}.zip"; + url = https://www.barco.com/services/website/de/TdeFiles/Download?FileNumber=R33050020&TdeType=3&MajorVersion=01&MinorVersion=07&PatchVersion=00&BuildVersion=033; + sha256 = "0h4jqidqvk4xkaky5bizi7ilz4qzl2mh68401j21y3djnzx09br3"; + }; + + nativeBuildInputs = [ + autoPatchelfHook + binutils-unwrapped + gnutar + rpmextract + unzip + ]; + buildInputs = [ + alsaLib + libav_0_8 + libnotify + libresample + libusb1 + qt4 + xorg.libX11 + xorg.libXdamage + xorg.libXfixes + xorg.libXinerama + xorg.libXtst + ]; + sourceRoot = "."; + + # The source consists of nested archives. + # We extract them archive by archive. + # If the filename contains version numbers, + # we use a wildcard and check that there + # is actually only one file matching. + postUnpack = + let + rpmArch = + if stdenv.hostPlatform.isx86_32 then "i386" else + if stdenv.hostPlatform.isx86_64 then "x86_64" else + throw "unsupported system: ${stdenv.hostPlatform.system}"; + in + '' + ls clickshare_baseunit_*.*_all.signed_release.ipk | wc --lines | xargs test 1 = + tar --verbose --extract --one-top-level=dir1 < clickshare_baseunit_*.*_all.signed_release.ipk + mkdir dir2 + ( cd dir2 ; ar xv ../dir1/firmware.ipk ) + tar --verbose --gzip --extract --one-top-level=dir3 --exclude='dev/*' < dir2/data.tar.gz + ls dir3/clickshare/clickshare-*-*.${rpmArch}.rpm | wc --lines | xargs test 1 = + mkdir dir4 + cd dir4 + rpmextract ../dir3/clickshare/clickshare-*-*.${rpmArch}.rpm + ''; + + installPhase = '' + runHook preInstall + mkdir --verbose --parents $out + mv --verbose --target-directory=. usr/* + rmdir --verbose usr + cp --verbose --recursive --target-directory=$out * + runHook postInstall + ''; + + # Default udev rule restricts access to the + # clickshare USB dongle to the `wheel` group. + # We replace it with the group + # stated in the package arguments. + # Also, we patch executable and icon paths in .desktop files. + preFixup = '' + substituteInPlace \ + $out/lib/udev/rules.d/99-clickshare.rules \ + --replace wheel ${usersGroup} + substituteInPlace \ + $out/share/applications/clickshare.desktop \ + --replace Exec= Exec=$out/bin/ \ + --replace =/usr =$out + substituteInPlace \ + $out/etc/xdg/autostart/clickshare-launcher.desktop \ + --replace =/usr =$out + ''; + + meta = { + homepage = https://www.barco.com/de/support/clickshare-csc-1/drivers; + downloadPage = https://www.barco.com/de/Support/software/R33050020; + platforms = [ "i686-linux" "x86_64-linux" ]; + license = lib.licenses.unfree; + maintainers = [ lib.maintainers.yarny ]; + description = "Linux driver/client for Barco ClickShare CSC-1"; + longDescription = '' + Barco ClickShare is a wireless presentation system + where a USB dongle transmits to a base station + that is connected with a beamer. + The USB dongle requires proprietary software that + captures the screen and sends it to the dongle. + This package provides the necessary software for Linux. + ''; + }; +} diff --git a/nixpkgs/pkgs/applications/video/clipgrab/default.nix b/nixpkgs/pkgs/applications/video/clipgrab/default.nix new file mode 100644 index 000000000000..9b29e18d0bc4 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/clipgrab/default.nix @@ -0,0 +1,56 @@ +{ stdenv, fetchurl, makeDesktopItem, ffmpeg +, qmake, qttools +, qtbase, qtdeclarative, qtlocation, qtquickcontrols2, qtwebchannel, qtwebengine +}: + +stdenv.mkDerivation rec { + name = "clipgrab-${version}"; + version = "3.8.3"; + + src = fetchurl { + sha256 = "1v8vvlqgjqy3gyzwaz9iq0m4fwlkimy5gzg6z3bqwp61p9zzw0zf"; + # The .tar.bz2 "Download" link is a binary blob, the source is the .tar.gz! + url = "https://download.clipgrab.org/${name}.tar.gz"; + }; + + buildInputs = [ ffmpeg qtbase qtdeclarative qtlocation qtquickcontrols2 qtwebchannel qtwebengine ]; + nativeBuildInputs = [ qmake qttools ]; + + postPatch = stdenv.lib.optionalString (ffmpeg != null) '' + substituteInPlace converter_ffmpeg.cpp \ + --replace '"ffmpeg"' '"${ffmpeg.bin}/bin/ffmpeg"' \ + --replace '"ffmpeg ' '"${ffmpeg.bin}/bin/ffmpeg ' + ''; + + qmakeFlags = [ "clipgrab.pro" ]; + + enableParallelBuilding = true; + + desktopItem = makeDesktopItem rec { + name = "clipgrab"; + exec = name; + icon = name; + desktopName = "ClipGrab"; + comment = meta.description; + genericName = "Web video downloader"; + categories = "Qt;AudioVideo;Audio;Video"; + }; + + installPhase = '' + install -Dm755 clipgrab $out/bin/clipgrab + install -Dm644 icon.png $out/share/pixmaps/clipgrab.png + cp -r ${desktopItem}/share/applications $out/share + ''; + + meta = with stdenv.lib; { + description = "Video downloader for YouTube and other sites"; + longDescription = '' + ClipGrab is a free downloader and converter for YouTube, Vimeo, Metacafe, + Dailymotion and many other online video sites. It converts downloaded + videos to MPEG4, MP3 or other formats in just one easy step. + ''; + homepage = https://clipgrab.org/; + license = licenses.gpl3Plus; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/coriander/default.nix b/nixpkgs/pkgs/applications/video/coriander/default.nix new file mode 100644 index 000000000000..10a8f4019fca --- /dev/null +++ b/nixpkgs/pkgs/applications/video/coriander/default.nix @@ -0,0 +1,26 @@ +{stdenv, fetchurl, pkgconfig, glib, gtk2, libgnomeui, libXv, libraw1394, libdc1394 +, SDL, automake, GConf }: + +stdenv.mkDerivation rec { + name = "coriander-2.0.1"; + + src = fetchurl { + url = "http://damien.douxchamps.net/ieee1394/coriander/archives/coriander-2.0.1.tar.gz"; + sha256 = "0l6hpfgy5r4yardilmdrggsnn1fbfww516sk5a90g1740cd435x5"; + }; + + preConfigure = '' + cp ${automake}/share/automake-*/mkinstalldirs . + ''; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ glib gtk2 libgnomeui libXv libraw1394 libdc1394 SDL GConf ]; + + meta = { + homepage = https://damien.douxchamps.net/ieee1394/coriander/; + description = "GUI for controlling a Digital Camera through the IEEE1394 bus"; + license = stdenv.lib.licenses.gpl3Plus; + maintainers = with stdenv.lib.maintainers; [viric]; + platforms = with stdenv.lib.platforms; linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/devede/default.nix b/nixpkgs/pkgs/applications/video/devede/default.nix new file mode 100644 index 000000000000..4802d259fb23 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/devede/default.nix @@ -0,0 +1,53 @@ +{ stdenv, fetchFromGitHub, python3Packages, ffmpeg, mplayer, vcdimager, cdrkit, dvdauthor +, gtk3, gettext, wrapGAppsHook, gdk_pixbuf, gobject-introspection }: + +let + inherit (python3Packages) dbus-python buildPythonApplication pygobject3 urllib3; + +in buildPythonApplication rec { + name = "devede-4.8.8"; + namePrefix = ""; + + src = fetchFromGitHub { + owner = "rastersoft"; + repo = "devedeng"; + rev = "c518683fbcd793aa92249e4fecafc3c3fea7da68"; + sha256 = "0ncb8nykchrjlllbzfjpvirmfvfaps9qhilc56kvcw3nzqrnkx8q"; + }; + + # Temporary fix + # See https://github.com/NixOS/nixpkgs/issues/61578 + # and https://github.com/NixOS/nixpkgs/issues/56943 + strictDeps = false; + + nativeBuildInputs = [ + gettext wrapGAppsHook + + # Temporary fix + # See https://github.com/NixOS/nixpkgs/issues/61578 + # and https://github.com/NixOS/nixpkgs/issues/56943 + gobject-introspection + ]; + + buildInputs = [ + ffmpeg + ]; + + propagatedBuildInputs = [ + gtk3 pygobject3 gdk_pixbuf dbus-python ffmpeg mplayer dvdauthor vcdimager cdrkit urllib3 + ]; + + postPatch = '' + substituteInPlace setup.py --replace "'/usr'," "" + substituteInPlace src/devedeng/configuration_data.py \ + --replace "/usr/share" "$out/share" \ + --replace "/usr/local/share" "$out/share" + ''; + + meta = with stdenv.lib; { + description = "DVD Creator for Linux"; + homepage = http://www.rastersoft.com/programas/devede.html; + license = licenses.gpl3; + maintainers = [ maintainers.bdimcheff ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/dvb-apps/default.nix b/nixpkgs/pkgs/applications/video/dvb-apps/default.nix new file mode 100644 index 000000000000..a032ef654aa3 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/dvb-apps/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchurl, perl }: + +stdenv.mkDerivation { + name = "dvb-apps-7f68f9c8d311"; + + src = fetchurl { + url = "https://linuxtv.org/hg/dvb-apps/archive/7f68f9c8d311.tar.gz"; + sha256 = "0a6c5jjq6ad98bj0r954l3n7zjb2syw9m19jksg06z4zg1z8yg82"; + }; + + buildInputs = [ perl ]; + + dontConfigure = true; # skip configure + + installPhase = "make prefix=$out install"; + + meta = { + description = "Linux DVB API applications and utilities"; + homepage = https://linuxtv.org/; + platforms = stdenv.lib.platforms.linux; + license = stdenv.lib.licenses.gpl2; + broken = true; # 2018-04-10 + }; +} diff --git a/nixpkgs/pkgs/applications/video/dvd-slideshow/default.nix b/nixpkgs/pkgs/applications/video/dvd-slideshow/default.nix new file mode 100644 index 000000000000..344c47eb934a --- /dev/null +++ b/nixpkgs/pkgs/applications/video/dvd-slideshow/default.nix @@ -0,0 +1,72 @@ +{ stdenv, lib, fetchurl, writeScript, cdrtools, dvdauthor, ffmpeg, imagemagick, lame, mjpegtools, sox, transcode, vorbis-tools, runtimeShell }: + +let + binPath = lib.makeBinPath [ cdrtools dvdauthor ffmpeg imagemagick lame mjpegtools sox transcode vorbis-tools ]; + + wrapper = writeScript "dvd-slideshow.sh" '' + #!${runtimeShell} + # wrapper script for dvd-slideshow programs + export PATH=${binPath}:$PATH + + dir=`dirname "$0"` + exe=`basename "$0"` + case "$exe" in + dvd-slideshow) + # use mpeg2enc by default as ffmpeg is known to crash. + # run dvd-slideshow.ffmpeg to force ffmpeg. + "$dir/dvd-slideshow.real" -mpeg2enc $@ + ;; + + dvd-slideshow.ffmpeg) + "$dir/dvd-slideshow.real" $@ + ;; + + *) + "$dir/$exe.real" $@ + ;; + esac + ''; + +in stdenv.mkDerivation rec { + name = "dvd-slideshow-${version}"; + version = "0.8.4-2"; + + src = fetchurl { + url = "mirror://sourceforge/dvd-slideshow/files/${name}.tar.gz"; + sha256 = "17c09aqvippiji2sd0pcxjg3nb1mnh9k5nia4gn5lhcvngjcp1q5"; + }; + + patchPhase = '' + # fix upstream typos + substituteInPlace dvd-slideshow \ + --replace "version='0.8.4-1'" "version='0.8.4-2'" \ + --replace "mymyecho" "myecho" + ''; + + installPhase = '' + mkdir -p "$out/bin" + cp dvd-slideshow "$out/bin/dvd-slideshow.real" + cp dvd-menu "$out/bin/dvd-menu.real" + cp dir2slideshow "$out/bin/dir2slideshow.real" + cp gallery1-to-slideshow "$out/bin/gallery1-to-slideshow.real" + cp jigl2slideshow "$out/bin/jigl2slideshow.real" + + cp ${wrapper} "$out/bin/dvd-slideshow.sh" + ln -s dvd-slideshow.sh "$out/bin/dvd-slideshow" + ln -s dvd-slideshow.sh "$out/bin/dvd-slideshow.ffmpeg" + ln -s dvd-slideshow.sh "$out/bin/dvd-menu" + ln -s dvd-slideshow.sh "$out/bin/dir2slideshow" + ln -s dvd-slideshow.sh "$out/bin/gallery1-to-slideshow" + ln -s dvd-slideshow.sh "$out/bin/jigl2slideshow" + + cp -a man "$out/" + ''; + + meta = { + description = "Suite of command line programs that creates a slideshow-style video from groups of pictures"; + homepage = http://dvd-slideshow.sourceforge.net/wiki/Main_Page; + license = stdenv.lib.licenses.gpl2; + platforms = stdenv.lib.platforms.linux; + maintainers = [ stdenv.lib.maintainers.robbinch ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/dvdauthor/default.nix b/nixpkgs/pkgs/applications/video/dvdauthor/default.nix new file mode 100644 index 000000000000..c15a892e6981 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/dvdauthor/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchurl, imagemagick, libdvdread, libxml2, freetype, fribidi, libpng, zlib, pkgconfig +, flex, bison }: + +stdenv.mkDerivation rec{ + name = "dvdauthor-0.7.1"; + + src = fetchurl { + url = "mirror://sourceforge/dvdauthor/${name}.tar.gz"; + sha256 = "1s8zqlim0s3hk5sbdsilip3qqh0yv05l1jwx49d9rsy614dv27sh"; + }; + + buildInputs = [ libpng freetype libdvdread libxml2 zlib fribidi imagemagick flex bison]; + nativeBuildInputs = [ pkgconfig ]; + + patches = [ + ./dvdauthor-0.7.1-automake-1.13.patch + ./dvdauthor-0.7.1-mga-strndup.patch + ./dvdauthor-imagemagick-0.7.0.patch + ]; + + meta = with stdenv.lib; { + description = "Tools for generating DVD files to be played on standalone DVD players"; + homepage = http://dvdauthor.sourceforge.net/; + license = licenses.gpl2; + platforms = platforms.linux ++ platforms.darwin; + }; +} diff --git a/nixpkgs/pkgs/applications/video/dvdauthor/dvdauthor-0.7.1-automake-1.13.patch b/nixpkgs/pkgs/applications/video/dvdauthor/dvdauthor-0.7.1-automake-1.13.patch new file mode 100644 index 000000000000..786f0c968556 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/dvdauthor/dvdauthor-0.7.1-automake-1.13.patch @@ -0,0 +1,10 @@ +--- dvdauthor/configure.ac~ 2013-01-04 08:27:40.713197029 +0800 ++++ dvdauthor/configure.ac 2013-01-04 08:27:53.273525273 +0800 +@@ -1,6 +1,6 @@ + AC_INIT(DVDAuthor,0.7.1,dvdauthor-users@lists.sourceforge.net) + +-AM_CONFIG_HEADER(src/config.h) ++AC_CONFIG_HEADERS(src/config.h) + AC_CONFIG_AUX_DIR(autotools) + + AM_INIT_AUTOMAKE diff --git a/nixpkgs/pkgs/applications/video/dvdauthor/dvdauthor-0.7.1-mga-strndup.patch b/nixpkgs/pkgs/applications/video/dvdauthor/dvdauthor-0.7.1-mga-strndup.patch new file mode 100644 index 000000000000..5f77a68081a4 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/dvdauthor/dvdauthor-0.7.1-mga-strndup.patch @@ -0,0 +1,24 @@ +Index: dvdauthor/src/dvdvml.l +=================================================================== +--- dvdauthor/src/dvdvml.l ++++ dvdauthor/src/dvdvml.l 2014-09-14 19:36:05.098847465 +0000 +@@ -19,6 +19,7 @@ + * USA + */ + ++#include "config.h" + #include "compat.h" /* needed for bool */ + #include "dvdvm.h" + #include "dvdvmy.h" +Index: dvdauthor/src/dvdvmy.y +=================================================================== +--- dvdauthor/src/dvdvmy.y ++++ dvdauthor/src/dvdvmy.y 2014-09-14 19:36:28.251618378 +0000 +@@ -19,6 +19,7 @@ + * USA + */ + ++#include "config.h" + #include "compat.h" /* needed for bool */ + #include "dvdvm.h" + diff --git a/nixpkgs/pkgs/applications/video/dvdauthor/dvdauthor-imagemagick-0.7.0.patch b/nixpkgs/pkgs/applications/video/dvdauthor/dvdauthor-imagemagick-0.7.0.patch new file mode 100644 index 000000000000..52b6cc44cd59 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/dvdauthor/dvdauthor-imagemagick-0.7.0.patch @@ -0,0 +1,11 @@ +--- dvdauthor/configure.ac.orig 2010-10-23 04:26:49.000000000 +0200 ++++ dvdauthor/configure.ac 2010-10-24 14:37:45.489064778 +0200 +@@ -31,7 +31,7 @@ + + usemagick=0 + +-AC_CHECK_PROGS(MAGICKCONFIG, [Magick-config]) ++AC_CHECK_PROGS(MAGICKCONFIG, [MagickCore-config]) + if test -n "$MAGICKCONFIG"; then + ac_save_CPPFLAGS="$CPPFLAGS" + ac_save_LIBS="$LIBS" diff --git a/nixpkgs/pkgs/applications/video/dvdbackup/default.nix b/nixpkgs/pkgs/applications/video/dvdbackup/default.nix new file mode 100644 index 000000000000..4712dfac7573 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/dvdbackup/default.nix @@ -0,0 +1,21 @@ +{ stdenv, fetchurl, libdvdread, libdvdcss, dvdauthor }: + +stdenv.mkDerivation rec { + version = "0.4.2"; + name = "dvdbackup-${version}"; + + src = fetchurl { + url = "mirror://sourceforge/dvdbackup/${name}.tar.xz"; + sha256 = "1rl3h7waqja8blmbpmwy01q9fgr5r0c32b8dy3pbf59bp3xmd37g"; + }; + + buildInputs = [ libdvdread libdvdcss dvdauthor ]; + + meta = { + description = "A tool to rip video DVDs from the command line"; + homepage = http://dvdbackup.sourceforge.net/; + license = stdenv.lib.licenses.gpl3Plus; + maintainers = [ stdenv.lib.maintainers.bradediger ]; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/dvdstyler/default.nix b/nixpkgs/pkgs/applications/video/dvdstyler/default.nix new file mode 100644 index 000000000000..f73c5277d054 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/dvdstyler/default.nix @@ -0,0 +1,85 @@ +{ stdenv, fetchurl, pkgconfig +, flex, bison, gettext +, xineUI, wxSVG +, fontconfig +, xmlto, docbook5, zip +, cdrtools, dvdauthor, dvdplusrwtools +, dvdisasterSupport ? true, dvdisaster ? null +, thumbnailSupport ? true, libgnomeui ? null +, udevSupport ? true, udev ? null +, dbusSupport ? true, dbus ? null +, makeWrapper }: + +with stdenv.lib; +stdenv.mkDerivation rec { + + name = "dvdstyler-${version}"; + srcName = "DVDStyler-${version}"; + version = "3.0.4"; + + src = fetchurl { + url = "mirror://sourceforge/project/dvdstyler/dvdstyler/${version}/${srcName}.tar.bz2"; + sha256 = "0lwc0hn94m9r8fi07sjqz3fr618l6lnw3zsakxw7nlgnxbjsk7pi"; + }; + + nativeBuildInputs = + [ pkgconfig ]; + + packagesToBinPath = + [ cdrtools dvdauthor dvdplusrwtools ]; + + buildInputs = + [ flex bison gettext xineUI + wxSVG fontconfig xmlto + docbook5 zip makeWrapper ] + ++ packagesToBinPath + ++ optionals dvdisasterSupport [ dvdisaster ] + ++ optionals udevSupport [ udev ] + ++ optionals dbusSupport [ dbus ] + ++ optionals thumbnailSupport [ libgnomeui ]; + + binPath = makeBinPath packagesToBinPath; + + postInstall = '' + wrapProgram $out/bin/dvdstyler \ + --prefix PATH ":" "${binPath}" + ''; + + meta = with stdenv.lib; { + description = "A DVD authoring software"; + longDescription = '' + DVDStyler is a cross-platform free DVD authoring application for the + creation of professional-looking DVDs. It allows not only burning of video + files on DVD that can be played practically on any standalone DVD player, + but also creation of individually designed DVD menus. It is Open Source + Software and is completely free. + + Some of its features include: + - create and burn DVD video with interactive menus + - design your own DVD menu or select one from the list of ready to use menu + templates + - create photo slideshow + - add multiple subtitle and audio tracks + - support of AVI, MOV, MP4, MPEG, OGG, WMV and other file formats + - support of MPEG-2, MPEG-4, DivX, Xvid, MP2, MP3, AC-3 and other audio and + video formats + - support of multi-core processor + - use MPEG and VOB files without reencoding + - put files with different audio/video format on one DVD (support of + titleset) + - user-friendly interface with support of drag & drop + - flexible menu creation on the basis of scalable vector graphic + - import of image file for background + - place buttons, text, images and other graphic objects anywhere on the menu + screen + - change the font/color and other parameters of buttons and graphic objects + - scale any button or graphic object + - copy any menu object or whole menu + - customize navigation using DVD scripting + ''; + homepage = http://www.dvdstyler.org/; + license = with licenses; gpl2; + maintainers = with maintainers; [ AndersonTorres ]; + platforms = with platforms; linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/gnome-mplayer/default.nix b/nixpkgs/pkgs/applications/video/gnome-mplayer/default.nix new file mode 100644 index 000000000000..fd8cc8d86306 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/gnome-mplayer/default.nix @@ -0,0 +1,33 @@ +{stdenv, substituteAll, fetchFromGitHub, pkgconfig, gettext, glib, gtk3, gmtk, dbus, dbus-glib +, libnotify, libpulseaudio, mplayer, wrapGAppsHook }: + +stdenv.mkDerivation rec { + name = "gnome-mplayer-${version}"; + version = "1.0.9"; + + src = fetchFromGitHub { + owner = "kdekorte"; + repo = "gnome-mplayer"; + rev = "v${version}"; + sha256 = "0qvy9fllvg1mad6y1j79iaqa6khs0q2cb0z62yfg4srbr07fi8xr"; + }; + + nativeBuildInputs = [ pkgconfig gettext wrapGAppsHook ]; + buildInputs = [ glib gtk3 gmtk dbus dbus-glib libnotify libpulseaudio ]; + + patches = [ + (substituteAll { + src = ./fix-paths.patch; + mencoder = "${mplayer}/bin/mencoder"; + mplayer = "${mplayer}/bin/mplayer"; + }) + ]; + + meta = with stdenv.lib; { + description = "Gnome MPlayer, a simple GUI for MPlayer"; + homepage = https://sites.google.com/site/kdekorte2/gnomemplayer; + license = licenses.gpl2; + maintainers = with maintainers; []; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/gnome-mplayer/fix-paths.patch b/nixpkgs/pkgs/applications/video/gnome-mplayer/fix-paths.patch new file mode 100644 index 000000000000..ede4991c4662 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/gnome-mplayer/fix-paths.patch @@ -0,0 +1,87 @@ +--- a/src/gui.c ++++ b/src/gui.c +@@ -7470,7 +7470,7 @@ + filename = g_strdup_printf("%s/00000001.jpg", dirname); + g_free(basepath); + // run mplayer and try to get the first frame and convert it to a jpeg +- av[ac++] = g_strdup_printf("mplayer"); ++ av[ac++] = g_strdup_printf("@mplayer@"); + av[ac++] = g_strdup_printf("-vo"); + av[ac++] = g_strdup_printf("jpeg:outdir=%s", dirname); + av[ac++] = g_strdup_printf("-ao"); +--- a/src/property_page_common.c ++++ b/src/property_page_common.c +@@ -80,7 +80,7 @@ + MetaData *ret; + ret = g_new0(MetaData, 1); + +- av[ac++] = g_strdup_printf("mplayer"); ++ av[ac++] = g_strdup_printf("@mplayer@"); + av[ac++] = g_strdup_printf("-vo"); + av[ac++] = g_strdup_printf("null"); + av[ac++] = g_strdup_printf("-ao"); +--- a/src/support.c ++++ b/src/support.c +@@ -566,7 +566,7 @@ + } else { + playlist = FALSE; + if (mplayer_bin == NULL || !g_file_test(mplayer_bin, G_FILE_TEST_EXISTS)) { +- av[ac++] = g_strdup_printf("mplayer"); ++ av[ac++] = g_strdup_printf("@mplayer@"); + } else { + av[ac++] = g_strdup_printf("%s", mplayer_bin); + } +@@ -728,7 +728,7 @@ + playlist = FALSE; + // run mplayer and try to get the first frame and convert it to a jpeg + if (mplayer_bin == NULL || !g_file_test(mplayer_bin, G_FILE_TEST_EXISTS)) { +- av[ac++] = g_strdup_printf("mplayer"); ++ av[ac++] = g_strdup_printf("@mplayer@"); + } else { + av[ac++] = g_strdup_printf("%s", mplayer_bin); + } +@@ -825,7 +825,7 @@ + playlist = FALSE; + + if (mplayer_bin == NULL || !g_file_test(mplayer_bin, G_FILE_TEST_EXISTS)) { +- av[ac++] = g_strdup_printf("mplayer"); ++ av[ac++] = g_strdup_printf("@mplayer@"); + } else { + av[ac++] = g_strdup_printf("%s", mplayer_bin); + } +@@ -1251,7 +1251,7 @@ + gm_log(verbose, G_LOG_LEVEL_INFO, "getting file metadata for %s", name); + + if (mplayer_bin == NULL || !g_file_test(mplayer_bin, G_FILE_TEST_EXISTS)) { +- av[ac++] = g_strdup_printf("mplayer"); ++ av[ac++] = g_strdup_printf("@mplayer@"); + } else { + av[ac++] = g_strdup_printf("%s", mplayer_bin); + } +@@ -1532,7 +1532,7 @@ + return 0; + + if (mplayer_bin == NULL || !g_file_test(mplayer_bin, G_FILE_TEST_EXISTS)) { +- av[ac++] = g_strdup_printf("mplayer"); ++ av[ac++] = g_strdup_printf("@mplayer@"); + } else { + av[ac++] = g_strdup_printf("%s", mplayer_bin); + } +@@ -1597,7 +1597,7 @@ + + if (control_id == 0) { + ac = 0; +- av[ac++] = g_strdup_printf("mencoder"); ++ av[ac++] = g_strdup_printf("@mencoder@"); + av[ac++] = g_strdup_printf("-ovc"); + av[ac++] = g_strdup_printf("copy"); + av[ac++] = g_strdup_printf("-oac"); +@@ -2830,7 +2830,7 @@ + gboolean ret = TRUE; + + if (mplayer_bin == NULL || !g_file_test(mplayer_bin, G_FILE_TEST_EXISTS)) { +- av[ac++] = g_strdup_printf("mplayer"); ++ av[ac++] = g_strdup_printf("@mplayer@"); + } else { + av[ac++] = g_strdup_printf("%s", mplayer_bin); + } diff --git a/nixpkgs/pkgs/applications/video/gnome-mpv/default.nix b/nixpkgs/pkgs/applications/video/gnome-mpv/default.nix new file mode 100644 index 000000000000..a04eebfcc407 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/gnome-mpv/default.nix @@ -0,0 +1,48 @@ +{ stdenv, fetchFromGitHub, fetchpatch, meson, ninja, python3 +, gettext, pkgconfig, desktop-file-utils, wrapGAppsHook +, appstream-glib, epoxy, glib, gtk3, mpv +}: + +stdenv.mkDerivation rec { + pname = "gnome-mpv"; + version = "0.16"; + + src = fetchFromGitHub { + owner = "celluloid-player"; + repo = "celluloid"; + rev = "v${version}"; + sha256 = "1fj5mr1dwd07jpnigk7z85xdm6yaf7spbvf60aj3mz12m05b1b2w"; + }; + + nativeBuildInputs = [ meson ninja python3 appstream-glib gettext pkgconfig desktop-file-utils wrapGAppsHook ]; + buildInputs = [ epoxy glib gtk3 mpv ]; + + patches = [ + # fix appstream validation in sandbox + # https://github.com/celluloid-player/celluloid/pull/437 + (fetchpatch { + url = https://github.com/celluloid-player/celluloid/commit/5a0b2e892bb715278d309c859a7e521d64433d85.patch; + sha256 = "0naci8lr6128yilal39h46yvq9x3la7g7fhvr5xlwyh30iqrbm3i"; + }) + ]; + + postPatch = '' + patchShebangs meson_post_install.py + patchShebangs src/generate_authors.py + sed -i '/gtk-update-icon-cache/s/^/#/' meson_post_install.py + ''; + + doCheck = true; + + meta = with stdenv.lib; { + description = "Simple GTK+ frontend for the mpv video player"; + longDescription = '' + GNOME MPV interacts with mpv via the client API exported by libmpv, + allowing access to mpv's powerful playback capabilities through an + easy-to-use user interface. + ''; + homepage = "https://github.com/celluloid-player/celluloid"; + license = licenses.gpl3Plus; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/gnomecast/default.nix b/nixpkgs/pkgs/applications/video/gnomecast/default.nix new file mode 100644 index 000000000000..d840f43163cf --- /dev/null +++ b/nixpkgs/pkgs/applications/video/gnomecast/default.nix @@ -0,0 +1,28 @@ +{ lib, python3Packages, gtk3, gobject-introspection, ffmpeg, wrapGAppsHook }: + +with python3Packages; +buildPythonApplication rec { + pname = "gnomecast"; + version = "1.4.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "0mn03gqbwmhch0055bzgdwkzsl304qdyqwrgyiq0k5c5d2gyala5"; + }; + + nativeBuildInputs = [ wrapGAppsHook ]; + propagatedBuildInputs = [ + PyChromecast bottle pycaption paste html5lib pygobject3 dbus-python + gtk3 gobject-introspection + ]; + + preFixup = '' + gappsWrapperArgs+=(--prefix PATH : ${lib.makeBinPath [ ffmpeg ]}) + ''; + + meta = with lib; { + description = "A native Linux GUI for Chromecasting local files"; + homepage = https://github.com/keredson/gnomecast; + license = with licenses; [ gpl3 ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/gpac/default.nix b/nixpkgs/pkgs/applications/video/gpac/default.nix new file mode 100644 index 000000000000..7a8b66d2d28e --- /dev/null +++ b/nixpkgs/pkgs/applications/video/gpac/default.nix @@ -0,0 +1,41 @@ +{ stdenv, fetchFromGitHub, pkgconfig, zlib }: + +stdenv.mkDerivation rec { + version = "0.7.1"; + name = "gpac-${version}"; + + src = fetchFromGitHub { + owner = "gpac"; + repo = "gpac"; + rev = "v${version}"; + sha256 = "197c5968p5bzvk0ga347fwgkqh4j1v3z65wlx65c5m9gwfxz2k2q"; + }; + + # this is the bare minimum configuration, as I'm only interested in MP4Box + # For most other functionality, this should probably be extended + nativeBuildInputs = [ pkgconfig ]; + + buildInputs = [ zlib ]; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + description = "Open Source multimedia framework for research and academic purposes"; + longDescription = '' + GPAC is an Open Source multimedia framework for research and academic purposes. + The project covers different aspects of multimedia, with a focus on presentation + technologies (graphics, animation and interactivity) and on multimedia packaging + formats such as MP4. + + GPAC provides three sets of tools based on a core library called libgpac: + + A multimedia player, called Osmo4 / MP4Client, + A multimedia packager, called MP4Box, + And some server tools included in MP4Box and MP42TS applications. + ''; + homepage = https://gpac.wp.imt.fr; + license = licenses.lgpl21; + maintainers = with maintainers; [ bluescreen303 mgdelacroix ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/handbrake/default.nix b/nixpkgs/pkgs/applications/video/handbrake/default.nix new file mode 100644 index 000000000000..aa2407134f38 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/handbrake/default.nix @@ -0,0 +1,106 @@ +# Upstream distributes HandBrake with bundle of according versions of libraries and patches to them. +# +# Derivation patches HandBrake to use Nix closure dependencies. +# + +{ stdenv, lib, fetchurl, + # Main build tools + python2, pkgconfig, autoconf, automake, cmake, nasm, libtool, m4, + # Processing, video codecs, containers + ffmpeg-full, nv-codec-headers, libogg, x264, x265, libvpx, libtheora, + # Codecs, audio + libopus, lame, libvorbis, a52dec, speex, libsamplerate, + # Text processing + libiconv, fribidi, fontconfig, freetype, libass, jansson, libxml2, harfbuzz, + # Optical media + libdvdread, libdvdnav, libdvdcss, libbluray, + useGtk ? true, wrapGAppsHook ? null, + intltool ? null, + glib ? null, + gtk3 ? null, + libappindicator-gtk3 ? null, + libnotify ? null, + gst_all_1 ? null, + dbus-glib ? null, + udev ? null, + libgudev ? null, + hicolor-icon-theme ? null, + useFdk ? false, fdk_aac ? null +}: + +stdenv.mkDerivation rec { + pname = "handbrake"; + version = "1.2.2"; + + src = fetchurl { + url = ''https://download2.handbrake.fr/${version}/HandBrake-${version}-source.tar.bz2''; + sha256 = "0k2yaqy7zi06k8mkp9az2mn9dlgj3a1339vacakfh2nn2zsics6z"; + }; + + nativeBuildInputs = [ + python2 pkgconfig autoconf automake cmake nasm libtool m4 + ] ++ lib.optionals useGtk [ intltool wrapGAppsHook ]; + + buildInputs = [ + ffmpeg-full libogg libtheora x264 x265 libvpx + libopus lame libvorbis a52dec speex libsamplerate + libiconv fribidi fontconfig freetype libass jansson libxml2 harfbuzz + libdvdread libdvdnav libdvdcss libbluray + ] ++ lib.optionals useGtk [ + glib gtk3 libappindicator-gtk3 libnotify + gst_all_1.gstreamer gst_all_1.gst-plugins-base dbus-glib udev + libgudev hicolor-icon-theme + ] ++ lib.optional useFdk fdk_aac + # NOTE: 2018-12-27: Handbrake supports nv-codec-headers for Linux only, + # look at ./make/configure.py search "enable_nvenc" + ++ lib.optional stdenv.isLinux nv-codec-headers; + + # NOTE: 2018-12-25: v1.2.0 now requires cmake dep + # (default distribution bundles&builds 3rd party libs), + # don't trigger cmake build + dontUseCmakeConfigure = true; + enableParallelBuilding = true; + + preConfigure = '' + patchShebangs scripts + + substituteInPlace libhb/module.defs \ + --replace /usr/include/libxml2 ${libxml2.dev}/include/libxml2 + + # Force using nixpkgs dependencies + sed -i '/MODULES += contrib/d' make/include/main.defs + sed -i '/PKG_CONFIG_PATH=/d' gtk/module.rules + ''; + + configureFlags = [ + "--disable-df-fetch" + "--disable-df-verify" + (if useGtk then "--disable-gtk-update-checks" else "--disable-gtk") + (if useFdk then "--enable-fdk-aac" else "") + ]; + + # NOTE: 2018-12-27: Check NixOS HandBrake test if changing + NIX_LDFLAGS = [ + "-lx265" + ]; + + preBuild = '' + cd build + ''; + + meta = with stdenv.lib; { + homepage = http://handbrake.fr/; + description = "A tool for converting video files and ripping DVDs"; + longDescription = '' + Tool for converting and remuxing video files + into selection of modern and widely supported codecs + and containers. Very versatile and customizable. + Package provides: + CLI - `HandbrakeCLI` + GTK+ GUI - `ghb` + ''; + license = licenses.gpl2; + maintainers = with maintainers; [ Anton-Latukha wmertens ]; + platforms = with platforms; unix; + }; +} diff --git a/nixpkgs/pkgs/applications/video/k9copy/default.nix b/nixpkgs/pkgs/applications/video/k9copy/default.nix new file mode 100644 index 000000000000..1e8883eae7ff --- /dev/null +++ b/nixpkgs/pkgs/applications/video/k9copy/default.nix @@ -0,0 +1,60 @@ +{ stdenv, fetchurl +, cmake +, dvdauthor, xineLib, libmpeg2, libav, libdvdread, libdvdnav, dvdplusrwtools +, phonon, qtx11extras +, extra-cmake-modules, kio, kiconthemes, ki18n, kdesu, kdoctools, solid +}: + +stdenv.mkDerivation rec { + version = "3.0.3"; + name = "k9copy-${version}"; + + src = fetchurl { + url = "mirror://sourceforge/k9copy-reloaded/${name}.tar.gz"; + sha256 = "0dp06rwihks50c57bbv04d6bj2qc88isl91971r4lii2xp0qn7sg"; + }; + + patches = [ + ./gcc6.patch + ]; + + cmakeFlags = [ + "-DQT5_BUILD=ON" + "-DCMAKE_MINIMUM_REQUIRED_VERSION=3.0" + ]; + + # Hack to disable documentation + preConfigure = '' + substituteInPlace ./CMakeLists.txt \ + --replace "add_subdirectory(doc)" "" + ''; + + buildInputs = [ + cmake + dvdauthor + xineLib + libmpeg2 + libav + libdvdread + libdvdnav + dvdplusrwtools + #automoc4 + phonon + extra-cmake-modules + kio + solid + qtx11extras + kiconthemes + ki18n + kdesu + ]; + nativeBuildInputs = [ kdoctools ]; + + meta = { + description = "DVD backup and DVD authoring program"; + homepage = http://k9copy-reloaded.sourceforge.net/; + license = stdenv.lib.licenses.gpl2; + maintainers = with stdenv.lib.maintainers; [ flosse ]; + platforms = stdenv.lib.platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/applications/video/k9copy/gcc6.patch b/nixpkgs/pkgs/applications/video/k9copy/gcc6.patch new file mode 100644 index 000000000000..d0c9c2a8035e --- /dev/null +++ b/nixpkgs/pkgs/applications/video/k9copy/gcc6.patch @@ -0,0 +1,26 @@ +diff --git c/src/backup/k9dvdbackup.cpp i/src/backup/k9dvdbackup.cpp +index f5e4859..82fa392 100755 +--- c/src/backup/k9dvdbackup.cpp ++++ i/src/backup/k9dvdbackup.cpp +@@ -907,7 +907,7 @@ k9Vobu * k9DVDBackup::remapOffset(uint32_t _sector,uint32_t *_offset,int _dir) { + + + if ((vobu1 !=NULL) && (vobu2!=NULL)) { +- *_offset = abs(vobu1->newSector - vobu2->newSector) | maskOffset1 ; ++ *_offset = (vobu1->newSector - vobu2->newSector) | maskOffset1 ; + *_offset |= maskOffset2; + return vobu2; + } +diff --git c/src/backup/k9execcopy.cpp i/src/backup/k9execcopy.cpp +index d59222c..35de923 100644 +--- c/src/backup/k9execcopy.cpp ++++ i/src/backup/k9execcopy.cpp +@@ -306,7 +306,7 @@ void k9ExecCopy::createMkv(k9DVDTitle *_title,const QString &_filename,QMultiMap + + #if QT_VERSION >= 0x050000 + m_progressDialog=new QProgressDialog(k9Dialogs::getMainWidget() ); +- m_progressDialog->setCancelButton(false); ++ m_progressDialog->setCancelButton(0); + + #else + m_progressDialog=new KProgressDialog(k9Dialogs::getMainWidget() ); diff --git a/nixpkgs/pkgs/applications/video/kazam/default.nix b/nixpkgs/pkgs/applications/video/kazam/default.nix new file mode 100644 index 000000000000..9d549c2aecc3 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/kazam/default.nix @@ -0,0 +1,46 @@ +{ stdenv, fetchurl, substituteAll, python3, gst_all_1, wrapGAppsHook, gobject-introspection +, gtk3, libwnck3, keybinder3, intltool, libcanberra-gtk3, libappindicator-gtk3, libpulseaudio }: + +python3.pkgs.buildPythonApplication rec { + name = "kazam-${version}"; + version = "1.4.5"; + namePrefix = ""; + + src = fetchurl { + url = "https://launchpad.net/kazam/stable/${version}/+download/kazam-${version}.tar.gz"; + sha256 = "1qygnrvm6aqixbyivhssp70hs0llxwk7lh3j7idxa2jbkk06hj4f"; + }; + + nativeBuildInputs = [ gobject-introspection python3.pkgs.distutils_extra intltool wrapGAppsHook ]; + buildInputs = [ + gst_all_1.gstreamer gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good gtk3 libwnck3 + keybinder3 libappindicator-gtk3 + ]; + + propagatedBuildInputs = with python3.pkgs; [ pygobject3 pyxdg pycairo dbus-python ]; + + patches = [ + # Fix paths + (substituteAll { + src = ./fix-paths.patch; + libcanberra = libcanberra-gtk3; + inherit libpulseaudio; + }) + # Fix compability with Python 3.4 + (fetchurl { + url = https://sources.debian.org/data/main/k/kazam/1.4.5-2/debian/patches/configparser_api_changes.patch; + sha256 = "0yvmipnh98s7y07cp1f113l0qqfw65k13an96byq707z3ymv1c2h"; + }) + ]; + + # no tests + doCheck = false; + + meta = with stdenv.lib; { + description = "A screencasting program created with design in mind"; + homepage = https://code.launchpad.net/kazam; + license = licenses.lgpl3; + platforms = platforms.linux; + maintainers = [ maintainers.domenkozar ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/kazam/fix-paths.patch b/nixpkgs/pkgs/applications/video/kazam/fix-paths.patch new file mode 100644 index 000000000000..43e360830ab5 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/kazam/fix-paths.patch @@ -0,0 +1,22 @@ +--- a/kazam/backend/grabber.py ++++ b/kazam/backend/grabber.py +@@ -72,7 +72,7 @@ + # + if prefs.shutter_sound and (not self.god): + soundfile = os.path.join(prefs.datadir, 'sounds', prefs.sound_files[prefs.shutter_type]) +- subprocess.call(['/usr/bin/canberra-gtk-play', '-f', soundfile]) ++ subprocess.call(['@libcanberra@/bin/canberra-gtk-play', '-f', soundfile]) + + if self.xid: + if prefs.capture_borders_pic: +--- a/kazam/pulseaudio/ctypes_pulseaudio.py ++++ b/kazam/pulseaudio/ctypes_pulseaudio.py +@@ -20,7 +20,7 @@ + # MA 02110-1301, USA. + + from ctypes import * +-PA = CDLL('libpulse.so.0') ++PA = CDLL('@libpulseaudio@/lib/libpulse.so.0') + + # + # Pulse Audio constants and defines diff --git a/nixpkgs/pkgs/applications/video/key-mon/default.nix b/nixpkgs/pkgs/applications/video/key-mon/default.nix new file mode 100644 index 000000000000..bc6cd015b865 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/key-mon/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchurl, gnome2, librsvg, pythonPackages }: + +pythonPackages.buildPythonApplication rec { + name = "key-mon-${version}"; + version = "1.17"; + namePrefix = ""; + + src = fetchurl { + url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/key-mon/${name}.tar.gz"; + sha256 = "1liz0dxcqmchbnl1xhlxkqm3gh76wz9jxdxn9pa7dy77fnrjkl5q"; + }; + + propagatedBuildInputs = + [ gnome2.python_rsvg librsvg pythonPackages.pygtk pythonPackages.xlib ]; + + doCheck = false; + + preFixup = '' + export makeWrapperArgs="--set GDK_PIXBUF_MODULE_FILE $GDK_PIXBUF_MODULE_FILE" + ''; + + meta = with stdenv.lib; { + homepage = https://code.google.com/archive/p/key-mon; + description = "Utility to show live keyboard and mouse status for teaching and screencasts"; + license = licenses.asl20; + maintainers = [ maintainers.goibhniu ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/kino/default.nix b/nixpkgs/pkgs/applications/video/kino/default.nix new file mode 100644 index 000000000000..4ddd84433e88 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/kino/default.nix @@ -0,0 +1,98 @@ +# is this configure option of interest? +#--enable-udev-rules-dir=PATH +# Where to install udev rules (/etc/udev/rules.d) + +#TODO shared version? + + +# This is my config output.. Much TODO ? +#source path /tmp/nix-31998-1/kino-1.2.0/ffmpeg +#C compiler gcc +#make make +#.align is power-of-two no +#ARCH x86_64 (generic) +#build suffix -kino +#big-endian no +#MMX enabled yes +#CMOV enabled no +#CMOV is fast no +#gprof enabled no +#debug symbols yes +#strip symbols yes +#optimize yes +#static yes +#shared no +#postprocessing support no +#software scaler enabled yes +#video hooking no +#network support no +#threading support no +#SDL support no +#Sun medialib support no +#AVISynth enabled no +#liba52 support no +#liba52 dlopened no +#libdts support no +#libfaac enabled no +#libfaad enabled no +#faadbin enabled no +#libgsm enabled no +#libmp3lame enabled no +#libnut enabled no +#libogg enabled no +#libtheora enabled no +#libvorbis enabled no +#x264 enabled no +#XviD enabled no +#zlib enabled no +#AMR-NB float support no +#AMR-NB fixed support no +#AMR-WB float support no +#AMR-WB IF2 support no + +{ stdenv, fetchurl, gtk2, libglade, libxml2, libraw1394, libsamplerate, libdv +, pkgconfig, perlPackages, libavc1394, libiec61883, libXv, gettext +, libX11, glib, cairo, intltool, ffmpeg, libv4l +}: + +stdenv.mkDerivation { + name = "kino-1.3.4"; + + src = fetchurl { + url = mirror://sourceforge/kino/kino-1.3.4.tar.gz; + sha256 = "020s05k0ma83rq2kfs8x474pqicaqp9spar81qc816ddfrnh8k8i"; + }; + + buildInputs = [ gtk2 libglade libxml2 libraw1394 libsamplerate libdv + pkgconfig libavc1394 libiec61883 intltool libXv gettext libX11 glib cairo ffmpeg libv4l ] # TODOoptional packages + ++ (with perlPackages; [ perl XMLParser ]); + + configureFlags = [ "--enable-local-ffmpeg=no" ]; + + hardeningDisable = [ "format" ]; + + NIX_LDFLAGS = [ + "-lavcodec" + "-lavutil" + ]; + + patches = [ ./kino-1.3.4-v4l1.patch ./kino-1.3.4-libav-0.7.patch ./kino-1.3.4-libav-0.8.patch ]; #./kino-1.3.4-libavcodec-pkg-config.patch ]; + + postInstall = " + rpath=`patchelf --print-rpath \$out/bin/kino`; + for i in $\buildInputs; do + echo adding \$i/lib + rpath=\$rpath\${rpath:+:}\$i/lib + done + for i in \$out/bin/*; do + patchelf --set-rpath \"\$rpath\" \"\$i\" + done + "; + + meta = { + description = "Non-linear DV editor for GNU/Linux"; + homepage = http://www.kinodv.org/; + license = stdenv.lib.licenses.gpl2; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/kino/kino-1.3.4-libav-0.7.patch b/nixpkgs/pkgs/applications/video/kino/kino-1.3.4-libav-0.7.patch new file mode 100644 index 000000000000..65c5bc38276d --- /dev/null +++ b/nixpkgs/pkgs/applications/video/kino/kino-1.3.4-libav-0.7.patch @@ -0,0 +1,60 @@ +--- kino-1.3.4.orig/src/frame.cc 2011-07-17 14:54:59.089481638 +0200 ++++ kino-1.3.4/src/frame.cc 2011-07-17 15:09:23.199481714 +0200 +@@ -1063,7 +1063,12 @@ + AVPicture dest; + int got_picture; + +- avcodec_decode_video( libavcodec, frame, &got_picture, data, GetFrameSize() ); ++ AVPacket pkt; ++ av_init_packet(&pkt); ++ pkt.data = data; ++ pkt.size = GetFrameSize(); ++ ++ avcodec_decode_video2( libavcodec, frame, &got_picture, &pkt ); + if ( got_picture ) + { + avpicture_fill( &dest, static_cast<uint8_t*>( rgb ), PIX_FMT_RGB24, GetWidth(), GetHeight() ); +@@ -1123,7 +1128,12 @@ + AVPicture output; + int got_picture; + +- avcodec_decode_video( libavcodec, frame, &got_picture, data, GetFrameSize() ); ++ AVPacket pkt; ++ av_init_packet(&pkt); ++ pkt.data = data; ++ pkt.size = GetFrameSize(); ++ ++ avcodec_decode_video2( libavcodec, frame, &got_picture, &pkt ); + if ( got_picture ) + { + avpicture_fill( &output, static_cast<uint8_t*>( yuv ), PIX_FMT_YUV422, GetWidth(), GetHeight() ); +@@ -1156,7 +1166,12 @@ + AVFrame *frame = avcodec_alloc_frame(); + int got_picture; + +- avcodec_decode_video( libavcodec, frame, &got_picture, data, GetFrameSize() ); ++ AVPacket pkt; ++ av_init_packet(&pkt); ++ pkt.data = data; ++ pkt.size = GetFrameSize(); ++ ++ avcodec_decode_video2( libavcodec, frame, &got_picture, &pkt ); + + int width = GetWidth(), height = GetHeight(); + +@@ -1319,12 +1334,12 @@ + #if defined(HAVE_LIBAVCODEC) + if ( avformatEncoder == NULL ) + { +- avformatEncoder = av_alloc_format_context(); ++ avformatEncoder = avformat_alloc_context(); + if ( avformatEncoder ) + { +- avformatEncoder->oformat = guess_format( "dv", NULL, NULL ); ++ avformatEncoder->oformat = av_guess_format( "dv", NULL, NULL ); + AVStream* vst = av_new_stream( avformatEncoder, 0 ); +- vst->codec->codec_type = CODEC_TYPE_VIDEO; ++ vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; + vst->codec->codec_id = CODEC_ID_DVVIDEO; + vst->codec->bit_rate = 25000000; + vst->start_time = 0; diff --git a/nixpkgs/pkgs/applications/video/kino/kino-1.3.4-libav-0.8.patch b/nixpkgs/pkgs/applications/video/kino/kino-1.3.4-libav-0.8.patch new file mode 100644 index 000000000000..f98cbda0bc49 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/kino/kino-1.3.4-libav-0.8.patch @@ -0,0 +1,57 @@ +--- kino-1.3.4.orig/src/frame.cc 2012-05-14 19:55:42.153772418 -0700 ++++ kino-1.3.4/src/frame.cc 2012-05-14 20:28:34.448838653 -0700 +@@ -101,8 +101,9 @@ + #if defined(HAVE_LIBAVCODEC) + pthread_mutex_lock( &avcodec_mutex ); + av_register_all(); +- libavcodec = avcodec_alloc_context(); +- avcodec_open( libavcodec, avcodec_find_decoder( CODEC_ID_DVVIDEO ) ); ++ libavcodec = avcodec_alloc_context3(NULL); ++ avcodec_open2( libavcodec, ++ avcodec_find_decoder( CODEC_ID_DVVIDEO ), NULL ); + pthread_mutex_unlock( &avcodec_mutex ); + data = ( unsigned char* ) av_mallocz( 144000 ); + #if defined(HAVE_SWSCALE) +@@ -1338,7 +1339,7 @@ + if ( avformatEncoder ) + { + avformatEncoder->oformat = av_guess_format( "dv", NULL, NULL ); +- AVStream* vst = av_new_stream( avformatEncoder, 0 ); ++ AVStream* vst = avformat_new_stream( avformatEncoder, NULL ); + vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; + vst->codec->codec_id = CODEC_ID_DVVIDEO; + vst->codec->bit_rate = 25000000; +@@ -1364,12 +1365,10 @@ + vst->sample_aspect_ratio = avcodecEncoder->sample_aspect_ratio; + #endif + avcodecEncoder->thread_count = 2; +- avcodec_thread_init( avcodecEncoder, avcodecEncoder->thread_count ); + avcodecEncoder->time_base= isPAL ? ( AVRational ){ 1, 25 } : ( AVRational ){ 1001, 30000 }; + avcodecEncoder->pix_fmt = isPAL ? PIX_FMT_YUV420P : PIX_FMT_YUV411P; + avcodecEncoder->flags |= CODEC_FLAG_INTERLACED_DCT; +- av_set_parameters( avformatEncoder, NULL ); +- avcodec_open( avcodecEncoder, avcodec_find_encoder( CODEC_ID_DVVIDEO ) ); ++ avcodec_open2( avcodecEncoder, avcodec_find_encoder( CODEC_ID_DVVIDEO ), NULL ); + av_new_packet( &avpacketEncoder, 144000 ); + tempImage = ( uint8_t* ) av_malloc( + avpicture_get_size( avcodecEncoder->pix_fmt, avcodecEncoder->width, avcodecEncoder->height ) ); +@@ -1475,16 +1474,16 @@ + + // Encode + bytesInFrame = avcodec_encode_video( avcodecEncoder, avpacketEncoder.data, size, output ); +- url_open_buf( &avformatEncoder->pb, data, bytesInFrame, URL_WRONLY ); ++ avformatEncoder->pb = avio_alloc_context(data, bytesInFrame, 0, NULL, NULL, NULL, NULL); + avpacketEncoder.size = bytesInFrame; + if ( !isEncoderHeaderWritten ) + { +- av_write_header( avformatEncoder ); ++ avformat_write_header( avformatEncoder, NULL ); + isEncoderHeaderWritten = true; + } + av_write_frame( avformatEncoder, &avpacketEncoder ); + #if LIBAVFORMAT_VERSION_INT >= ((52<<16)+(0<<8)+0) +- url_close_buf( avformatEncoder->pb ); ++ avio_close( avformatEncoder->pb ); + #else + url_close_buf( &avformatEncoder->pb ); + #endif diff --git a/nixpkgs/pkgs/applications/video/kino/kino-1.3.4-libavcodec-pkg-config.patch b/nixpkgs/pkgs/applications/video/kino/kino-1.3.4-libavcodec-pkg-config.patch new file mode 100644 index 000000000000..d6a8953cf00a --- /dev/null +++ b/nixpkgs/pkgs/applications/video/kino/kino-1.3.4-libavcodec-pkg-config.patch @@ -0,0 +1,11 @@ +--- a/kino-1.3.4/configure.in 2009-09-08 02:35:23.000000000 -0400 ++++ b/kino-1.3.4/configure.in 2014-01-27 14:53:01.366063037 -0500 +@@ -221,7 +221,7 @@ + if (test "x$avcodec_include" != x) || (test "x$avcodec_lib" != x) ; then + local_legacy_ffmpeg_test + else +- PKG_CHECK_MODULES(AVCODEC, libavformat, ++ PKG_CHECK_MODULES(AVCODEC, [libavcodec libavformat libavutil], + [ + AC_DEFINE(HAVE_LIBAVCODEC, 1, [Enable FFMPEG libavcodec]) + AC_SUBST(AVCODEC_LIBS) diff --git a/nixpkgs/pkgs/applications/video/kino/kino-1.3.4-v4l1.patch b/nixpkgs/pkgs/applications/video/kino/kino-1.3.4-v4l1.patch new file mode 100644 index 000000000000..05ec7386709e --- /dev/null +++ b/nixpkgs/pkgs/applications/video/kino/kino-1.3.4-v4l1.patch @@ -0,0 +1,21 @@ +no-1.3.3.orig/ffmpeg/libavdevice/v4l.c 2011-05-17 02:20:37.161004916 +0400 ++++ kino-1.3.3.orig/ffmpeg/libavdevice/v4l.c 2011-05-17 02:21:57.302377529 +0400 +@@ -26,7 +26,7 @@ + #include <sys/mman.h> + #include <sys/time.h> + #define _LINUX_TIME_H 1 +-#include <linux/videodev.h> ++#include <libv4l1-videodev.h> + #include <time.h> + + typedef struct { +--- kino-1.3.3.orig/src/v4l.h 2011-05-17 02:20:38.896969666 +0400 ++++ kino-1.3.3.orig/src/v4l.h 2011-05-17 02:21:39.922730395 +0400 +@@ -40,7 +40,7 @@ + + #define _DEVICE_H_ + #define _LINUX_TIME_H +-#include <linux/videodev.h> ++#include <libv4l1-videodev.h> + + #include "displayer.h" diff --git a/nixpkgs/pkgs/applications/video/kmplayer/default.nix b/nixpkgs/pkgs/applications/video/kmplayer/default.nix new file mode 100644 index 000000000000..44313f9499f5 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/kmplayer/default.nix @@ -0,0 +1,48 @@ +{ + mkDerivation, lib, fetchurl, + extra-cmake-modules, makeWrapper, + libpthreadstubs, libXdmcp, + qtsvg, qtx11extras, ki18n, kdelibs4support, kio, kmediaplayer, kwidgetsaddons, + phonon, cairo, mplayer +}: + +mkDerivation rec { + majorMinorVersion = "0.12"; + patchVersion = "0b"; + version = "${majorMinorVersion}.${patchVersion}"; + name = "kmplayer-${version}"; + + src = fetchurl { + url = "mirror://kde/stable/kmplayer/${majorMinorVersion}/kmplayer-${version}.tar.bz2"; + sha256 = "0wzdxym4fc83wvqyhcwid65yv59a2wvp1lq303cn124mpnlwx62y"; + }; + + patches = [ + ./kmplayer_part-plugin_metadata.patch # Qt 5.9 doesn't like an empty string for the optional "FILE" argument of "Q_PLUGIN_METADATA" + ./no-docs.patch # Don't build docs due to errors (kdelibs4support propagates kdoctools) + ]; + + postPatch = '' + sed -i src/kmplayer.desktop \ + -e "s,^Exec.*,Exec=$out/bin/kmplayer -qwindowtitle %c %i %U," + ''; + + nativeBuildInputs = [ extra-cmake-modules makeWrapper ]; + + buildInputs = [ + libpthreadstubs libXdmcp + qtsvg qtx11extras ki18n kdelibs4support kio kmediaplayer kwidgetsaddons + phonon cairo + ]; + + postInstall = '' + wrapProgram $out/bin/kmplayer --suffix PATH : ${mplayer}/bin + ''; + + meta = with lib; { + description = "MPlayer front-end for KDE"; + license = with licenses; [ gpl2 lgpl2 fdl12 ]; + homepage = https://kmplayer.kde.org/; + maintainers = with maintainers; [ sander zraexy ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/kmplayer/kmplayer_part-plugin_metadata.patch b/nixpkgs/pkgs/applications/video/kmplayer/kmplayer_part-plugin_metadata.patch new file mode 100644 index 000000000000..9b6652b0be58 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/kmplayer/kmplayer_part-plugin_metadata.patch @@ -0,0 +1,11 @@ +--- a/src/kmplayer_part.h ++++ b/src/kmplayer_part.h +@@ -36,7 +36,7 @@ + + class KMPlayerFactory : public KPluginFactory { + Q_OBJECT +- Q_PLUGIN_METADATA(IID "org.kde.KPluginFactory" FILE "") ++ Q_PLUGIN_METADATA(IID "org.kde.KPluginFactory") + Q_INTERFACES(KPluginFactory) + public: + KMPlayerFactory(); diff --git a/nixpkgs/pkgs/applications/video/kmplayer/no-docs.patch b/nixpkgs/pkgs/applications/video/kmplayer/no-docs.patch new file mode 100644 index 000000000000..c93453f908c9 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/kmplayer/no-docs.patch @@ -0,0 +1,12 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -79,9 +79,6 @@ + + add_subdirectory(src) + add_subdirectory(icons) +-if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/doc" AND KF5DocTools_VERSION) +- add_subdirectory(doc) +-endif(KF5DocTools_VERSION) + add_subdirectory(data) + + if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po") diff --git a/nixpkgs/pkgs/applications/video/kodi/default.nix b/nixpkgs/pkgs/applications/video/kodi/default.nix new file mode 100644 index 000000000000..e5844eb827df --- /dev/null +++ b/nixpkgs/pkgs/applications/video/kodi/default.nix @@ -0,0 +1,218 @@ +{ stdenv, lib, fetchFromGitHub, autoconf, automake, libtool, makeWrapper +, pkgconfig, cmake, gnumake, yasm, python2Packages +, libgcrypt, libgpgerror, libunistring +, boost, avahi, lame, autoreconfHook +, gettext, pcre-cpp, yajl, fribidi, which +, openssl, gperf, tinyxml2, taglib, libssh, swig, jre +, libX11, xorgproto, libxml2 +, libXt, libXmu, libXext +, libXinerama, libXrandr +, libXtst, libXfixes, systemd +, alsaLib, libGLU_combined, glew, fontconfig, freetype, ftgl +, libjpeg, jasper, libpng, libtiff +, libmpeg2, libsamplerate, libmad +, libogg, libvorbis, flac, libxslt +, lzo, libcdio, libmodplug, libass, libbluray +, sqlite, mysql, nasm, gnutls, libva, libdrm +, curl, bzip2, zip, unzip, glxinfo, xdpyinfo +, libcec, libcec_platform, dcadec, libuuid +, libcrossguid, libmicrohttpd +, bluez, doxygen, giflib, glib, harfbuzz, lcms2, libidn, libpthreadstubs, libtasn1, libXdmcp +, libplist, p11-kit, zlib, flatbuffers, fmt, fstrcmp, rapidjson +, dbusSupport ? true, dbus ? null +, joystickSupport ? true, cwiid ? null +, nfsSupport ? true, libnfs ? null +, pulseSupport ? true, libpulseaudio ? null +, rtmpSupport ? true, rtmpdump ? null +, sambaSupport ? true, samba ? null +, udevSupport ? true, udev ? null +, usbSupport ? false, libusb ? null +, vdpauSupport ? true, libvdpau ? null +, useWayland ? false, wayland ? null, wayland-protocols ? null +, waylandpp ? null, libxkbcommon ? null +}: + +assert dbusSupport -> dbus != null; +assert nfsSupport -> libnfs != null; +assert pulseSupport -> libpulseaudio != null; +assert rtmpSupport -> rtmpdump != null; +assert sambaSupport -> samba != null; +assert udevSupport -> udev != null; +assert usbSupport -> libusb != null && ! udevSupport; # libusb won't be used if udev is avaliable +assert vdpauSupport -> libvdpau != null; +assert useWayland -> wayland != null && wayland-protocols != null && waylandpp != null && libxkbcommon != null; + +# TODO for Kodi 18.0 +# - check if dbus support PR has been merged and add dbus as a buildInput + +let + kodiReleaseDate = "20190129"; + kodiVersion = "18.1"; + rel = "Leia"; + + kodi_src = fetchFromGitHub { + owner = "xbmc"; + repo = "xbmc"; + rev = "${kodiVersion}-${rel}"; + sha256 = "1w26aqvzxv4c70gcd1vw1pldapsc2xcacwq9b7dqx5m44j0zx1dc"; + }; + + kodiDependency = { name, version, rev, sha256, ... } @attrs: + let + attrs' = builtins.removeAttrs attrs ["name" "version" "rev" "sha256"]; + in stdenv.mkDerivation ({ + name = "kodi-${lib.toLower name}-${version}"; + src = fetchFromGitHub { + owner = "xbmc"; + repo = name; + inherit rev sha256; + }; + enableParallelBuilding = true; + } // attrs'); + + ffmpeg = kodiDependency rec { + name = "FFmpeg"; + version = "4.0.3"; + rev = "${version}-${rel}-18.2"; + sha256 = "1krsjlr949iy5l6ljxancza1yi6w1annxc5s6k283i9mb15qy8cy"; + preConfigure = '' + cp ${kodi_src}/tools/depends/target/ffmpeg/{CMakeLists.txt,*.cmake} . + ''; + buildInputs = [ gnutls libidn libtasn1 p11-kit zlib libva ] + ++ lib.optional vdpauSupport libvdpau; + nativeBuildInputs = [ cmake nasm pkgconfig ]; + }; + + # we should be able to build these externally and have kodi reference them as buildInputs. + # Doesn't work ATM though so we just use them for the src + + libdvdcss = kodiDependency rec { + name = "libdvdcss"; + version = "1.4.2"; + rev = "${version}-${rel}-Beta-5"; + sha256 = "0j41ydzx0imaix069s3z07xqw9q95k7llh06fc27dcn6f7b8ydyl"; + buildInputs = [ libdvdread ]; + nativeBuildInputs = [ autoreconfHook pkgconfig ]; + }; + + libdvdnav = kodiDependency rec { + name = "libdvdnav"; + version = "6.0.0"; + rev = "${version}-${rel}-Alpha-3"; + sha256 = "0qwlf4lgahxqxk1r2pzl866mi03pbp7l1fc0rk522sc0ak2s9jhb"; + buildInputs = [ libdvdread ]; + nativeBuildInputs = [ autoreconfHook pkgconfig ]; + }; + + libdvdread = kodiDependency rec { + name = "libdvdread"; + version = "6.0.0"; + rev = "${version}-${rel}-Alpha-3"; + sha256 = "1xxn01mhkdnp10cqdr357wx77vyzfb5glqpqyg8m0skyi75aii59"; + nativeBuildInputs = [ autoreconfHook pkgconfig ]; + }; + +in stdenv.mkDerivation rec { + name = "kodi-${lib.optionalString useWayland "wayland-"}${kodiVersion}"; + + src = kodi_src; + + buildInputs = [ + gnutls libidn libtasn1 nasm p11-kit + libxml2 yasm python2Packages.python + boost libmicrohttpd + gettext pcre-cpp yajl fribidi libva libdrm + openssl gperf tinyxml2 taglib libssh swig jre + libX11 xorgproto libXt libXmu libXext + libXinerama libXrandr libXtst libXfixes + alsaLib libGLU_combined glew fontconfig freetype ftgl + libjpeg jasper libpng libtiff + libmpeg2 libsamplerate libmad + libogg libvorbis flac libxslt systemd + lzo libcdio libmodplug libass libbluray + sqlite mysql.connector-c avahi lame + curl bzip2 zip unzip glxinfo xdpyinfo + libcec libcec_platform dcadec libuuid + libgcrypt libgpgerror libunistring + libcrossguid cwiid libplist + bluez giflib glib harfbuzz lcms2 libpthreadstubs libXdmcp + ffmpeg flatbuffers fmt fstrcmp rapidjson + # libdvdcss libdvdnav libdvdread + ] + ++ lib.optional dbusSupport dbus + ++ lib.optionals joystickSupport [ cwiid ] + ++ lib.optional nfsSupport libnfs + ++ lib.optional pulseSupport libpulseaudio + ++ lib.optional rtmpSupport rtmpdump + ++ lib.optional sambaSupport samba + ++ lib.optional udevSupport udev + ++ lib.optional usbSupport libusb + ++ lib.optional vdpauSupport libvdpau + ++ lib.optional useWayland [ + wayland waylandpp + # Not sure why ".dev" is needed here, but CMake doesn't find libxkbcommon otherwise + libxkbcommon.dev + ]; + + nativeBuildInputs = [ + cmake + doxygen + makeWrapper + which + pkgconfig gnumake + autoconf automake libtool # still needed for some components. Check if that is the case with 18.0 + ] ++ lib.optional useWayland [ wayland-protocols ]; + + cmakeFlags = [ + "-Dlibdvdcss_URL=${libdvdcss.src}" + "-Dlibdvdnav_URL=${libdvdnav.src}" + "-Dlibdvdread_URL=${libdvdread.src}" + "-DGIT_VERSION=${kodiReleaseDate}" + "-DENABLE_EVENTCLIENTS=ON" + "-DENABLE_INTERNAL_CROSSGUID=OFF" + "-DENABLE_OPTICAL=ON" + "-DLIRC_DEVICE=/run/lirc/lircd" + ] ++ lib.optional useWayland [ + "-DCORE_PLATFORM_NAME=wayland" + "-DWAYLAND_RENDER_SYSTEM=gl" + ]; + + enableParallelBuilding = true; + + # 14 tests fail but the biggest issue is that every test takes 30 seconds - + # I'm guessing there is a thing waiting to time out + doCheck = false; + + postPatch = '' + substituteInPlace xbmc/platform/linux/LinuxTimezone.cpp \ + --replace 'usr/share/zoneinfo' 'etc/zoneinfo' + ''; + + postInstall = '' + for p in $(ls $out/bin/) ; do + wrapProgram $out/bin/$p \ + --prefix PATH ":" "${lib.makeBinPath [ python2Packages.python glxinfo xdpyinfo ]}" \ + --prefix LD_LIBRARY_PATH ":" "${lib.makeLibraryPath + ([ curl systemd libmad libvdpau libcec libcec_platform rtmpdump libass ] ++ lib.optional nfsSupport libnfs)}" + done + + substituteInPlace $out/share/xsessions/kodi.desktop \ + --replace kodi-standalone $out/bin/kodi-standalone + ''; + + doInstallCheck = true; + + installCheckPhase = "$out/bin/kodi --version"; + + passthru = { + pythonPackages = python2Packages; + }; + + meta = with stdenv.lib; { + description = "Media center"; + homepage = https://kodi.tv/; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = with maintainers; [ domenkozar titanous edwtjo peterhoeg sephalon ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/kodi/plugins.nix b/nixpkgs/pkgs/applications/video/kodi/plugins.nix new file mode 100644 index 000000000000..1cb510780691 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/kodi/plugins.nix @@ -0,0 +1,553 @@ +{ stdenv, callPackage, fetchFromGitHub +, cmake, kodiPlain, libcec_platform, tinyxml, rapidxml +, steam, libusb, pcre-cpp, jsoncpp, libhdhomerun, zlib +, python2Packages, expat, glib, nspr, nss, openssl +, libssh, libarchive, lzma, bzip2, lz4, lzo }: + +with stdenv.lib; + +let self = rec { + + pluginDir = "/share/kodi/addons"; + rel = "Leia"; + + kodi = kodiPlain; + + # Convert derivation to a kodi module. Stolen from ../../../top-level/python-packages.nix + toKodiPlugin = drv: drv.overrideAttrs(oldAttrs: { + # Use passthru in order to prevent rebuilds when possible. + passthru = (oldAttrs.passthru or {})// { + kodiPluginFor = kodi; + requiredKodiPlugins = requiredKodiPlugins drv.propagatedBuildInputs; + }; + }); + + # Check whether a derivation provides a Kodi plugin. + hasKodiPlugin = drv: drv ? kodiPluginFor && drv.kodiPluginFor == kodi; + + # Get list of required Kodi plugins given a list of derivations. + requiredKodiPlugins = drvs: let + modules = filter hasKodiPlugin drvs; + in unique (modules ++ concatLists (catAttrs "requiredKodiPlugins" modules)); + + kodiWithPlugins = func: callPackage ./wrapper.nix { + inherit kodi; + plugins = requiredKodiPlugins (func self); + }; + + kodi-platform = stdenv.mkDerivation rec { + project = "kodi-platform"; + version = "17.1"; + name = "${project}-${version}"; + + src = fetchFromGitHub { + owner = "xbmc"; + repo = project; + rev = "c8188d82678fec6b784597db69a68e74ff4986b5"; + sha256 = "1r3gs3c6zczmm66qcxh9mr306clwb3p7ykzb70r3jv5jqggiz199"; + }; + + buildInputs = [ cmake kodiPlain libcec_platform tinyxml ]; + }; + + mkKodiPlugin = { plugin, namespace, version, sourceDir ? null, ... }@args: + toKodiPlugin (stdenv.mkDerivation (rec { + name = "kodi-plugin-${plugin}-${version}"; + + dontStrip = true; + + extraRuntimeDependencies = [ ]; + + installPhase = '' + ${if sourceDir == null then "" else "cd $src/$sourceDir"} + d=$out${pluginDir}/${namespace} + mkdir -p $d + sauce="." + [ -d ${namespace} ] && sauce=${namespace} + cp -R "$sauce/"* $d + ''; + } // args)); + + mkKodiABIPlugin = { plugin, namespace, version, extraBuildInputs ? [], + extraRuntimeDependencies ? [], extraInstallPhase ? "", ... }@args: + toKodiPlugin (stdenv.mkDerivation (rec { + name = "kodi-plugin-${plugin}-${version}"; + + dontStrip = true; + + buildInputs = [ cmake kodiPlain kodi-platform libcec_platform ] + ++ extraBuildInputs; + + inherit extraRuntimeDependencies; + + # disables check ensuring install prefix is that of kodi + cmakeFlags = [ + "-DOVERRIDE_PATHS=1" + ]; + + # kodi checks for plugin .so libs existance in the addon folder (share/...) + # and the non-wrapped kodi lib/... folder before even trying to dlopen + # them. Symlinking .so, as setting LD_LIBRARY_PATH is of no use + installPhase = let n = namespace; in '' + make install + ln -s $out/lib/addons/${n}/${n}.so.${version} $out${pluginDir}/${n}/${n}.so.${version} + ${extraInstallPhase} + ''; + } // args)); + + advanced-launcher = mkKodiPlugin rec { + + plugin = "advanced-launcher"; + namespace = "plugin.program.advanced.launcher"; + version = "2.5.8"; + + src = fetchFromGitHub { + owner = "edwtjo"; + repo = plugin; + rev = version; + sha256 = "142vvgs37asq5m54xqhjzqvgmb0xlirvm0kz6lxaqynp0vvgrkx2"; + }; + + meta = { + homepage = https://forum.kodi.tv/showthread.php?tid=85724; + description = "A program launcher for Kodi"; + longDescription = '' + Advanced Launcher allows you to start any Linux, Windows and + macOS external applications (with command line support or not) + directly from the Kodi GUI. Advanced Launcher also give you + the possibility to edit, download (from Internet resources) + and manage all the meta-data (informations and images) related + to these applications. + ''; + platforms = platforms.all; + maintainers = with maintainers; [ edwtjo ]; + }; + + }; + + advanced-emulator-launcher = mkKodiPlugin rec { + + plugin = "advanced-emulator-launcher"; + namespace = "plugin.program.advanced.emulator.launcher"; + version = "0.9.6"; + + src = fetchFromGitHub { + owner = "Wintermute0110"; + repo = namespace; + rev = version; + sha256 = "1sv9z77jj6bam6llcnd9b3dgkbvhwad2m1v541rv3acrackms2z2"; + }; + + meta = { + homepage = https://forum.kodi.tv/showthread.php?tid=287826; + description = "A program launcher for Kodi"; + longDescription = '' + Advanced Emulator Launcher is a multi-emulator front-end for Kodi + scalable to collections of thousands of ROMs. Includes offline scrapers + for MAME and No-Intro ROM sets and also supports scrapping ROM metadata + and artwork online. ROM auditing for No-Intro ROMs using No-Intro XML + DATs. Launching of games and standalone applications is also available. + ''; + platforms = platforms.all; + maintainers = with maintainers; [ edwtjo ]; + }; + + }; + + controllers = let + pname = "game-controller"; + version = "1.0.3"; + + src = fetchFromGitHub { + owner = "kodi-game"; + repo = "kodi-game-controllers"; + rev = "01acb5b6e8b85392b3cb298b034aadb1b24ccf18"; + sha256 = "0sbc0w0fwbp7rbmbgb6a1kglhnn5g85hijcbbvf5x6jdq9v3f1qb"; + }; + + meta = { + description = "Add support for different gaming controllers."; + platforms = platforms.all; + maintainers = with maintainers; [ edwtjo ]; + }; + + mkController = controller: { + "${controller}" = mkKodiPlugin rec { + plugin = pname + "-" + controller; + namespace = "game.controller." + controller; + sourceDir = "addons/" + namespace; + inherit version src meta; + }; + }; + in (mkController "default") + // (mkController "dreamcast") + // (mkController "gba") + // (mkController "genesis") + // (mkController "mouse") + // (mkController "n64") + // (mkController "nes") + // (mkController "ps") + // (mkController "snes"); + + hyper-launcher = let + pname = "hyper-launcher"; + version = "1.5.2"; + src = fetchFromGitHub rec { + name = pname + "-" + version + ".tar.gz"; + owner = "teeedubb"; + repo = owner + "-xbmc-repo"; + rev = "f958ba93fe85b9c9025b1745d89c2db2e7dd9bf6"; + sha256 = "1dvff24fbas25k5kvca4ssks9l1g5rfa3hl8lqxczkaqi3pp41j5"; + }; + meta = { + homepage = https://forum.kodi.tv/showthread.php?tid=258159; + description = "A ROM launcher for Kodi that uses HyperSpin assets."; + maintainers = with maintainers; [ edwtjo ]; + }; + in { + service = mkKodiPlugin { + plugin = pname + "-service"; + version = "1.2.1"; + namespace = "service.hyper.launcher"; + inherit src meta; + }; + plugin = mkKodiPlugin { + plugin = pname; + namespace = "plugin.hyper.launcher"; + inherit version src meta; + }; + }; + + joystick = mkKodiABIPlugin rec { + namespace = "peripheral.joystick"; + version = "1.4.7"; + plugin = namespace; + + src = fetchFromGitHub { + owner = "xbmc"; + repo = namespace; + rev = "v${version}"; + sha256 = "03gsp4kg41s3n4ib4wsv7m3krfipgwc2z07i4mnd5zvg0c4xrmap"; + }; + + meta = { + description = "Binary addon for raw joystick input."; + platforms = platforms.all; + maintainers = with maintainers; [ edwtjo ]; + }; + + extraBuildInputs = [ libusb pcre-cpp ]; + + }; + + simpleplugin = mkKodiPlugin rec { + plugin = "simpleplugin"; + namespace = "script.module.simpleplugin"; + version = "2.3.2"; + + src = fetchFromGitHub { + owner = "romanvm"; + repo = namespace; + rev = "v.${version}"; + sha256 = "0myar8dqjigb75pcc8zx3i5z79p1ifgphgb82s5syqywk0zaxm3j"; + }; + + meta = { + homepage = src.meta.homepage; + description = "Simpleplugin API"; + license = licenses.gpl3; + }; + }; + + svtplay = mkKodiPlugin rec { + + plugin = "svtplay"; + namespace = "plugin.video.svtplay"; + version = "4.0.48"; + + src = fetchFromGitHub { + name = plugin + "-" + version + ".tar.gz"; + owner = "nilzen"; + repo = "xbmc-" + plugin; + rev = "dc18ad002cd69257611d0032fba91f57bb199165"; + sha256 = "0klk1jpjc243ak306k94mag4b4s17w68v69yb8lzzydszqkaqa7x"; + }; + + meta = { + homepage = https://forum.kodi.tv/showthread.php?tid=67110; + description = "Watch content from SVT Play"; + longDescription = '' + With this addon you can stream content from SVT Play + (svtplay.se). The plugin fetches the video URL from the SVT + Play website and feeds it to the Kodi video player. HLS (m3u8) + is the preferred video format by the plugin. + ''; + platforms = platforms.all; + maintainers = with maintainers; [ edwtjo ]; + }; + + }; + + steam-controller = mkKodiABIPlugin rec { + namespace = "peripheral.steamcontroller"; + version = "0.10.0"; + plugin = namespace; + + src = fetchFromGitHub { + owner = "kodi-game"; + repo = namespace; + rev = "ea345392ab5aa4485f3a48d2037fa8a8e8ab82de"; + sha256 = "1hbd8fdvn7xkr9csz1g9wah78nhnq1rkazl4zwa31y70830k3279"; + }; + + extraBuildInputs = [ libusb ]; + + meta = { + description = "Binary addon for steam controller."; + platforms = platforms.all; + maintainers = with maintainers; [ edwtjo ]; + }; + + }; + + steam-launcher = mkKodiPlugin rec { + + plugin = "steam-launcher"; + namespace = "script.steam.launcher"; + version = "3.1.4"; + + src = fetchFromGitHub rec { + owner = "teeedubb"; + repo = owner + "-xbmc-repo"; + rev = "db67704c3e16bdcdd3bdfe2926c609f1f6bdc4fb"; + sha256 = "001a7zs3a4jfzj8ylxv2klc33mipmqsd5aqax7q81fbgwdlndvbm"; + }; + + propagatedBuildInputs = [ steam ]; + + meta = { + homepage = https://forum.kodi.tv/showthread.php?tid=157499; + description = "Launch Steam in Big Picture Mode from Kodi"; + longDescription = '' + This add-on will close/minimise Kodi, launch Steam in Big + Picture Mode and when Steam BPM is exited (either by quitting + Steam or returning to the desktop) Kodi will + restart/maximise. Running pre/post Steam scripts can be + configured via the addon. + ''; + maintainers = with maintainers; [ edwtjo ]; + }; + }; + + pdfreader = mkKodiPlugin rec { + plugin = "pdfreader"; + namespace = "plugin.image.pdf"; + version = "1.0.2"; + + src = fetchFromGitHub rec { + name = plugin + "-" + version + ".tar.gz"; + owner = "teeedubb"; + repo = owner + "-xbmc-repo"; + rev = "0a405b95208ced8a1365ad3193eade8d1c2117ce"; + sha256 = "1iv7d030z3xvlflvp4p5v3riqnwg9g0yvzxszy63v1a6x5kpjkqa"; + }; + + meta = { + homepage = https://forum.kodi.tv/showthread.php?tid=187421; + description = "A comic book reader"; + maintainers = with maintainers; [ edwtjo ]; + }; + }; + + pvr-hts = mkKodiABIPlugin rec { + + plugin = "pvr-hts"; + namespace = "pvr.hts"; + version = "4.4.14"; + + src = fetchFromGitHub { + owner = "kodi-pvr"; + repo = "pvr.hts"; + rev = "${version}-${rel}"; + sha256 = "1bcwcwd2yjhw85yk6lyhf0iqiclrsz7r7vpbxgc650fwqbb146gr"; + }; + + meta = { + homepage = https://github.com/kodi-pvr/pvr.hts; + description = "Kodi's Tvheadend HTSP client addon"; + platforms = platforms.all; + maintainers = with maintainers; [ cpages ]; + }; + + }; + + pvr-hdhomerun = mkKodiABIPlugin rec { + + plugin = "pvr-hdhomerun"; + namespace = "pvr.hdhomerun"; + version = "3.5.0"; + + src = fetchFromGitHub { + owner = "kodi-pvr"; + repo = "pvr.hdhomerun"; + rev = "${version}-${rel}"; + sha256 = "1zrkvfn0im2qmvqm93pa3cg8xkxv61sxlj8nsz4r5z9v9nhqadf6"; + }; + + meta = { + homepage = https://github.com/kodi-pvr/pvr.hdhomerun; + description = "Kodi's HDHomeRun PVR client addon"; + platforms = platforms.all; + maintainers = with maintainers; [ titanous ]; + }; + + extraBuildInputs = [ jsoncpp libhdhomerun ]; + + }; + + pvr-iptvsimple = mkKodiABIPlugin rec { + + plugin = "pvr-iptvsimple"; + namespace = "pvr.iptvsimple"; + version = "3.5.7"; + + src = fetchFromGitHub { + owner = "kodi-pvr"; + repo = "pvr.iptvsimple"; + rev = "${version}-${rel}"; + sha256 = "17znib7c491h2ii4gagxradh0jyvgga0d548gbk4yjj2nc9qqc6d"; + }; + + meta = { + homepage = https://github.com/kodi-pvr/pvr.iptvsimple; + description = "Kodi's IPTV Simple client addon"; + platforms = platforms.all; + maintainers = with maintainers; [ ]; + license = licenses.gpl2Plus; + }; + + extraBuildInputs = [ zlib rapidxml ]; + }; + + osmc-skin = mkKodiPlugin rec { + + plugin = "osmc-skin"; + namespace = "skin.osmc"; + version = "18.0.0"; + + src = fetchFromGitHub { + owner = "osmc"; + repo = namespace; + rev = "40a6c318641e2cbeac58fb0e7dde9c2beac737a0"; + sha256 = "1l7hyfj5zvjxjdm94y325bmy1naak455b9l8952sb0gllzrcwj6s"; + }; + + meta = { + homepage = https://github.com/osmc/skin.osmc; + description = "The default skin for OSMC"; + platforms = platforms.all; + maintainers = with maintainers; [ worldofpeace ]; + license = licenses.cc-by-nc-sa-30; + }; + }; + + yatp = python2Packages.toPythonModule (mkKodiPlugin rec { + plugin = "yatp"; + namespace = "plugin.video.yatp"; + version = "3.3.2"; + + src = fetchFromGitHub { + owner = "romanvm"; + repo = "kodi.yatp"; + rev = "v.${version}"; + sha256 = "12g1f57sx7dy6wy7ljl7siz2qs1kxcmijcg7xx2xpvmq61x9qa2d"; + }; + + patches = [ ./yatp/dont-monkey.patch ]; + + propagatedBuildInputs = [ + simpleplugin + python2Packages.requests + python2Packages.libtorrentRasterbar + ]; + + meta = { + homepage = src.meta.homepage; + description = "Yet Another Torrent Player: libtorrent-based torrent streaming for Kodi"; + license = licenses.gpl3; + }; + }); + + inputstream-adaptive = mkKodiABIPlugin rec { + + plugin = "inputstream-adaptive"; + namespace = "inputstream.adaptive"; + version = "2.3.12"; + + src = fetchFromGitHub { + owner = "peak3d"; + repo = "inputstream.adaptive"; + rev = "${version}"; + sha256 = "09d9b35mpaf3g5m51viyan9hv7d2i8ndvb9wm0j7rs5gwsf0k71z"; + }; + + extraBuildInputs = [ expat ]; + + extraRuntimeDependencies = [ glib nspr nss stdenv.cc.cc.lib ]; + + extraInstallPhase = let n = namespace; in '' + ln -s $out/lib/addons/${n}/libssd_wv.so $out/${pluginDir}/${n}/libssd_wv.so + ''; + + meta = { + homepage = https://github.com/peak3d/inputstream.adaptive; + description = "Kodi inputstream addon for several manifest types"; + platforms = platforms.all; + maintainers = with maintainers; [ sephalon ]; + }; + }; + + vfs-sftp = mkKodiABIPlugin rec { + namespace = "vfs.sftp"; + version = "1.0.1"; + plugin = namespace; + + src = fetchFromGitHub { + owner = "xbmc"; + repo = namespace; + rev = "${version}-${rel}"; + sha256 = "1l9igrl168s91c15v9klyaaz226ik3xlbzjk2f1346fvzmp87g9v"; + }; + + meta = with stdenv.lib; { + description = "SFTP Virtual Filesystem add-on for Kodi"; + license = licenses.gpl2Plus; + platforms = platforms.all; + maintainers = with maintainers; [ minijackson ]; + }; + + extraBuildInputs = [ openssl libssh zlib ]; + }; + + vfs-libarchive = mkKodiABIPlugin rec { + namespace = "vfs.libarchive"; + version = "1.0.5"; + plugin = namespace; + + src = fetchFromGitHub { + owner = "xbmc"; + repo = namespace; + rev = "${version}-${rel}"; + sha256 = "0l1f1fijflr1ia30r0dcz1x2zn35c4lxy30az1cqxdf8nipza0b8"; + }; + + meta = with stdenv.lib; { + description = "LibArchive Virtual Filesystem add-on for Kodi"; + license = licenses.gpl2Plus; + platforms = platforms.all; + maintainers = with maintainers; [ minijackson ]; + }; + + extraBuildInputs = [ libarchive lzma bzip2 zlib lz4 lzo openssl ]; + }; +}; in self diff --git a/nixpkgs/pkgs/applications/video/kodi/wrapper.nix b/nixpkgs/pkgs/applications/video/kodi/wrapper.nix new file mode 100644 index 000000000000..6a0b1cbdf739 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/kodi/wrapper.nix @@ -0,0 +1,30 @@ +{ stdenv, lib, makeWrapper, buildEnv, kodi, plugins }: + +let + drvName = builtins.parseDrvName kodi.name; +in buildEnv { + name = "${drvName.name}-with-plugins-${drvName.version}"; + + paths = [ kodi ] ++ plugins; + pathsToLink = [ "/share" ]; + + buildInputs = [ makeWrapper ]; + + postBuild = '' + mkdir $out/bin + for exe in kodi{,-standalone} + do + makeWrapper ${kodi}/bin/$exe $out/bin/$exe \ + --prefix PYTHONPATH : ${kodi.pythonPackages.makePythonPath plugins} \ + --prefix KODI_HOME : $out/share/kodi \ + --prefix LD_LIBRARY_PATH ":" "${lib.makeLibraryPath + (stdenv.lib.concatMap + (plugin: plugin.extraRuntimeDependencies) plugins)}" + done + ''; + + meta = kodi.meta // { + description = kodi.meta.description + + " (with plugins: ${lib.concatMapStringsSep ", " (x: x.name) plugins})"; + }; +} diff --git a/nixpkgs/pkgs/applications/video/kodi/yatp/dont-monkey.patch b/nixpkgs/pkgs/applications/video/kodi/yatp/dont-monkey.patch new file mode 100644 index 000000000000..62d5d0c0d4c0 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/kodi/yatp/dont-monkey.patch @@ -0,0 +1,29 @@ +diff --git a/plugin.video.yatp/server.py b/plugin.video.yatp/server.py +index 1adcbb5..488b72c 100644 +--- a/plugin.video.yatp/server.py ++++ b/plugin.video.yatp/server.py +@@ -20,24 +20,8 @@ addon = Addon() + _ = addon.initialize_gettext() + addon.log_notice('Starting Torrent Server...') + +-# A monkey-patch to set the necessary librorrent version +-librorrent_addon = Addon('script.module.libtorrent') +-orig_custom_version = librorrent_addon.get_setting('custom_version', False) +-orig_set_version = librorrent_addon.get_setting('set_version', False) +-librorrent_addon.set_setting('custom_version', 'true') +-if addon.libtorrent_version == '1.0.9': +- librorrent_addon.set_setting('set_version', '4') +-elif addon.libtorrent_version == '1.1.0': +- librorrent_addon.set_setting('set_version', '5') +-elif addon.libtorrent_version == '1.1.1': +- librorrent_addon.set_setting('set_version', '6') +-else: +- librorrent_addon.set_setting('set_version', '0') +- + from libs.server import wsgi_app + +-librorrent_addon.set_setting('custom_version', orig_custom_version) +-librorrent_addon.set_setting('set_version', orig_set_version) + # ====== + + if addon.enable_limits: diff --git a/nixpkgs/pkgs/applications/video/lightworks/default.nix b/nixpkgs/pkgs/applications/video/lightworks/default.nix new file mode 100644 index 000000000000..6d74c64343d8 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/lightworks/default.nix @@ -0,0 +1,87 @@ +{ stdenv, fetchurl, dpkg, makeWrapper, buildFHSUserEnv +, gtk3, gdk_pixbuf, cairo, libjpeg_original, glib, gnome2, libGLU +, nvidia_cg_toolkit, zlib, openssl, portaudio +}: +let + fullPath = stdenv.lib.makeLibraryPath [ + stdenv.cc.cc + gtk3 + gdk_pixbuf + cairo + libjpeg_original + glib + gnome2.pango + libGLU + nvidia_cg_toolkit + zlib + openssl + portaudio + ]; + + lightworks = stdenv.mkDerivation rec { + version = "14.0.0"; + name = "lightworks-${version}"; + + src = + if stdenv.hostPlatform.system == "x86_64-linux" then + fetchurl { + url = "http://downloads.lwks.com/v14/lwks-14.0.0-amd64.deb"; + sha256 = "66eb9f9678d979db76199f1c99a71df0ddc017bb47dfda976b508849ab305033"; + } + else throw "${name} is not supported on ${stdenv.hostPlatform.system}"; + + buildInputs = [ dpkg makeWrapper ]; + + phases = [ "unpackPhase" "installPhase" ]; + unpackPhase = "dpkg-deb -x ${src} ./"; + + installPhase = '' + mkdir -p $out/bin + substitute usr/bin/lightworks $out/bin/lightworks \ + --replace "/usr/lib/lightworks" "$out/lib/lightworks" + chmod +x $out/bin/lightworks + + cp -r usr/lib $out + + # /usr/share/fonts is not normally searched + # This adds it to lightworks' search path while keeping the default + # using the FONTCONFIG_FILE env variable + echo "<?xml version='1.0'?> + <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> + <fontconfig> + <dir>/usr/share/fonts/truetype</dir> + <include>/etc/fonts/fonts.conf</include> + </fontconfig>" > $out/lib/lightworks/fonts.conf + + patchelf \ + --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ + $out/lib/lightworks/ntcardvt + + wrapProgram $out/lib/lightworks/ntcardvt \ + --prefix LD_LIBRARY_PATH : ${fullPath}:$out/lib/lightworks \ + --set FONTCONFIG_FILE $out/lib/lightworks/fonts.conf + + cp -r usr/share $out/share + ''; + + dontPatchELF = true; + + meta = { + description = "Professional Non-Linear Video Editor"; + homepage = "https://www.lwks.com/"; + license = stdenv.lib.licenses.unfree; + maintainers = [ stdenv.lib.maintainers.antonxy ]; + platforms = [ "x86_64-linux" ]; + }; + }; + +# Lightworks expects some files in /usr/share/lightworks +in buildFHSUserEnv rec { + name = lightworks.name; + + targetPkgs = pkgs: [ + lightworks + ]; + + runScript = "lightworks"; +} diff --git a/nixpkgs/pkgs/applications/video/linuxstopmotion/default.nix b/nixpkgs/pkgs/applications/video/linuxstopmotion/default.nix new file mode 100644 index 000000000000..717853af745c --- /dev/null +++ b/nixpkgs/pkgs/applications/video/linuxstopmotion/default.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchgit, pkgconfig, qt4, SDL, SDL_image, libvorbis, libtar, libxml2 +, gamin, qmake4Hook +}: + +stdenv.mkDerivation rec { + version = "0.8"; + name = "linuxstopmotion-${version}"; + + src = fetchgit { + url = "git://git.code.sf.net/p/linuxstopmotion/code"; + rev = "refs/tags/${version}"; + sha256 = "19v9d0v3laiwi0f1n92lvj2s5s1mxsrfygna0xyw9pkcnk3b26q6"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ qt4 SDL SDL_image libvorbis libtar libxml2 gamin qmake4Hook ]; + + patches = [ ./linuxstopmotion-fix-wrong-isProcess-logic.patch ]; + + # Installation breaks without this + preInstall = '' + mkdir -p "$out/share/stopmotion/translations/" + cp -v build/*.qm "$out/share/stopmotion/translations/" + ''; + + meta = with stdenv.lib; { + description = "Create stop-motion animation movies"; + homepage = http://linuxstopmotion.org/; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = [ maintainers.bjornfor ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/linuxstopmotion/linuxstopmotion-fix-wrong-isProcess-logic.patch b/nixpkgs/pkgs/applications/video/linuxstopmotion/linuxstopmotion-fix-wrong-isProcess-logic.patch new file mode 100644 index 000000000000..caab48d0e2d9 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/linuxstopmotion/linuxstopmotion-fix-wrong-isProcess-logic.patch @@ -0,0 +1,33 @@ +From b23b7dab1d540b0710fcb9ded1c6256a49844906 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= <bjorn.forsman@gmail.com> +Date: Wed, 20 Aug 2014 22:22:00 +0200 +Subject: [PATCH] Fix wrong "isProcess" logic + +Stopmotion wrongly thinks that uvccapture should be run as a daemon, +even though configuration for uvccapture has no "daemon-like" command +line to be run (according to "preferences"). The result is an error +popup instead of video/image grabbing. + +This brings back the "isProcess" logic that was in stopmotion v0.7.2, +because it seems to work, while the current logic (v0.8.0) seems to +fail. +--- + src/presentation/frontends/qtfrontend/frameview.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/presentation/frontends/qtfrontend/frameview.cpp b/src/presentation/frontends/qtfrontend/frameview.cpp +index e44dca7..d2c41fd 100644 +--- a/src/presentation/frontends/qtfrontend/frameview.cpp ++++ b/src/presentation/frontends/qtfrontend/frameview.cpp +@@ -270,7 +270,7 @@ bool FrameView::on() { + Preference device(QString("device%1") + .arg(activeDev).toLatin1().constData(), ""); + QString pre = QString(prepoll.get()).replace("$VIDEODEVICE", device.get()); +- bool isProcess = startDaemon.get(); ++ bool isProcess = (strcmp(startDaemon.get(), "") == 0) ? false : true; + + bool isCameraReady = true; + this->grabber = new CommandLineGrabber(capturedFile.path(), isProcess); +-- +2.0.2 + diff --git a/nixpkgs/pkgs/applications/video/lxdvdrip/default.nix b/nixpkgs/pkgs/applications/video/lxdvdrip/default.nix new file mode 100644 index 000000000000..8287a176ce63 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/lxdvdrip/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchurl, libdvdread }: + +stdenv.mkDerivation rec { + name = "lxdvdrip-1.76"; + + src = fetchurl { + url = "mirror://sourceforge/lxdvdrip/${name}.tgz"; + sha256 = "0vgslc7dapfrbgslnaicc8bggdccyrvcgjv1dwi19qswhh7jkzj6"; + }; + + prePatch = '' + sed -i -e s,/usr/local,$out, -e s,/etc,$out/etc,g Makefile + sed -i -e s,/usr/local,$out, buffer/Makefile + makeFlags="$makeFlags PREFIX=$out" + ''; + + preInstall = '' + mkdir -p $out/man/man1 $out/bin $out/share $out/etc + ''; + + buildInputs = [ libdvdread ]; + + meta = { + description = "Command line tool to make a copy from a video DVD for private use"; + homepage = https://sourceforge.net/projects/lxdvdrip; + license = stdenv.lib.licenses.gpl2; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/makemkv/builder.sh b/nixpkgs/pkgs/applications/video/makemkv/builder.sh new file mode 100644 index 000000000000..416d5c0f0b07 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/makemkv/builder.sh @@ -0,0 +1,40 @@ +source $stdenv/setup +set -x + +lib=" \ + makemkv-oss-${ver}/out/libdriveio.so.0 \ + makemkv-oss-${ver}/out/libmakemkv.so.1 \ + makemkv-oss-${ver}/out/libmmbd.so.0 \ + " + +bin=" \ + makemkv-oss-${ver}/out/makemkv \ + makemkv-bin-${ver}/bin/amd64/makemkvcon \ + " + +tar xzf ${src_bin} +tar xzf ${src_oss} + +( + cd makemkv-oss-${ver} + ./configure --prefix=$out + make +) + +chmod +x ${bin} + +libPath="${libPath}:${out}/lib" # XXX: der. This should be in the nix file? + +for i in ${bin} ; do + patchelf \ + --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ + --set-rpath $libPath \ + ${i} +done + +mkdir -p $out/bin +mkdir -p $out/lib +mkdir -p $out/share/MakeMKV +cp ${lib} ${out}/lib +cp ${bin} ${out}/bin +cp makemkv-bin-${ver}/src/share/* $out/share/MakeMKV diff --git a/nixpkgs/pkgs/applications/video/makemkv/default.nix b/nixpkgs/pkgs/applications/video/makemkv/default.nix new file mode 100644 index 000000000000..f9b5c4c01965 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/makemkv/default.nix @@ -0,0 +1,49 @@ +{ stdenv, fetchurl +, openssl, qt5, libGLU_combined, zlib, pkgconfig, libav +}: + +stdenv.mkDerivation rec { + name = "makemkv-${ver}"; + ver = "1.14.4"; + builder = ./builder.sh; + + # Using two URLs as the first one will break as soon as a new version is released + src_bin = fetchurl { + urls = [ + "http://www.makemkv.com/download/makemkv-bin-${ver}.tar.gz" + "http://www.makemkv.com/download/old/makemkv-bin-${ver}.tar.gz" + ]; + sha256 = "0vmmvldmwmq9g202abblj6l15kb8z3b0c6mcc03f30s2yci6ij33"; + }; + + src_oss = fetchurl { + urls = [ + "http://www.makemkv.com/download/makemkv-oss-${ver}.tar.gz" + "http://www.makemkv.com/download/old/makemkv-oss-${ver}.tar.gz" + ]; + sha256 = "0n1nlq17dxcbgk9xqf7nv6zykvh91yhsjqdhq55947wc11fxjqa0"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [openssl qt5.qtbase libGLU_combined zlib libav]; + + libPath = stdenv.lib.makeLibraryPath [stdenv.cc.cc openssl libGLU_combined qt5.qtbase zlib ] + + ":" + stdenv.cc.cc + "/lib64"; + + meta = with stdenv.lib; { + description = "Convert blu-ray and dvd to mkv"; + longDescription = '' + makemkv is a one-click QT application that transcodes an encrypted + blu-ray or DVD disc into a more portable set of mkv files, preserving + subtitles, chapter marks, all video and audio tracks. + + Program is time-limited -- it will stop functioning after 60 days. You + can always download the latest version from makemkv.com that will reset the + expiration date. + ''; + license = licenses.unfree; + homepage = http://makemkv.com; + platforms = [ "x86_64-linux" ]; + maintainers = [ maintainers.titanous ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/mapmap/default.nix b/nixpkgs/pkgs/applications/video/mapmap/default.nix new file mode 100644 index 000000000000..4dd2e019d1d3 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/mapmap/default.nix @@ -0,0 +1,64 @@ +{ stdenv +, fetchFromGitHub +, qttools +, qtmultimedia +, liblo +, gst_all_1 +, qmake +, pkgconfig +}: + +with stdenv; + +mkDerivation rec { + + version = "0.6.1"; + name = "mapmap-${version}"; + + src = fetchFromGitHub { + owner = "mapmapteam"; + repo = "mapmap"; + rev = version; + sha256 = "15km6xmfkxhrflq4sl9m9r85zi4shrr4k5h15x17v7x0qkc3xgsh"; + }; + + nativeBuildInputs = [ + qmake + pkgconfig + ]; + + buildInputs = [ + qttools + qtmultimedia + liblo + gst_all_1.gstreamer + gst_all_1.gstreamermm + gst_all_1.gst-libav + gst_all_1.gst-vaapi + ]; + + installPhase = '' + mkdir -p $out/bin + cp mapmap $out/bin/mapmap + mkdir -p $out/share/applications/ + sed 's|Icon=/usr/share/icons/hicolor/scalable/apps/mapmap.svg|Icon=mapmap|g' resources/texts/mapmap.desktop > $out/share/applications/mapmap.desktop + mkdir -p $out/share/icons/hicolor/scalable/apps/ + cp resources/images/logo/mapmap.* $out/share/icons/hicolor/scalable/apps/ + ''; + + # RPATH in /tmp hack + # preFixup = '' + # rm -r $NIX_BUILD_TOP/__nix_qt5__ + # ''; + + meta = with stdenv.lib; { + description = "Open source video mapping software"; + homepage = https://github.com/mapmapteam/mapmap; + license = licenses.gpl3; + maintainers = [ maintainers.erictapen ]; + platforms = platforms.linux; + # binary segfaults at the moment + broken = true; + }; + +} diff --git a/nixpkgs/pkgs/applications/video/mediathekview/default.nix b/nixpkgs/pkgs/applications/video/mediathekview/default.nix new file mode 100644 index 000000000000..cceed556f978 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/mediathekview/default.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchurl, makeWrapper, jre }: + +stdenv.mkDerivation rec { + version = "13.2.1"; + name = "mediathekview-${version}"; + src = fetchurl { + url = "https://download.mediathekview.de/stabil/MediathekView-${version}.tar.gz"; + sha256 = "11wg6klviig0h7pprfaygamsgqr7drqra2s4yxgfak6665033l2a"; + }; + + nativeBuildInputs = [ makeWrapper ]; + + installPhase = '' + mkdir -p $out/{lib,bin,share/mediathekview} + + install -m644 MediathekView.jar $out/ + install -m644 -t $out/lib lib/* + install -m755 bin/flv.sh $out/share/mediathekview + + makeWrapper ${jre}/bin/java $out/bin/mediathek \ + --add-flags "-cp '$out/lib/*' -jar $out/MediathekView.jar" + ''; + + meta = with stdenv.lib; { + description = "Offers access to the Mediathek of different tv stations (ARD, ZDF, Arte, etc.)"; + homepage = https://mediathekview.de/; + license = licenses.gpl3; + maintainers = with maintainers; [ moredread ]; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/applications/video/minitube/default.nix b/nixpkgs/pkgs/applications/video/minitube/default.nix new file mode 100644 index 000000000000..3b8dce90243b --- /dev/null +++ b/nixpkgs/pkgs/applications/video/minitube/default.nix @@ -0,0 +1,43 @@ +{ stdenv, fetchFromGitHub, makeWrapper, phonon, phonon-backend-vlc, qtbase, qmake +, qtdeclarative, qttools + +# "Free" key generated by nckx <github@tobias.gr>. I no longer have a Google +# account. You'll need to generate (and please share :-) a new one if it breaks. +, withAPIKey ? "AIzaSyBtFgbln3bu1swQC-naMxMtKh384D3xJZE" }: + +stdenv.mkDerivation rec { + name = "minitube-${version}"; + version = "2.9"; + + src = fetchFromGitHub { + sha256 = "11zkmwqadlgrrghs3rxq0h0fllfnyd3g09d7gdd6vd9r1a1yz73f"; + rev = version; + repo = "minitube"; + owner = "flaviotordini"; + }; + + buildInputs = [ phonon phonon-backend-vlc qtbase qtdeclarative qttools ]; + nativeBuildInputs = [ makeWrapper qmake ]; + + qmakeFlags = [ "DEFINES+=APP_GOOGLE_API_KEY=${withAPIKey}" ]; + + enableParallelBuilding = true; + + postInstall = '' + wrapProgram $out/bin/minitube \ + --prefix QT_PLUGIN_PATH : "${phonon-backend-vlc}/lib/qt-5.${stdenv.lib.versions.minor qtbase.version}/plugins" + ''; + + meta = with stdenv.lib; { + description = "Stand-alone YouTube video player"; + longDescription = '' + Watch YouTube videos in a new way: you type a keyword, Minitube gives + you an endless video stream. Minitube is not about cloning the YouTube + website, it aims to create a new TV-like experience. + ''; + homepage = https://flavio.tordini.org/minitube; + license = licenses.gpl3Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ ma27 ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/mjpg-streamer/default.nix b/nixpkgs/pkgs/applications/video/mjpg-streamer/default.nix new file mode 100644 index 000000000000..70dc156d6802 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/mjpg-streamer/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchFromGitHub, cmake, libjpeg }: + +stdenv.mkDerivation rec { + name = "mjpg-streamer-${version}"; + version = "unstable-2019-05-24"; + + src = fetchFromGitHub { + owner = "jacksonliam"; + repo = "mjpg-streamer"; + rev = "501f6362c5afddcfb41055f97ae484252c85c912"; + sha256 = "1cl159svfs1zzzrd3zgn4x7qy6751bvlnxfwf5hn5fmg4iszajw7"; + }; + + prePatch = '' + cd mjpg-streamer-experimental + ''; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ libjpeg ]; + + postFixup = '' + patchelf --set-rpath "$(patchelf --print-rpath $out/bin/mjpg_streamer):$out/lib/mjpg-streamer" $out/bin/mjpg_streamer + ''; + + meta = with stdenv.lib; { + homepage = "https://github.com/jacksonliam/mjpg-streamer"; + description = "MJPG-streamer takes JPGs from Linux-UVC compatible webcams, filesystem or other input plugins and streams them as M-JPEG via HTTP to webbrowsers, VLC and other software"; + platforms = platforms.linux; + license = licenses.gpl2; + maintainers = with maintainers; [ gebner ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/mkclean/default.nix b/nixpkgs/pkgs/applications/video/mkclean/default.nix new file mode 100644 index 000000000000..4a3cbc81b35e --- /dev/null +++ b/nixpkgs/pkgs/applications/video/mkclean/default.nix @@ -0,0 +1,37 @@ +{ dos2unix, fetchurl, stdenv }: + +stdenv.mkDerivation rec { + pname = "mkclean"; + version = "0.8.10"; + + hardeningDisable = [ "format" ]; + nativeBuildInputs = [ dos2unix ]; + + src = fetchurl { + url = "mirror://sourceforge/matroska/${pname}-${version}.tar.bz2"; + sha256 = "0zbpi4sm68zb20d53kbss93fv4aafhcmz7dsd0zdf01vj1r3wxwn"; + }; + + configurePhase = '' + dos2unix ./mkclean/configure.compiled + ./mkclean/configure.compiled + ''; + + buildPhase = '' + make -C mkclean + ''; + + installPhase = '' + mkdir -p $out/{bin,lib} + mv release/gcc_linux_*/*.* $out/lib + mv release/gcc_linux_*/* $out/bin + ''; + + meta = with stdenv.lib; { + description = "mkclean is a command line tool to clean and optimize Matroska (.mkv / .mka / .mks / .mk3d) and WebM (.webm / .weba) files that have already been muxed."; + homepage = "https://www.matroska.org"; + license = licenses.bsdOriginal; + maintainers = with maintainers; [ chrisaw ]; + platforms = [ "i686-linux" "x86_64-linux" ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/mkvtoolnix/default.nix b/nixpkgs/pkgs/applications/video/mkvtoolnix/default.nix new file mode 100644 index 000000000000..c13bf3480d25 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/mkvtoolnix/default.nix @@ -0,0 +1,60 @@ +{ stdenv, fetchFromGitLab, pkgconfig, autoconf, automake, libiconv, drake +, ruby, docbook_xsl, file, xdg_utils, gettext, expat, boost, libebml, zlib +, fmt, libmatroska, libogg, libvorbis, flac, libxslt, cmark +, withGUI ? true + , qtbase ? null + , qtmultimedia ? null +}: + +assert withGUI -> qtbase != null && qtmultimedia != null; + +with stdenv.lib; + +stdenv.mkDerivation rec { + pname = "mkvtoolnix"; + version = "35.0.0"; + + src = fetchFromGitLab { + owner = "mbunkus"; + repo = "mkvtoolnix"; + rev = "release-${version}"; + sha256 = "163msz6l1d5vwirr1c6cm820kwxcjinwh91svf8ddg5181nwhmrx"; + }; + + nativeBuildInputs = [ + pkgconfig autoconf automake gettext + drake ruby docbook_xsl libxslt + ]; + + buildInputs = [ + expat file xdg_utils boost libebml zlib fmt + libmatroska libogg libvorbis flac cmark + ] ++ optional stdenv.isDarwin libiconv + ++ optionals withGUI [ qtbase qtmultimedia ]; + + preConfigure = "./autogen.sh; patchShebangs ."; + buildPhase = "drake -j $NIX_BUILD_CORES"; + installPhase = "drake install -j $NIX_BUILD_CORES"; + + configureFlags = [ + "--enable-magic" + "--enable-optimization" + "--with-boost-libdir=${boost.out}/lib" + "--disable-debug" + "--disable-profiling" + "--disable-precompiled-headers" + "--disable-static-qt" + "--with-gettext" + "--with-docbook-xsl-root=${docbook_xsl}/share/xml/docbook-xsl" + (enableFeature withGUI "qt") + ]; + + meta = with stdenv.lib; { + description = "Cross-platform tools for Matroska"; + homepage = http://www.bunkus.org/videotools/mkvtoolnix/; + license = licenses.gpl2; + maintainers = with maintainers; [ codyopel fuuzetsu rnhmjoj ]; + platforms = platforms.linux + ++ optionals (!withGUI) platforms.darwin; + }; +} diff --git a/nixpkgs/pkgs/applications/video/motion/default.nix b/nixpkgs/pkgs/applications/video/motion/default.nix new file mode 100644 index 000000000000..e3dcf6b3d3b3 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/motion/default.nix @@ -0,0 +1,25 @@ +{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig +, ffmpeg, libjpeg, libmicrohttpd }: + +stdenv.mkDerivation rec { + name = "motion-${version}"; + version = "4.2.2"; + + src = fetchFromGitHub { + owner = "Motion-Project"; + repo = "motion"; + rev = "release-${version}"; + sha256 = "05c1gx75xy2hw49x6vkydvwxbr80kipsc3nr906k3hq8735svx6f"; + }; + + nativeBuildInputs = [ autoreconfHook pkgconfig ]; + + buildInputs = [ ffmpeg libjpeg libmicrohttpd ]; + + meta = with stdenv.lib; { + description = "Monitors the video signal from cameras"; + homepage = https://motion-project.github.io/; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ puffnfresh veprbl ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/mpc-qt/default.nix b/nixpkgs/pkgs/applications/video/mpc-qt/default.nix new file mode 100644 index 000000000000..81b48e25b96b --- /dev/null +++ b/nixpkgs/pkgs/applications/video/mpc-qt/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchFromGitHub, pkgconfig, qmake, qtx11extras, qttools, mpv }: + +stdenv.mkDerivation rec { + name = "mpc-qt-${version}"; + version = "18.08"; + + src = fetchFromGitHub { + owner = "cmdrkotori"; + repo = "mpc-qt"; + rev = "v${version}"; + sha256 = "1rxlkg3vsrapazdlb1i6c5a1vvf2114bsqwzcm3n2wc5c93yqsna"; + }; + + nativeBuildInputs = [ pkgconfig qmake qttools ]; + + buildInputs = [ mpv qtx11extras ]; + + qmakeFlags = [ "QMAKE_LUPDATE=${qttools.dev}/bin/lupdate" ]; + + meta = with stdenv.lib; { + description = "Media Player Classic Qute Theater"; + homepage = https://github.com/cmdrkotori/mpc-qt; + license = licenses.gpl2; + platforms = platforms.unix; + maintainers = with maintainers; [ romildo ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/mplayer/default.nix b/nixpkgs/pkgs/applications/video/mplayer/default.nix new file mode 100644 index 000000000000..c77486a30cf1 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/mplayer/default.nix @@ -0,0 +1,223 @@ +{ config, stdenv, fetchurl, pkgconfig, freetype, yasm, ffmpeg +, aalibSupport ? true, aalib ? null +, fontconfigSupport ? true, fontconfig ? null, freefont_ttf ? null +, fribidiSupport ? true, fribidi ? null +, x11Support ? true, libX11 ? null, libXext ? null, libGLU_combined ? null +, xineramaSupport ? true, libXinerama ? null +, xvSupport ? true, libXv ? null +, alsaSupport ? stdenv.isLinux, alsaLib ? null +, screenSaverSupport ? true, libXScrnSaver ? null +, vdpauSupport ? false, libvdpau ? null +, cddaSupport ? !stdenv.isDarwin, cdparanoia ? null +, dvdnavSupport ? !stdenv.isDarwin, libdvdnav ? null +, dvdreadSupport ? true, libdvdread ? null +, bluraySupport ? true, libbluray ? null +, amrSupport ? false, amrnb ? null, amrwb ? null +, cacaSupport ? true, libcaca ? null +, lameSupport ? true, lame ? null +, speexSupport ? true, speex ? null +, theoraSupport ? true, libtheora ? null +, x264Support ? false, x264 ? null +, jackaudioSupport ? false, libjack2 ? null +, pulseSupport ? config.pulseaudio or false, libpulseaudio ? null +, bs2bSupport ? false, libbs2b ? null +# For screenshots +, libpngSupport ? true, libpng ? null +, libjpegSupport ? true, libjpeg ? null +, useUnfreeCodecs ? false +, darwin ? null +, buildPackages +}: + +assert fontconfigSupport -> (fontconfig != null); +assert (!fontconfigSupport) -> (freefont_ttf != null); +assert fribidiSupport -> (fribidi != null); +assert x11Support -> (libX11 != null && libXext != null && libGLU_combined != null); +assert xineramaSupport -> (libXinerama != null && x11Support); +assert xvSupport -> (libXv != null && x11Support); +assert alsaSupport -> alsaLib != null; +assert screenSaverSupport -> libXScrnSaver != null; +assert vdpauSupport -> libvdpau != null; +assert cddaSupport -> cdparanoia != null; +assert dvdnavSupport -> libdvdnav != null; +assert dvdreadSupport -> libdvdread != null; +assert bluraySupport -> libbluray != null; +assert amrSupport -> (amrnb != null && amrwb != null); +assert cacaSupport -> libcaca != null; +assert lameSupport -> lame != null; +assert speexSupport -> speex != null; +assert theoraSupport -> libtheora != null; +assert x264Support -> x264 != null; +assert jackaudioSupport -> libjack2 != null; +assert pulseSupport -> libpulseaudio != null; +assert bs2bSupport -> libbs2b != null; +assert libpngSupport -> libpng != null; +assert libjpegSupport -> libjpeg != null; + +let + + codecs_src = + let + dir = http://www.mplayerhq.hu/MPlayer/releases/codecs/; + in + if stdenv.hostPlatform.system == "i686-linux" then fetchurl { + url = "${dir}/essential-20071007.tar.bz2"; + sha256 = "18vls12n12rjw0mzw4pkp9vpcfmd1c21rzha19d7zil4hn7fs2ic"; + } else if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { + url = "${dir}/essential-amd64-20071007.tar.bz2"; + sha256 = "13xf5b92w1ra5hw00ck151lypbmnylrnznq9hhb0sj36z5wz290x"; + } else if stdenv.hostPlatform.system == "powerpc-linux" then fetchurl { + url = "${dir}/essential-ppc-20071007.tar.bz2"; + sha256 = "18mlj8dp4wnz42xbhdk1jlz2ygra6fbln9wyrcyvynxh96g1871z"; + } else null; + + codecs = if codecs_src != null then stdenv.mkDerivation { + name = "MPlayer-codecs-essential-20071007"; + + src = codecs_src; + + installPhase = '' + mkdir $out + cp -prv * $out + ''; + + meta.license = stdenv.lib.licenses.unfree; + } else null; + + crossBuild = stdenv.hostPlatform != stdenv.buildPlatform; + +in + +stdenv.mkDerivation rec { + name = "mplayer-1.3.0"; + + src = fetchurl { + url = "http://www.mplayerhq.hu/MPlayer/releases/MPlayer-1.3.0.tar.xz"; + sha256 = "0hwqn04bdknb2ic88xd75smffxx63scvz0zvwvjb56nqj9n89l1s"; + }; + + prePatch = '' + sed -i /^_install_strip/d configure + + rm -rf ffmpeg + ''; + + depsBuildBuild = [ buildPackages.stdenv.cc ]; + nativeBuildInputs = [ pkgconfig yasm ]; + buildInputs = with stdenv.lib; + [ freetype ffmpeg ] + ++ optional aalibSupport aalib + ++ optional fontconfigSupport fontconfig + ++ optional fribidiSupport fribidi + ++ optionals x11Support [ libX11 libXext libGLU_combined ] + ++ optional alsaSupport alsaLib + ++ optional xvSupport libXv + ++ optional theoraSupport libtheora + ++ optional cacaSupport libcaca + ++ optional xineramaSupport libXinerama + ++ optional dvdnavSupport libdvdnav + ++ optional dvdreadSupport libdvdread + ++ optional bluraySupport libbluray + ++ optional cddaSupport cdparanoia + ++ optional jackaudioSupport libjack2 + ++ optionals amrSupport [ amrnb amrwb ] + ++ optional x264Support x264 + ++ optional pulseSupport libpulseaudio + ++ optional screenSaverSupport libXScrnSaver + ++ optional lameSupport lame + ++ optional vdpauSupport libvdpau + ++ optional speexSupport speex + ++ optional libpngSupport libpng + ++ optional libjpegSupport libjpeg + ++ optional bs2bSupport libbs2b + ++ (with darwin.apple_sdk.frameworks; optionals stdenv.isDarwin [ Cocoa OpenGL ]) + ; + + configurePlatforms = [ ]; + configureFlags = with stdenv.lib; [ + "--enable-freetype" + (if fontconfigSupport then "--enable-fontconfig" else "--disable-fontconfig") + (if x11Support then "--enable-x11 --enable-gl" else "--disable-x11 --disable-gl") + (if xineramaSupport then "--enable-xinerama" else "--disable-xinerama") + (if xvSupport then "--enable-xv" else "--disable-xv") + (if alsaSupport then "--enable-alsa" else "--disable-alsa") + (if screenSaverSupport then "--enable-xss" else "--disable-xss") + (if vdpauSupport then "--enable-vdpau" else "--disable-vdpau") + (if cddaSupport then "--enable-cdparanoia" else "--disable-cdparanoia") + (if dvdnavSupport then "--enable-dvdnav" else "--disable-dvdnav") + (if bluraySupport then "--enable-bluray" else "--disable-bluray") + (if amrSupport then "--enable-libopencore_amrnb" else "--disable-libopencore_amrnb") + (if cacaSupport then "--enable-caca" else "--disable-caca") + (if lameSupport then "--enable-mp3lame --disable-mp3lame-lavc" else "--disable-mp3lame --enable-mp3lame-lavc") + (if speexSupport then "--enable-speex" else "--disable-speex") + (if theoraSupport then "--enable-theora" else "--disable-theora") + (if x264Support then "--enable-x264 --disable-x264-lavc" else "--disable-x264 --enable-x264-lavc") + (if jackaudioSupport then "" else "--disable-jack") + (if pulseSupport then "--enable-pulse" else "--disable-pulse") + "--disable-xanim" + "--disable-ivtv" + "--disable-xvid --disable-xvid-lavc" + "--disable-ossaudio" + "--disable-ffmpeg_a" + "--yasm=${buildPackages.yasm}/bin/yasm" + # Note, the `target` vs `host` confusion is intensional. + "--target=${stdenv.hostPlatform.config}" + ] ++ optional + (useUnfreeCodecs && codecs != null && !crossBuild) + "--codecsdir=${codecs}" + ++ optional + ((stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isx86_64) && !crossBuild) + "--enable-runtime-cpudetection" + ++ optional fribidiSupport "--enable-fribidi" + ++ optional stdenv.isLinux "--enable-vidix" + ++ optional stdenv.isLinux "--enable-fbdev" + ++ optionals (crossBuild) [ + "--enable-cross-compile" + "--disable-vidix-pcidb" + "--with-vidix-drivers=no" + ]; + + preConfigure = '' + configureFlagsArray+=( + "--cc=$CC" + "--host-cc=$BUILD_CC" + "--as=$AS" + "--nm=$NM" + "--ar=$AR" + "--ranlib=$RANLIB" + "--windres=$WINDRES" + ) + ''; + + postConfigure = '' + echo CONFIG_MPEGAUDIODSP=yes >> config.mak + ''; + + NIX_LDFLAGS = with stdenv.lib; + optional fontconfigSupport "-lfontconfig" + ++ optional fribidiSupport "-lfribidi" + ++ optionals x11Support [ "-lX11" "-lXext" ] + ; + + installTargets = [ "install" ] ++ stdenv.lib.optional x11Support "install-gui"; + + enableParallelBuilding = true; + + # Provide a reasonable standard font when not using fontconfig. Maybe we should symlink here. + postInstall = stdenv.lib.optionalString (!fontconfigSupport) + '' + mkdir -p $out/share/mplayer + cp ${freefont_ttf}/share/fonts/truetype/FreeSans.ttf $out/share/mplayer/subfont.ttf + if test -f $out/share/applications/mplayer.desktop ; then + echo "NoDisplay=True" >> $out/share/applications/mplayer.desktop + fi + ''; + + meta = { + description = "A movie player that supports many video formats"; + homepage = http://mplayerhq.hu; + license = "GPL"; + maintainers = [ stdenv.lib.maintainers.eelco ]; + platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin; + }; +} diff --git a/nixpkgs/pkgs/applications/video/mpv/default.nix b/nixpkgs/pkgs/applications/video/mpv/default.nix new file mode 100644 index 000000000000..dcfeae52aae4 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/mpv/default.nix @@ -0,0 +1,230 @@ +{ config, stdenv, fetchurl, fetchFromGitHub, makeWrapper +, docutils, perl, pkgconfig, python3, which, ffmpeg_4 +, freefont_ttf, freetype, libass, libpthreadstubs, mujs +, nv-codec-headers, lua, libuchardet, libiconv ? null, darwin + +, waylandSupport ? stdenv.isLinux + , wayland ? null + , wayland-protocols ? null + , libxkbcommon ? null + +, x11Support ? stdenv.isLinux + , libGLU_combined ? null + , libX11 ? null + , libXext ? null + , libXxf86vm ? null + , libXrandr ? null + +, cddaSupport ? false + , libcdio ? null + , libcdio-paranoia ? null + +, vulkanSupport ? stdenv.isLinux + , shaderc ? null + , vulkan-headers ? null + , vulkan-loader ? null + +, alsaSupport ? stdenv.isLinux, alsaLib ? null +, bluraySupport ? true, libbluray ? null +, bs2bSupport ? true, libbs2b ? null +, cacaSupport ? true, libcaca ? null +, cmsSupport ? true, lcms2 ? null +, drmSupport ? stdenv.isLinux, libdrm ? null +, dvdnavSupport ? stdenv.isLinux, libdvdnav ? null +, dvdreadSupport ? stdenv.isLinux, libdvdread ? null +, libpngSupport ? true, libpng ? null +, pulseSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio ? null +, rubberbandSupport ? stdenv.isLinux, rubberband ? null +, screenSaverSupport ? true, libXScrnSaver ? null +, sdl2Support ? true, SDL2 ? null +, speexSupport ? true, speex ? null +, theoraSupport ? true, libtheora ? null +, vaapiSupport ? stdenv.isLinux, libva ? null +, vdpauSupport ? true, libvdpau ? null +, xineramaSupport ? stdenv.isLinux, libXinerama ? null +, xvSupport ? stdenv.isLinux, libXv ? null +, youtubeSupport ? true, youtube-dl ? null +, archiveSupport ? false, libarchive ? null +, jackaudioSupport ? false, libjack2 ? null +, openalSupport ? false, openalSoft ? null +, vapoursynthSupport ? false, vapoursynth ? null +}: + +with stdenv.lib; + +let + available = x: x != null; +in +assert alsaSupport -> available alsaLib; +assert archiveSupport -> available libarchive; +assert bluraySupport -> available libbluray; +assert bs2bSupport -> available libbs2b; +assert cacaSupport -> available libcaca; +assert cddaSupport -> all available [libcdio libcdio-paranoia]; +assert cmsSupport -> available lcms2; +assert drmSupport -> available libdrm; +assert dvdnavSupport -> available libdvdnav; +assert dvdreadSupport -> available libdvdread; +assert jackaudioSupport -> available libjack2; +assert libpngSupport -> available libpng; +assert openalSupport -> available openalSoft; +assert pulseSupport -> available libpulseaudio; +assert rubberbandSupport -> available rubberband; +assert screenSaverSupport -> available libXScrnSaver; +assert sdl2Support -> available SDL2; +assert speexSupport -> available speex; +assert theoraSupport -> available libtheora; +assert vaapiSupport -> available libva; +assert vapoursynthSupport -> available vapoursynth; +assert vdpauSupport -> available libvdpau; +assert waylandSupport -> all available [ wayland wayland-protocols libxkbcommon ]; +assert x11Support -> all available [ libGLU_combined libX11 libXext libXxf86vm libXrandr ]; +assert xineramaSupport -> x11Support && available libXinerama; +assert xvSupport -> x11Support && available libXv; +assert youtubeSupport -> available youtube-dl; + +let + # Purity: Waf is normally downloaded by bootstrap.py, but + # for purity reasons this behavior should be avoided. + wafVersion = "2.0.9"; + waf = fetchurl { + urls = [ "https://waf.io/waf-${wafVersion}" + "http://www.freehackers.org/~tnagy/release/waf-${wafVersion}" ]; + sha256 = "0j7sbn3w6bgslvwwh5v9527w3gi2sd08kskrgxamx693y0b0i3ia"; + }; + luaEnv = lua.withPackages(ps: with ps; [ luasocket ]); + +in stdenv.mkDerivation rec { + name = "mpv-${version}"; + version = "0.29.1"; + + src = fetchFromGitHub { + owner = "mpv-player"; + repo = "mpv"; + rev = "v${version}"; + sha256 = "138921kx8g6qprim558xin09xximjhsj9ss8b71ifg2m6kclym8m"; + }; + + postPatch = '' + patchShebangs ./TOOLS/ + ''; + + NIX_LDFLAGS = optionalString x11Support "-lX11 -lXext " + + optionalString stdenv.isDarwin "-framework CoreFoundation"; + + configureFlags = [ + "--enable-libmpv-shared" + "--enable-manpage-build" + "--enable-zsh-comp" + "--disable-libmpv-static" + "--disable-static-build" + "--disable-build-date" # Purity + "--disable-macos-cocoa-cb" # Disable whilst Swift isn't supported + (enableFeature archiveSupport "libarchive") + (enableFeature cddaSupport "cdda") + (enableFeature dvdnavSupport "dvdnav") + (enableFeature dvdreadSupport "dvdread") + (enableFeature openalSupport "openal") + (enableFeature vaapiSupport "vaapi") + (enableFeature waylandSupport "wayland") + (enableFeature stdenv.isLinux "dvbin") + ]; + + configurePhase = '' + python3 ${waf} configure --prefix=$out $configureFlags + ''; + + nativeBuildInputs = [ + docutils makeWrapper perl + pkgconfig python3 which + ]; + + buildInputs = [ + ffmpeg_4 freetype libass libpthreadstubs + luaEnv libuchardet mujs + ] ++ optional alsaSupport alsaLib + ++ optional archiveSupport libarchive + ++ optional bluraySupport libbluray + ++ optional bs2bSupport libbs2b + ++ optional cacaSupport libcaca + ++ optional cmsSupport lcms2 + ++ optional drmSupport libdrm + ++ optional dvdreadSupport libdvdread + ++ optional jackaudioSupport libjack2 + ++ optional libpngSupport libpng + ++ optional openalSupport openalSoft + ++ optional pulseSupport libpulseaudio + ++ optional rubberbandSupport rubberband + ++ optional screenSaverSupport libXScrnSaver + ++ optional sdl2Support SDL2 + ++ optional speexSupport speex + ++ optional theoraSupport libtheora + ++ optional vaapiSupport libva + ++ optional vapoursynthSupport vapoursynth + ++ optional vdpauSupport libvdpau + ++ optional xineramaSupport libXinerama + ++ optional xvSupport libXv + ++ optional youtubeSupport youtube-dl + ++ optional stdenv.isDarwin libiconv + ++ optional stdenv.isLinux nv-codec-headers + ++ optionals cddaSupport [ libcdio libcdio-paranoia ] + ++ optionals dvdnavSupport [ libdvdnav libdvdnav.libdvdread ] + ++ optionals waylandSupport [ wayland wayland-protocols libxkbcommon ] + ++ optionals x11Support [ libX11 libXext libGLU_combined libXxf86vm libXrandr ] + ++ optionals vulkanSupport [ shaderc vulkan-headers vulkan-loader ] + ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + CoreFoundation Cocoa CoreAudio + ]); + + enableParallelBuilding = true; + + buildPhase = '' + python3 ${waf} build + '' + optionalString stdenv.isDarwin '' + python3 TOOLS/osxbundle.py -s build/mpv + ''; + + # Ensure youtube-dl is available in $PATH for mpv + wrapperFlags = + + ''--prefix PATH : "${luaEnv}/bin" \'' + + optionalString youtubeSupport '' + --prefix PATH : "${youtube-dl}/bin" \ + '' + optionalString vapoursynthSupport '' + --prefix PYTHONPATH : "${vapoursynth}/lib/${python3.libPrefix}/site-packages:$PYTHONPATH" + ''; + + installPhase = '' + python3 ${waf} install + + # Use a standard font + mkdir -p $out/share/mpv + ln -s ${freefont_ttf}/share/fonts/truetype/FreeSans.ttf $out/share/mpv/subfont.ttf + wrapProgram "$out/bin/mpv" \ + ${wrapperFlags} + + cp TOOLS/umpv $out/bin + wrapProgram $out/bin/umpv \ + --set MPV "$out/bin/mpv" + + '' + optionalString stdenv.isDarwin '' + mkdir -p $out/Applications + cp -r build/mpv.app $out/Applications + wrapProgram "$out/Applications/mpv.app/Contents/MacOS/mpv" \ + ${wrapperFlags} + ''; + + meta = with stdenv.lib; { + description = "A media player that supports many video formats (MPlayer and mplayer2 fork)"; + homepage = https://mpv.io; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ AndersonTorres fuuzetsu fpletz ]; + platforms = platforms.darwin ++ platforms.linux; + + longDescription = '' + mpv is a free and open-source general-purpose video player, + based on the MPlayer and mplayer2 projects, with great + improvements above both. + ''; + }; +} diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/convert.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/convert.nix new file mode 100644 index 000000000000..faa21326fc0e --- /dev/null +++ b/nixpkgs/pkgs/applications/video/mpv/scripts/convert.nix @@ -0,0 +1,40 @@ +{ stdenv, fetchgit, lib +, yad, mkvtoolnix-cli, libnotify }: + +stdenv.mkDerivation { + name = "mpv-convert-script-2016-03-18.lua"; + src = fetchgit { + url = "https://gist.github.com/Zehkul/25ea7ae77b30af959be0"; + rev = "f95cee43e390e843a47e8ec9d1711a12a8cd343d"; + sha256 = "13m7l4sy2r8jv2sfrb3vvqvnim4a9ilnv28q5drlg09v298z3mck"; + }; + + patches = [ ./convert.patch ]; + + postPatch = + let + t = k: v: '' 'local ${k} = "${v}"' ''; + subs = var: orig: repl: "--replace " + t var orig + t var repl; + in '' + substituteInPlace convert_script.lua \ + ${subs "NOTIFY_CMD" "notify-send" "${libnotify}/bin/notify-send"} \ + ${subs "YAD_CMD" "yad" "${yad}/bin/yad"} \ + ${subs "MKVMERGE_CMD" "mkvmerge" "${mkvtoolnix-cli}/bin/mkvmerge"} + ''; + + dontBuild = true; + installPhase = '' + cp convert_script.lua $out + ''; + + meta = { + description = "Convert parts of a video while you are watching it in mpv"; + homepage = https://gist.github.com/Zehkul/25ea7ae77b30af959be0; + maintainers = [ lib.maintainers.Profpatsch ]; + longDescription = '' + When this script is loaded into mpv, you can hit Alt+W to mark the beginning + and Alt+W again to mark the end of the clip. Then a settings window opens. + ''; + }; +} + diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/convert.patch b/nixpkgs/pkgs/applications/video/mpv/scripts/convert.patch new file mode 100644 index 000000000000..82171210b415 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/mpv/scripts/convert.patch @@ -0,0 +1,67 @@ +--- convert/convert_script.lua 2016-03-18 19:30:49.675401969 +0100 ++++ convert_script.lua 2016-03-19 01:18:00.801897043 +0100 +@@ -3,6 +3,10 @@ + local opt = require 'mp.options' + local utils = require 'mp.utils' + ++local NOTIFY_CMD = "notify-send" ++local YAD_CMD = "yad" ++local MKVMERGE_CMD = "mkvmerge" ++ + -- default options, convert_script.conf is read + local options = { + bitrate_multiplier = 0.975, -- to make sure the file won’t go over the target file size, set it to 1 if you don’t care +@@ -247,12 +247,12 @@ + if string.len(vf) > 0 then + vf = vf .. "," + end +- local sub_file_table = mp.get_property_native("options/sub-file") ++ local sub_file_table = mp.get_property_native("options/sub-files") + local sub_file = "" + for index, param in pairs(sub_file_table) do + sub_file = sub_file .. " --sub-file='" .. string.gsub(tostring(param), "'", "'\\''") .. "'" + end +- local audio_file_table = mp.get_property_native("options/audio-file") ++ local audio_file_table = mp.get_property_native("options/audio-files") + local audio_file = "" + for index, param in pairs(audio_file_table) do + audio_file = audio_file .. " --audio-file='" .. string.gsub(tostring(param), "'", "'\\''") .. "'" +@@ -354,9 +358,9 @@ + if ovc == "gif" then + full_command = full_command .. ' --vf-add=lavfi=graph=\\"framestep=' .. framestep .. '\\" && convert ' + .. tmpfolder .. '/*.png -set delay ' .. delay .. ' -loop 0 -fuzz ' .. fuzz .. '% ' .. dither .. ' -layers optimize ' +- .. full_output_path .. ' && rm -rf ' .. tmpfolder .. ' && notify-send "Gif done") & disown' ++ .. full_output_path .. ' && rm -rf ' .. tmpfolder .. ' && ' .. NOTIFY_CMD .. ' "Gif done") & disown' + else +- full_command = full_command .. ' && notify-send "Encoding done"; mkvpropedit ' ++ full_command = full_command .. ' && ' .. NOTIFY_CMD .. ' "Encoding done"; mkvpropedit ' + .. full_output_path .. ' -s title="' .. metadata_title .. '") & disown' + end + +@@ -409,7 +413,7 @@ + sep = ",+" + + if enc then +- local command = "mkvmerge '" .. video .. "' " .. mkvmerge_parts .. " -o " .. full_output_path ++ local command = MKVMERGE_CMD .. " '" .. video .. "' " .. mkvmerge_parts .. " -o " .. full_output_path + msg.info(command) + os.execute(command) + clear() +@@ -508,7 +512,7 @@ + end + + +- local yad_command = [[LC_NUMERIC=C yad --title="Convert Script" --center --form --fixed --always-print-result \ ++ local yad_command = [[LC_NUMERIC=C ]] .. YAD_CMD .. [[ --title="Convert Script" --center --form --fixed --always-print-result \ + --name "convert script" --class "Convert Script" --field="Resize to height:NUM" "]] .. scale_sav --yad_table 1 + .. [[" --field="Resize to width instead:CHK" ]] .. resize_to_width_instead .. " " --yad_table 2 + if options.legacy_yad then +@@ -543,7 +547,7 @@ + yad_command = yad_command .. [[ --button="Crop:1" --button="gtk-cancel:2" --button="gtk-ok:0"; ret=$? && echo $ret]] + + if gif_dialog then +- yad_command = [[echo $(LC_NUMERIC=C yad --title="Gif settings" --name "convert script" --class "Convert Script" \ ++ yad_command = [[echo $(LC_NUMERIC=C ]] .. YAD_CMD .. [[ --title="Gif settings" --name "convert script" --class "Convert Script" \ + --center --form --always-print-result --separator="…" \ + --field="Fuzz Factor:NUM" '1!0..100!0.5!1' \ + --field="Framestep:NUM" '3!1..3!1' \ diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/mpris.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/mpris.nix new file mode 100644 index 000000000000..778dc52d96a1 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/mpv/scripts/mpris.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchFromGitHub, pkgconfig, gobject-introspection, mpv }: + +stdenv.mkDerivation rec { + name = "mpv-mpris-${version}.so"; + version = "0.2"; + + src = fetchFromGitHub { + owner = "hoyon"; + repo = "mpv-mpris"; + rev = version; + sha256 = "06hq3j1jjlaaz9ss5l7illxz8vm5bng86jl24kawglwkqayhdnjx"; + }; + + nativeBuildInputs = [ pkgconfig ]; + + buildInputs = [ gobject-introspection mpv ]; + + installPhase = '' + cp mpris.so $out + ''; + + meta = with stdenv.lib; { + description = "MPRIS plugin for mpv"; + homepage = https://github.com/hoyon/mpv-mpris; + license = licenses.mit; + maintainers = with maintainers; [ jfrankenau ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/mpv/wrapper.nix b/nixpkgs/pkgs/applications/video/mpv/wrapper.nix new file mode 100644 index 000000000000..624c06414fd3 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/mpv/wrapper.nix @@ -0,0 +1,14 @@ +{ stdenv, symlinkJoin, makeWrapper, mpv, scripts ? [] }: + +symlinkJoin { + name = "mpv-with-scripts-${mpv.version}"; + + paths = [ mpv ]; + + buildInputs = [ makeWrapper ]; + + postBuild = '' + wrapProgram $out/bin/mpv \ + --add-flags "${stdenv.lib.concatMapStringsSep " " (x: "--script=" + x) scripts}" + ''; +} diff --git a/nixpkgs/pkgs/applications/video/mythtv/default.nix b/nixpkgs/pkgs/applications/video/mythtv/default.nix new file mode 100644 index 000000000000..74167a67bd2b --- /dev/null +++ b/nixpkgs/pkgs/applications/video/mythtv/default.nix @@ -0,0 +1,46 @@ +{ stdenv, fetchFromGitHub, which, qtbase, qtwebkit, qtscript, xlibsWrapper +, libpulseaudio, fftwSinglePrec , lame, zlib, libGLU_combined, alsaLib, freetype +, perl, pkgconfig , libX11, libXv, libXrandr, libXvMC, libXinerama, libXxf86vm +, libXmu , yasm, libuuid, taglib, libtool, autoconf, automake, file, exiv2 +, linuxHeaders, fetchpatch +}: + +stdenv.mkDerivation rec { + name = "mythtv-${version}"; + version = "29.1"; + + src = fetchFromGitHub { + owner = "MythTV"; + repo = "mythtv"; + rev = "v${version}"; + sha256 = "0pjxv4bmq8h285jsr02svgaa03614arsyk12fn9d4rndjsi2cc3x"; + }; + + patches = [ + # Fixes build with exiv2 0.27.1. + (fetchpatch { + name = "004-exiv2.patch"; + url = "https://aur.archlinux.org/cgit/aur.git/plain/004-exiv2.patch?h=mythtv&id=76ea37f8556805b205878772ad7874e487c0d946"; + sha256 = "0mh542f53qgky0w3s2bv0gmcxzvmb10834z3cfff40fby2ffr6k8"; + }) + ]; + + setSourceRoot = ''sourceRoot=$(echo */mythtv)''; + + buildInputs = [ + freetype qtbase qtwebkit qtscript lame zlib xlibsWrapper libGLU_combined + perl alsaLib libpulseaudio fftwSinglePrec libX11 libXv libXrandr libXvMC + libXmu libXinerama libXxf86vm libXmu libuuid taglib exiv2 + ]; + nativeBuildInputs = [ pkgconfig which yasm libtool autoconf automake file ]; + + configureFlags = [ "--dvb-path=${linuxHeaders}/include" ]; + + meta = with stdenv.lib; { + homepage = https://www.mythtv.org/; + description = "Open Source DVR"; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = [ maintainers.titanous ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/natron/config.pri b/nixpkgs/pkgs/applications/video/natron/config.pri new file mode 100644 index 000000000000..c0d236c6b975 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/natron/config.pri @@ -0,0 +1,20 @@ +boost: LIBS += -lboost_serialization +expat: LIBS += -lexpat +expat: PKGCONFIG -= expat +cairo { + PKGCONFIG += cairo + LIBS -= $$system(pkg-config --variable=libdir cairo)/libcairo.a +} +pyside { + PKGCONFIG -= pyside + INCLUDEPATH += $$system(pkg-config --variable=includedir pyside) + INCLUDEPATH += $$system(pkg-config --variable=includedir pyside)/QtCore + INCLUDEPATH += $$system(pkg-config --variable=includedir pyside)/QtGui + INCLUDEPATH += $$system(pkg-config --variable=includedir QtGui) + LIBS += -lpyside-python2.7 +} +shiboken { + PKGCONFIG -= shiboken + INCLUDEPATH += $$system(pkg-config --variable=includedir shiboken) + LIBS += -lshiboken-python2.7 +} diff --git a/nixpkgs/pkgs/applications/video/natron/default.nix b/nixpkgs/pkgs/applications/video/natron/default.nix new file mode 100644 index 000000000000..6299cd7e5937 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/natron/default.nix @@ -0,0 +1,129 @@ +{ lib, stdenv, fetchurl, qt4, pkgconfig, boost, expat, cairo, python2Packages, + cmake, flex, bison, pango, librsvg, librevenge, libxml2, libcdr, libzip, + poppler, imagemagick, openexr, ffmpeg, opencolorio, openimageio, + qmake4Hook, libpng, libGL, lndir }: + +let + minorVersion = "2.1"; + version = "${minorVersion}.9"; + OpenColorIO-Configs = fetchurl { + url = "https://github.com/MrKepzie/OpenColorIO-Configs/archive/Natron-v${minorVersion}.tar.gz"; + sha256 = "9eec5a02ca80c9cd8e751013cb347ea982fdddd592a4a9215cce462e332dac51"; + }; + seexpr = stdenv.mkDerivation rec { + version = "1.0.1"; + name = "seexpr-${version}"; + src = fetchurl { + url = "https://github.com/wdas/SeExpr/archive/rel-${version}.tar.gz"; + sha256 = "1ackh0xs4ip7mk34bam8zd4qdymkdk0dgv8x0f2mf6gbyzzyh7lp"; + }; + nativeBuildInputs = [ cmake ]; + buildInputs = [ libpng flex bison ]; + }; + buildPlugin = { pluginName, sha256, nativeBuildInputs ? [], buildInputs ? [], preConfigure ? "" }: + stdenv.mkDerivation { + name = "openfx-${pluginName}-${version}"; + src = fetchurl { + url = "https://github.com/MrKepzie/Natron/releases/download/${version}/openfx-${pluginName}-${version}.tar.xz"; + inherit sha256; + }; + inherit nativeBuildInputs buildInputs; + preConfigure = '' + makeFlagsArray+=("CONFIG=release") + makeFlagsArray+=("PLUGINPATH=$out/Plugins/OFX/Natron") + ${preConfigure} + ''; + }; + lodepngcpp = fetchurl { + url = https://raw.githubusercontent.com/lvandeve/lodepng/a70c086077c0eaecbae3845e4da4424de5f43361/lodepng.cpp; + sha256 = "1dxkkr4jbmvlwfr7m16i1mgcj1pqxg9s1a7y3aavs9rrk0ki8ys2"; + }; + lodepngh = fetchurl { + url = https://raw.githubusercontent.com/lvandeve/lodepng/a70c086077c0eaecbae3845e4da4424de5f43361/lodepng.h; + sha256 = "14drdikd0vws3wwpyqq7zzm5z3kg98svv4q4w0hr45q6zh6hs0bq"; + }; + CImgh = fetchurl { + url = https://raw.githubusercontent.com/dtschump/CImg/572c12d82b2f59ece21be8f52645c38f1dd407e6/CImg.h; + sha256 = "0n4qfxj8j6rmj4svf68gg2pzg8d1pb74bnphidnf8i2paj6lwniz"; + }; + plugins = map buildPlugin [ + ({ + pluginName = "arena"; + sha256 = "0qba13vn9qdfax7nqlz1ps27zspr5kh795jp1xvbmwjzjzjpkqkf"; + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ + pango librsvg librevenge libcdr opencolorio libxml2 libzip + poppler imagemagick + ]; + preConfigure = '' + sed -i 's|pkg-config poppler-glib|pkg-config poppler poppler-glib|g' Makefile.master + for i in Extra Bundle; do + cp ${lodepngcpp} $i/lodepng.cpp + cp ${lodepngh} $i/lodepng.h + done + ''; + }) + ({ + pluginName = "io"; + sha256 = "0s196i9fkgr9iw92c94mxgs1lkxbhynkf83vmsgrldflmf0xjky7"; + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ + libpng ffmpeg openexr opencolorio openimageio boost libGL + seexpr + ]; + }) + ({ + pluginName = "misc"; + sha256 = "02h79jrll0c17azxj16as1mks3lmypm4m3da4mms9sg31l3n82qi"; + buildInputs = [ + libGL + ]; + preConfigure = '' + cp ${CImgh} CImg/CImg.h + ''; + }) + ]; +in +stdenv.mkDerivation { + inherit version; + name = "natron-${version}"; + + src = fetchurl { + url = "https://github.com/MrKepzie/Natron/releases/download/${version}/Natron-${version}.tar.xz"; + sha256 = "1wdc0zqriw2jhlrhzs6af3kagrv22cm086ffnbr1x43mgc9hfhjp"; + }; + + nativeBuildInputs = [ qmake4Hook pkgconfig python2Packages.wrapPython ]; + + buildInputs = [ + qt4 boost expat cairo python2Packages.pyside python2Packages.pysideShiboken + ]; + + preConfigure = '' + export MAKEFLAGS=-j$NIX_BUILD_CORES + cp ${./config.pri} config.pri + mkdir OpenColorIO-Configs + tar -xf ${OpenColorIO-Configs} --strip-components=1 -C OpenColorIO-Configs + ''; + + postFixup = '' + for i in ${lib.escapeShellArgs plugins}; do + ${lndir}/bin/lndir $i $out + done + wrapProgram $out/bin/Natron \ + --set PYTHONPATH "$PYTHONPATH" + ''; + + meta = with stdenv.lib; { + description = "Node-graph based, open-source compositing software"; + longDescription = '' + Node-graph based, open-source compositing software. Similar in + functionalities to Adobe After Effects and Nuke by The Foundry. + ''; + homepage = https://natron.fr/; + license = stdenv.lib.licenses.gpl2; + maintainers = [ maintainers.puffnfresh ]; + platforms = platforms.linux; + broken = true; + }; +} diff --git a/nixpkgs/pkgs/applications/video/obs-studio/default.nix b/nixpkgs/pkgs/applications/video/obs-studio/default.nix new file mode 100644 index 000000000000..0990062bf022 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/obs-studio/default.nix @@ -0,0 +1,96 @@ +{ config, stdenv +, fetchFromGitHub +, cmake +, fdk_aac +, ffmpeg +, jansson +, libjack2 +, libxkbcommon +, libpthreadstubs +, libXdmcp +, qtbase +, qtx11extras +, qtsvg +, speex +, libv4l +, x264 +, curl +, xorg +, makeWrapper +, pkgconfig +, vlc +, mbedtls + +, scriptingSupport ? true +, luajit +, swig +, python3 + +, alsaSupport ? stdenv.isLinux +, alsaLib +, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux +, libpulseaudio +}: + +let + optional = stdenv.lib.optional; +in stdenv.mkDerivation rec { + name = "obs-studio-${version}"; + version = "23.2.1"; + + src = fetchFromGitHub { + owner = "jp9000"; + repo = "obs-studio"; + rev = "${version}"; + sha256 = "05brixq2z98mvn1q2rgdl27xj798509nv8yh6h0yzqyk9gly4anz"; + }; + + nativeBuildInputs = [ cmake + pkgconfig + ]; + + buildInputs = [ curl + fdk_aac + ffmpeg + jansson + libjack2 + libv4l + libxkbcommon + libpthreadstubs + libXdmcp + qtbase + qtx11extras + qtsvg + speex + x264 + vlc + makeWrapper + mbedtls + ] + ++ optional scriptingSupport [ luajit swig python3 ] + ++ optional alsaSupport alsaLib + ++ optional pulseaudioSupport libpulseaudio; + + # obs attempts to dlopen libobs-opengl, it fails unless we make sure + # DL_OPENGL is an explicit path. Not sure if there's a better way + # to handle this. + cmakeFlags = [ "-DCMAKE_CXX_FLAGS=-DDL_OPENGL=\\\"$(out)/lib/libobs-opengl.so\\\"" ]; + + postInstall = '' + wrapProgram $out/bin/obs \ + --prefix "LD_LIBRARY_PATH" : "${xorg.libX11.out}/lib:${vlc}/lib" + ''; + + meta = with stdenv.lib; { + description = "Free and open source software for video recording and live streaming"; + longDescription = '' + This project is a rewrite of what was formerly known as "Open Broadcaster + Software", software originally designed for recording and streaming live + video content, efficiently + ''; + homepage = https://obsproject.com; + maintainers = with maintainers; [ jb55 MP2E ]; + license = licenses.gpl2; + platforms = [ "x86_64-linux" "i686-linux" ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/obs-studio/linuxbrowser.nix b/nixpkgs/pkgs/applications/video/obs-studio/linuxbrowser.nix new file mode 100644 index 000000000000..14f40ad8901f --- /dev/null +++ b/nixpkgs/pkgs/applications/video/obs-studio/linuxbrowser.nix @@ -0,0 +1,48 @@ +# We don't have a wrapper which can supply obs-studio plugins so you have to +# somewhat manually install this: + +# nix-env -f . -iA obs-linuxbrowser +# mkdir -p ~/.config/obs-studio/plugins +# ln -s ~/.nix-profile/share/obs/obs-plugins/obs-linuxbrowser ~/.config/obs-studio/plugins/ + +{ stdenv, fetchFromGitHub, obs-studio, cmake, libcef +}: + +stdenv.mkDerivation rec { + name = "obs-linuxbrowser-${version}"; + version = "0.6.1"; + src = fetchFromGitHub { + owner = "bazukas"; + repo = "obs-linuxbrowser"; + rev = version; + sha256 = "1mi9pchy07ipnx1m2767n29d53v822yajcf6c3705dhz882z21zq"; + }; + nativeBuildInputs = [ cmake ]; + buildInputs = [ obs-studio ]; + postUnpack = '' + mkdir -p cef/Release cef/Resources cef/libcef_dll_wrapper/ + for i in ${libcef}/share/cef/*; do + ln -s $i cef/Release/ + ln -s $i cef/Resources/ + done + ln -s ${libcef}/lib/libcef.so cef/Release/ + ln -s ${libcef}/lib/libcef_dll_wrapper.a cef/libcef_dll_wrapper/ + ln -s ${libcef}/include cef/ + ''; + cmakeFlags = [ + "-DCEF_ROOT_DIR=../../cef" + "-DOBS_INCLUDE_SEARCH_DIR=${obs-studio}/include/obs" + ]; + installPhase = '' + mkdir -p $out/share/obs/obs-plugins + cp -r build/obs-linuxbrowser $out/share/obs/obs-plugins/ + ''; + + meta = with stdenv.lib; { + description = "Browser source plugin for obs-studio based on Chromium Embedded Framework"; + homepage = https://github.com/bazukas/obs-linuxbrowser; + maintainers = with maintainers; [ puffnfresh ]; + license = licenses.gpl2; + platforms = with platforms; linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/ogmtools/default.nix b/nixpkgs/pkgs/applications/video/ogmtools/default.nix new file mode 100644 index 000000000000..221f4fc0e5c3 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/ogmtools/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchurl, libogg, libvorbis, libdvdread }: + +stdenv.mkDerivation rec { + name = "ogmtools-1.5"; + + src = fetchurl { + url = "https://www.bunkus.org/videotools/ogmtools/${name}.tar.bz2"; + sha256 = "1spx81p5wf59ksl3r3gvf78d77sh7gj8a6lw773iv67bphfivmn8"; + }; + + buildInputs = [libogg libvorbis libdvdread]; + + meta = { + description = "Tools for modifying and inspecting OGG media streams"; + longDescription = '' + These tools allow information about (ogminfo) or extraction from + (ogmdemux) or creation of (ogmmerge) OGG media streams. Includes dvdxchap + tool for extracting chapter information from DVD. + ''; + homepage = https://www.bunkus.org/videotools/ogmtools/; + license = stdenv.lib.licenses.gpl2; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/olive-editor/default.nix b/nixpkgs/pkgs/applications/video/olive-editor/default.nix new file mode 100644 index 000000000000..15db28b05e46 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/olive-editor/default.nix @@ -0,0 +1,40 @@ +{ stdenv, fetchFromGitHub, pkgconfig, which, qmake, + qtbase, qtmultimedia, frei0r, opencolorio, hicolor-icon-theme, ffmpeg-full, + CoreFoundation }: + +stdenv.mkDerivation rec { + pname = "olive-editor"; + version = "0.1.0"; + + src = fetchFromGitHub { + owner = "olive-editor"; + repo = "olive"; + rev = version; + sha256 = "191nk4c35gys4iypykcidn6h27c3sbjfy117q7h9h1qilz2wm94z"; + }; + + nativeBuildInputs = [ + pkgconfig + which + qmake + ]; + + buildInputs = [ + ffmpeg-full + frei0r + opencolorio + qtbase + qtmultimedia + qtmultimedia.dev + hicolor-icon-theme + ] ++ stdenv.lib.optional stdenv.isDarwin CoreFoundation; + + meta = with stdenv.lib; { + description = "Professional open-source NLE video editor"; + homepage = "https://www.olivevideoeditor.org/"; + downloadPage = "https://www.olivevideoeditor.org/download.php"; + license = licenses.gpl3; + maintainers = [ maintainers.balsoft ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/applications/video/omxplayer/default.nix b/nixpkgs/pkgs/applications/video/omxplayer/default.nix new file mode 100644 index 000000000000..7a130bbdb418 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/omxplayer/default.nix @@ -0,0 +1,86 @@ +{ stdenv, fetchurl +, raspberrypifw, pcre, boost, freetype, zlib +}: + +let + ffmpeg = stdenv.mkDerivation rec { + name = "ffmpeg-1.1.3"; + + src = fetchurl { + url = "http://www.ffmpeg.org/releases/${name}.tar.bz2"; + sha256 = "03s1zsprz5p6gjgwwqcf7b6cvzwwid6l8k7bamx9i0f1iwkgdm0j"; + }; + + configurePlatforms = []; + configureFlags = [ + "--arch=${stdenv.hostPlatform.parsed.cpu.name}" + ] ++ stdenv.lib.optionals stdenv.hostPlatform.isAarch32 [ + # TODO be better with condition + "--cpu=arm1176jzf-s" + ] ++ [ + "--disable-muxers" + "--enable-muxer=spdif" + "--enable-muxer=adts" + "--disable-encoders" + "--enable-encoder=ac3" + "--enable-encoder=aac" + "--disable-decoder=mpeg_xvmc" + "--disable-devices" + "--disable-ffprobe" + "--disable-ffplay" + "--disable-ffserver" + "--disable-ffmpeg" + "--enable-shared" + "--disable-doc" + "--enable-postproc" + "--enable-gpl" + "--enable-protocol=http" + "--enable-pthreads" + "--disable-runtime-cpudetect" + "--enable-pic" + "--disable-armv5te" + "--disable-neon" + "--enable-armv6t2" + "--enable-armv6" + "--enable-hardcoded-tables" + "--disable-runtime-cpudetect" + "--disable-debug" + "--arch=${stdenv.hostPlatform.parsed.cpu.name}" + "--target_os=${stdenv.hostPlatform.parsed.kernel.name}" + ] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + "--cross-prefix=${stdenv.cc.targetPrefix}" + "--enable-cross-compile" + ]; + + enableParallelBuilding = true; + + meta = { + homepage = http://www.ffmpeg.org/; + description = "A complete, cross-platform solution to record, convert and stream audio and video"; + }; + }; +in +stdenv.mkDerivation rec { + name = "omxplayer-20130328-fbee325dc2"; + src = fetchurl { + url = https://github.com/huceke/omxplayer/tarball/fbee325dc2; + name = "${name}.tar.gz"; + sha256 = "0fkvv8il7ffqxki2gp8cxa5shh6sz9jsy5vv3f4025g4gss6afkg"; + }; + patchPhase = '' + sed -i 1d Makefile + export INCLUDES="-I${raspberrypifw}/include/interface/vcos/pthreads -I${raspberrypifw}/include/interface/vmcs_host/linux/" + ''; + installPhase = '' + mkdir -p $out/bin + cp omxplayer.bin $out/bin + ''; + buildInputs = [ raspberrypifw ffmpeg pcre boost freetype zlib ]; + + meta = { + homepage = https://github.com/huceke/omxplayer; + description = "Commandline OMX player for the Raspberry Pi"; + license = stdenv.lib.licenses.gpl2Plus; + platforms = stdenv.lib.platforms.arm; + }; +} diff --git a/nixpkgs/pkgs/applications/video/openshot-qt/default.nix b/nixpkgs/pkgs/applications/video/openshot-qt/default.nix new file mode 100644 index 000000000000..19a8ff6c822e --- /dev/null +++ b/nixpkgs/pkgs/applications/video/openshot-qt/default.nix @@ -0,0 +1,44 @@ +{ stdenv, fetchFromGitHub +, doxygen, python3Packages, libopenshot +, wrapGAppsHook, gtk3 }: + +python3Packages.buildPythonApplication rec { + pname = "openshot-qt"; + version = "2.4.4"; + + src = fetchFromGitHub { + owner = "OpenShot"; + repo = "openshot-qt"; + rev = "v${version}"; + sha256 = "0mg63v36h7l8kv2sgf6x8c1n3ygddkqqwlciz7ccxpbm4x1idqba"; + }; + + nativeBuildInputs = [ doxygen wrapGAppsHook ]; + + buildInputs = [ gtk3 ]; + + propagatedBuildInputs = with python3Packages; [ libopenshot pyqt5_with_qtwebkit requests sip httplib2 pyzmq ]; + + + preConfigure = '' + # tries to create caching directories during install + export HOME=$(mktemp -d) + ''; + + doCheck = false; + + meta = with stdenv.lib; { + homepage = http://openshot.org/; + description = "Free, open-source video editor"; + longDescription = '' + OpenShot Video Editor is a free, open-source video editor for Linux. + OpenShot can take your videos, photos, and music files and help you + create the film you have always dreamed of. Easily add sub-titles, + transitions, and effects, and then export your film to DVD, YouTube, + Vimeo, Xbox 360, and many other common formats. + ''; + license = with licenses; gpl3Plus; + maintainers = with maintainers; [ AndersonTorres ]; + platforms = with platforms; linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/openshot-qt/libopenshot-audio.nix b/nixpkgs/pkgs/applications/video/openshot-qt/libopenshot-audio.nix new file mode 100644 index 000000000000..9bf211164553 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/openshot-qt/libopenshot-audio.nix @@ -0,0 +1,35 @@ +{ stdenv, fetchFromGitHub, pkgconfig, cmake, doxygen, alsaLib , libX11, libXft, libXrandr, libXinerama, libXext, libXcursor }: + +with stdenv.lib; +stdenv.mkDerivation rec { + pname = "libopenshot-audio"; + version = "0.1.8"; + + src = fetchFromGitHub { + owner = "OpenShot"; + repo = "libopenshot-audio"; + rev = "v${version}"; + sha256 = "1fvp6nmf30xzkmcznakh8dv5vn9d7nq051pqcqv638hsfppkmcrl"; + }; + + nativeBuildInputs = + [ pkgconfig cmake doxygen ]; + + buildInputs = + [ alsaLib libX11 libXft libXrandr libXinerama libXext libXcursor ]; + + doCheck = false; + + meta = { + homepage = http://openshot.org/; + description = "High-quality sound editing library"; + longDescription = '' + OpenShot Audio Library (libopenshot-audio) is a program that allows the + high-quality editing and playback of audio, and is based on the amazing + JUCE library. + ''; + license = with licenses; gpl3Plus; + maintainers = with maintainers; [ AndersonTorres ]; + platforms = with platforms; linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/openshot-qt/libopenshot.nix b/nixpkgs/pkgs/applications/video/openshot-qt/libopenshot.nix new file mode 100644 index 000000000000..b7c8e6feeba4 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/openshot-qt/libopenshot.nix @@ -0,0 +1,51 @@ +{ stdenv, fetchFromGitHub +, pkgconfig, cmake, doxygen +, libopenshot-audio, imagemagick, ffmpeg +, swig, python3 +, unittest-cpp, cppzmq, czmqpp +, qtbase, qtmultimedia }: + +with stdenv.lib; +stdenv.mkDerivation rec { + pname = "libopenshot"; + version = "0.2.3"; + + src = fetchFromGitHub { + owner = "OpenShot"; + repo = "libopenshot"; + rev = "v${version}"; + sha256 = "0r1qmr8ar5n72603xkj9h065vbpznrqsq88kxxmn9n8djyyvk03k"; + }; + + patchPhase = '' + sed -i 's/{UNITTEST++_INCLUDE_DIR}/ENV{UNITTEST++_INCLUDE_DIR}/g' tests/CMakeLists.txt + sed -i 's/{_REL_PYTHON_MODULE_PATH}/ENV{_REL_PYTHON_MODULE_PATH}/g' src/bindings/python/CMakeLists.txt + export _REL_PYTHON_MODULE_PATH=$(toPythonPath $out) + ''; + + nativeBuildInputs = [ pkgconfig cmake doxygen ]; + + buildInputs = + [ imagemagick ffmpeg swig python3 unittest-cpp + cppzmq czmqpp qtbase qtmultimedia ]; + + LIBOPENSHOT_AUDIO_DIR = "${libopenshot-audio}"; + "UNITTEST++_INCLUDE_DIR" = "${unittest-cpp}/include/UnitTest++"; + + doCheck = false; + + cmakeFlags = [ "-DENABLE_RUBY=OFF" ]; + + meta = { + homepage = http://openshot.org/; + description = "Free, open-source video editor library"; + longDescription = '' + OpenShot Library (libopenshot) is an open-source project dedicated to + delivering high quality video editing, animation, and playback solutions + to the world. API currently supports C++, Python, and Ruby. + ''; + license = with licenses; gpl3Plus; + maintainers = with maintainers; [ AndersonTorres ]; + platforms = with platforms; linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/p2pvc/default.nix b/nixpkgs/pkgs/applications/video/p2pvc/default.nix new file mode 100644 index 000000000000..d9eef7f4cd85 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/p2pvc/default.nix @@ -0,0 +1,27 @@ +{ stdenv, pkgconfig, fetchFromGitHub, opencv, ncurses, portaudio }: + +stdenv.mkDerivation { + name = "p2pvc"; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ opencv ncurses portaudio ]; + + enableParallelBuilding = true; + + installPhase = "mkdir -p $out/bin; cp p2pvc $out/bin/"; + + src = fetchFromGitHub { + owner = "mofarrell"; + repo = "p2pvc"; + rev = "d7b1c70288a7750fc8f9a22dbddbe51d34b5b9e5"; + sha256 = "0d4vvrsjad5gk4rrjwgydn9ffj12jfb4aksw2px6jw75hp9pzmka"; + }; + + meta = { + description = "A point to point color terminal video chat"; + homepage = https://github.com/mofarrell/p2pvc; + license = stdenv.lib.licenses.mit; + maintainers = with stdenv.lib.maintainers; [ trino ]; + platforms = with stdenv.lib.platforms; linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/peek/default.nix b/nixpkgs/pkgs/applications/video/peek/default.nix new file mode 100644 index 000000000000..374ea08816f7 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/peek/default.nix @@ -0,0 +1,45 @@ +{ stdenv, fetchFromGitHub, cmake, gettext, libxml2, pkgconfig, txt2man, vala_0_40, wrapGAppsHook +, gsettings-desktop-schemas, gtk3, keybinder3, ffmpeg +}: + +stdenv.mkDerivation rec { + pname = "peek"; + version = "1.3.1"; + + src = fetchFromGitHub { + owner = "phw"; + repo = pname; + rev = version; + sha256 = "1fnvlklmg6s5rs3ql74isa5fgdkqqrpsyf8k2spxj520239l4vgb"; + }; + + preConfigure = '' + gappsWrapperArgs+=(--prefix PATH : ${stdenv.lib.makeBinPath [ ffmpeg ]}) + ''; + + nativeBuildInputs = [ + cmake + gettext + pkgconfig + libxml2.bin + txt2man + vala_0_40 # See https://github.com/NixOS/nixpkgs/issues/58433 + wrapGAppsHook + ]; + + buildInputs = [ + gsettings-desktop-schemas + gtk3 + keybinder3 + ]; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + homepage = https://github.com/phw/peek; + description = "Simple animated GIF screen recorder with an easy to use interface"; + license = licenses.gpl3; + maintainers = with maintainers; [ puffnfresh ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/pitivi/default.nix b/nixpkgs/pkgs/applications/video/pitivi/default.nix new file mode 100644 index 000000000000..1c124df30238 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/pitivi/default.nix @@ -0,0 +1,81 @@ +{ stdenv, fetchFromGitHub, fetchurl, pkgconfig, intltool, itstool, python3, wrapGAppsHook +, python3Packages, gst_all_1, gtk3 +, gobject-introspection, librsvg, gnome3, libnotify, gsound +, meson, ninja, gsettings-desktop-schemas +}: + +let + version = "0.999"; + + # gst-transcoder will eventually be merged with gstreamer (according to + # gst-transcoder 1.8.0 release notes). For now the only user is pitivi so we + # don't bother exposing the package to all of nixpkgs. + gst-transcoder = stdenv.mkDerivation rec { + version = "1.14.1"; + name = "gst-transcoder-${version}"; + src = fetchFromGitHub { + owner = "pitivi"; + repo = "gst-transcoder"; + rev = version; + sha256 = "16skiz9akavssii529v9nr8zd54w43livc14khdyzv164djg9q8f"; + }; + nativeBuildInputs = [ pkgconfig meson ninja gobject-introspection python3 ]; + buildInputs = with gst_all_1; [ gstreamer gst-plugins-base ]; + }; + +in python3Packages.buildPythonApplication rec { + name = "pitivi-${version}"; + + src = fetchurl { + url = "mirror://gnome/sources/pitivi/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz"; + sha256 = "0mxp2p4gg976fp1vj3rb5rmpl5mqfzncm9vw2719irl32f1qlvyb"; + }; + + format = "other"; + + patches = [ + # By default, the build picks up environment variables like PYTHONPATH + # and saves them to the generated binary. This would make the build-time + # dependencies part of the closure so we remove it. + ./prevent-closure-contamination.patch + ]; + + postPatch = '' + patchShebangs ./getenvvar.py + ''; + + nativeBuildInputs = [ meson ninja pkgconfig intltool itstool python3 wrapGAppsHook ]; + + buildInputs = [ + gobject-introspection gtk3 librsvg gnome3.gnome-desktop gsound + gnome3.adwaita-icon-theme + gsettings-desktop-schemas libnotify + gst-transcoder + ] ++ (with gst_all_1; [ + gstreamer gst-editing-services + gst-plugins-base (gst-plugins-good.override { gtkSupport = true; }) + gst-plugins-bad gst-plugins-ugly gst-libav gst-validate + ]); + + pythonPath = with python3Packages; [ pygobject3 gst-python pyxdg numpy pycairo matplotlib dbus-python ]; + + passthru = { + updateScript = gnome3.updateScript { + packageName = "pitivi"; + versionPolicy = "none"; # we are using dev version, since the stable one is too old + }; + }; + + meta = with stdenv.lib; { + description = "Non-Linear video editor utilizing the power of GStreamer"; + homepage = http://pitivi.org/; + longDescription = '' + Pitivi is a video editor built upon the GStreamer Editing Services. + It aims to be an intuitive and flexible application + that can appeal to newbies and professionals alike. + ''; + license = licenses.lgpl21Plus; + maintainers = with maintainers; []; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/pitivi/prevent-closure-contamination.patch b/nixpkgs/pkgs/applications/video/pitivi/prevent-closure-contamination.patch new file mode 100644 index 000000000000..0025ecd0a4cf --- /dev/null +++ b/nixpkgs/pkgs/applications/video/pitivi/prevent-closure-contamination.patch @@ -0,0 +1,23 @@ +--- a/meson.build ++++ b/meson.build +@@ -26,15 +26,15 @@ + geteenvvar = find_program('getenvvar.py') + cdata = configuration_data() + cdata.set('CONFIGURED_PYTHONPATH', +- run_command(geteenvvar, 'PYTHONPATH').stdout().strip()) ++ '') + cdata.set('CONFIGURED_GI_TYPELIB_PATH', +- run_command(geteenvvar, 'GI_TYPELIB_PATH').stdout().strip()) ++ '') + cdata.set('CONFIGURED_LD_LIBRARY_PATH', +- run_command(geteenvvar, 'LD_LIBRARY_PATH').stdout().strip()) ++ '') + cdata.set('CONFIGURED_GST_PLUGIN_PATH', +- run_command(geteenvvar, 'GST_PLUGIN_PATH').stdout().strip()) ++ '') + cdata.set('CONFIGURED_GST_PLUGIN_SYSTEM_PATH', +- run_command(geteenvvar, 'GST_PLUGIN_SYSTEM_PATH').stdout().strip()) ++ '') + cdata.set('LIBDIR', join_paths(get_option('prefix'), get_option('libdir'))) + cdata.set('DATADIR', join_paths(get_option('prefix'), get_option('datadir'))) + cdata.set('PACKAGE_NAME', 'Pitivi') diff --git a/nixpkgs/pkgs/applications/video/plex-media-player/default.nix b/nixpkgs/pkgs/applications/video/plex-media-player/default.nix new file mode 100644 index 000000000000..9f5401fc69c3 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/plex-media-player/default.nix @@ -0,0 +1,70 @@ +{ stdenv, fetchFromGitHub, fetchurl, pkgconfig, cmake, python3 +, libX11, libXrandr, qtbase, qtwebchannel, qtwebengine, qtx11extras +, libvdpau, SDL2, mpv, libGL }: +let + # During compilation, a CMake bundle is downloaded from `artifacts.plex.tv`, + # which then downloads a handful of web client-related files. To enable + # sandboxed builds, we manually download them and save them so these files + # are fetched ahead-of-time instead of during the CMake build. Whenever + # plex-media-player is updated, the versions for these files are changed, + # so the build IDs (and SHAs) below will need to be updated! + depSrcs = rec { + webClientBuildId = "129-669a5eed7ae231"; + webClientDesktopBuildId = "3.100.1-d7ae231"; + webClientTvBuildId = "3.105.0-669a5ee"; + + webClient = fetchurl { + url = "https://artifacts.plex.tv/web-client-pmp/${webClientBuildId}/buildid.cmake"; + sha256 = "0gd7x0rf7sf696zd24y6pji9iam851vjjqbpm4xkqwpadwrwzhwk"; + }; + webClientDesktopHash = fetchurl { + url = "https://artifacts.plex.tv/web-client-pmp/${webClientBuildId}/web-client-desktop-${webClientDesktopBuildId}.tar.xz.sha1"; + sha256 = "136hk7p6gxxmhq1d09jfjljkv76b5h2p16s5jwf28xixkp0ab2jg"; + }; + webClientDesktop = fetchurl { + url = "https://artifacts.plex.tv/web-client-pmp/${webClientBuildId}/web-client-desktop-${webClientDesktopBuildId}.tar.xz"; + sha256 = "0yvjqar72jq58jllsp51b8ybiv6kad8w51bfzss87m1cv3qdbzpa"; + }; + webClientTvHash = fetchurl { + url = "https://artifacts.plex.tv/web-client-pmp/${webClientBuildId}/web-client-tv-${webClientTvBuildId}.tar.xz.sha1"; + sha256 = "0kkw9dd0kr5n4ip1pwfs2dkfjwrph88i0dlw64dca9i885gyjvhd"; + }; + webClientTv = fetchurl { + url = "https://artifacts.plex.tv/web-client-pmp/${webClientBuildId}/web-client-tv-${webClientTvBuildId}.tar.xz"; + sha256 = "0yssii01nx6ixg3mikqjn8hz34dalma0rfr8spj115xwr7aq8ixk"; + }; + }; +in stdenv.mkDerivation rec { + name = "plex-media-player-${version}"; + version = "2.36.0.988"; + vsnHash = "0150ae52"; + + src = fetchFromGitHub { + owner = "plexinc"; + repo = "plex-media-player"; + rev = "v${version}-${vsnHash}"; + sha256 = "104arb0afv3jz0bvj8ij5s7av289ms9n91b4y4077la2wd6r1bq0"; + }; + + nativeBuildInputs = [ pkgconfig cmake python3 ]; + buildInputs = [ libX11 libXrandr qtbase qtwebchannel qtwebengine qtx11extras + libvdpau SDL2 mpv libGL ]; + + preConfigure = with depSrcs; '' + mkdir -p build/dependencies + ln -s ${webClient} build/dependencies/buildid-${webClientBuildId}.cmake + ln -s ${webClientDesktopHash} build/dependencies/web-client-desktop-${webClientDesktopBuildId}.tar.xz.sha1 + ln -s ${webClientDesktop} build/dependencies/web-client-desktop-${webClientDesktopBuildId}.tar.xz + ln -s ${webClientTvHash} build/dependencies/web-client-tv-${webClientTvBuildId}.tar.xz.sha1 + ln -s ${webClientTv} build/dependencies/web-client-tv-${webClientTvBuildId}.tar.xz + ''; + + cmakeFlags = [ "-DCMAKE_BUILD_TYPE=RelWithDebInfo" "-DQTROOT=${qtbase}" ]; + + meta = with stdenv.lib; { + description = "Streaming media player for Plex"; + license = licenses.gpl2; + maintainers = with maintainers; [ kylewlacy ]; + homepage = https://plex.tv; + }; +} diff --git a/nixpkgs/pkgs/applications/video/pyca/default.nix b/nixpkgs/pkgs/applications/video/pyca/default.nix new file mode 100644 index 000000000000..af9ef4c1cd50 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/pyca/default.nix @@ -0,0 +1,30 @@ +{ stdenv, buildPythonApplication, fetchFromGitHub, pycurl, dateutil, configobj, sqlalchemy, sdnotify, flask }: + +buildPythonApplication rec { + pname = "pyca"; + version = "2.1"; + + src = fetchFromGitHub { + owner = "opencast"; + repo = "pyCA"; + rev = "v${version}"; + sha256 = "0cvkmdlcax9da9iw4ls73vw0pxvm8wvchab5gwdy9w9ibqdpcmwh"; + }; + + propagatedBuildInputs = [ + pycurl + dateutil + configobj + sqlalchemy + sdnotify + flask + ]; + + meta = with stdenv.lib; { + description = "A fully functional Opencast capture agent written in Python"; + homepage = https://github.com/opencast/pyCA; + license = licenses.lgpl3; + maintainers = with maintainers; [ pmiddend ]; + }; +} + diff --git a/nixpkgs/pkgs/applications/video/qarte/default.nix b/nixpkgs/pkgs/applications/video/qarte/default.nix new file mode 100644 index 000000000000..f0c3776a4336 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/qarte/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchbzr, python3, rtmpdump, makeWrapper }: + +let + pythonEnv = python3.withPackages (ps: with ps; [ pyqt5 sip ]); +in stdenv.mkDerivation { + name = "qarte-4.6.0"; + src = fetchbzr { + url = http://bazaar.launchpad.net/~vincent-vandevyvre/qarte/qarte-4; + rev = "22"; + sha256 = "0v4zpj8w67ydvnmanxbl8pwvn0cfv70c0mlw36a1r4n0rvgxffcn"; + }; + + buildInputs = [ makeWrapper pythonEnv ]; + + installPhase = '' + mkdir -p $out/bin + mv qarte $out/bin/ + substituteInPlace $out/bin/qarte \ + --replace '/usr/share' "$out/share" + wrapProgram $out/bin/qarte \ + --prefix PATH : "${rtmpdump}/bin" + + mkdir -p $out/share/man/man1/ + mv qarte.1 $out/share/man/man1/ + + mkdir -p $out/share/qarte + mv * $out/share/qarte/ + ''; + + meta = { + homepage = https://launchpad.net/qarte; + description = "A recorder for Arte TV Guide and Arte Concert"; + license = stdenv.lib.licenses.gpl3; + maintainers = with stdenv.lib.maintainers; [ vbgl ]; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/qmediathekview/default.nix b/nixpkgs/pkgs/applications/video/qmediathekview/default.nix new file mode 100644 index 000000000000..160066688462 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/qmediathekview/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchFromGitHub, qtbase, qttools, xz, boost, qmake, pkgconfig }: + +stdenv.mkDerivation rec { + pname = "QMediathekView"; + version = "2019-01-06"; + + src = fetchFromGitHub { + owner = "adamreichold"; + repo = pname; + rev = "e098aaec552ec4e367078bf19953a08067316b4b"; + sha256 = "0i9hac9alaajbra3lx23m0iiq6ww4is00lpbzg5x70agjrwj0nd6"; + }; + + postPatch = '' + substituteInPlace ${pname}.pro \ + --replace /usr "" + ''; + + buildInputs = [ qtbase qttools xz boost ]; + + nativeBuildInputs = [ qmake pkgconfig ]; + + installFlags = [ "INSTALL_ROOT=$(out)" ]; + + meta = with stdenv.lib; { + description = "An alternative Qt-based front-end for the database maintained by the MediathekView project"; + inherit (src.meta) homepage; + license = licenses.gpl3Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/qstopmotion/default.nix b/nixpkgs/pkgs/applications/video/qstopmotion/default.nix new file mode 100644 index 000000000000..f2b23fbdea03 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/qstopmotion/default.nix @@ -0,0 +1,42 @@ +{ stdenv, fetchurl, qt5, ffmpeg, guvcview, cmake, ninja, libxml2 +, gettext, pkgconfig, libgphoto2, gphoto2, v4l_utils, libv4l, pcre +, qwt, extra-cmake-modules }: + +stdenv.mkDerivation rec { + pname = "qstopmotion"; + version = "2.4.1"; + name = "${pname}-${version}"; + + src = fetchurl { + url = "mirror://sourceforge/project/${pname}/Version_${builtins.replaceStrings ["."] ["_"] version}/${name}-Source.tar.gz"; + sha256 = "03r6jxyq0bak2vsy2b78nk27m7fm96hnl8cx11l3l17704j4iglh"; + }; + + buildInputs = with qt5; [ v4l_utils libv4l pcre qtbase qtmultimedia ffmpeg guvcview + qwt qtquickcontrols qtimageformats qtxmlpatterns ]; + + nativeBuildInputs = [ pkgconfig cmake extra-cmake-modules ninja + gettext libgphoto2 gphoto2 libxml2 libv4l ]; + + patchPhase = '' + substituteInPlace CMakeLists.txt \ + --replace "find_package(Qt5 REQUIRED COMPONENTS Core Widgets Xml" \ + "find_package(Qt5 REQUIRED COMPONENTS Core Widgets Xml Multimedia" + grep -rl 'qwt' . | xargs sed -i 's@<qwt/qwt_slider.h>@<qwt_slider.h>@g' + ''; + + meta = with stdenv.lib; { + homepage = http://www.qstopmotion.org; + description = "Create stopmotion animation with a (web)camera"; + longDescription = '' + Qstopmotion is a tool to create stopmotion + animation. Its users are able to create stop-motions from pictures + imported from a camera or from the harddrive and export the + animation to different video formats such as mpeg or avi. + ''; + + license = stdenv.lib.licenses.gpl2Plus; + maintainers = [ maintainers.leenaars ]; + platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/quvi/library.nix b/nixpkgs/pkgs/applications/video/quvi/library.nix new file mode 100644 index 000000000000..c3204cc9c0ce --- /dev/null +++ b/nixpkgs/pkgs/applications/video/quvi/library.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchurl, pkgconfig, lua5, curl, quvi_scripts, libproxy, libgcrypt, glib }: + +stdenv.mkDerivation rec { + name = "libquvi-${version}"; + version="0.9.4"; + + src = fetchurl { + url = "mirror://sourceforge/quvi/libquvi-${version}.tar.xz"; + sha256 = "1cl1kbgxl1jnx2nwx4z90l0lap09lnnj1fg7hxsxk3m6aj4y4grd"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ lua5 curl quvi_scripts libproxy libgcrypt glib ]; + + meta = { + description = "Web video downloader"; + homepage = http://quvi.sf.net; + license = stdenv.lib.licenses.lgpl21Plus; + platforms = stdenv.lib.platforms.linux; + maintainers = [ ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/quvi/scripts.nix b/nixpkgs/pkgs/applications/video/quvi/scripts.nix new file mode 100644 index 000000000000..603534be4c8b --- /dev/null +++ b/nixpkgs/pkgs/applications/video/quvi/scripts.nix @@ -0,0 +1,21 @@ +{stdenv, fetchurl, pkgconfig}: + +stdenv.mkDerivation rec { + name = "quvi-scripts-${version}"; + version="0.9.20131130"; + + src = fetchurl { + url = "mirror://sourceforge/quvi/libquvi-scripts-${version}.tar.xz"; + sha256 = "1qvp6z5k1qgcys7vf7jd6fm0g07xixmciwj14ypn1kqhmjgizwhp"; + }; + + nativeBuildInputs = [ pkgconfig ]; + + meta = { + description = "Web video downloader"; + homepage = http://quvi.sf.net; + license = stdenv.lib.licenses.lgpl21Plus; + platforms = stdenv.lib.platforms.linux; + maintainers = [ ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/quvi/tool.nix b/nixpkgs/pkgs/applications/video/quvi/tool.nix new file mode 100644 index 000000000000..333f4e6ab4de --- /dev/null +++ b/nixpkgs/pkgs/applications/video/quvi/tool.nix @@ -0,0 +1,25 @@ +{stdenv, fetchurl, pkgconfig, lua5, curl, quvi_scripts, libquvi, lua5_sockets, glib, makeWrapper}: + +stdenv.mkDerivation rec { + name = "quvi-${version}"; + version="0.9.5"; + + src = fetchurl { + url = "mirror://sourceforge/quvi/quvi-${version}.tar.xz"; + sha256 = "1h52s265rp3af16dvq1xlscp2926jqap2l4ah94vrfchv6m1hffb"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ lua5 curl quvi_scripts libquvi glib makeWrapper ]; + postInstall = '' + wrapProgram $out/bin/quvi --set LUA_PATH "${lua5_sockets}/share/lua/${lua5.luaversion}/?.lua" + ''; + + meta = { + description = "Web video downloader"; + homepage = http://quvi.sf.net; + license = stdenv.lib.licenses.lgpl21Plus; + platforms = stdenv.lib.platforms.linux; + maintainers = [ ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/recordmydesktop/default.nix b/nixpkgs/pkgs/applications/video/recordmydesktop/default.nix new file mode 100644 index 000000000000..8797ad8f953b --- /dev/null +++ b/nixpkgs/pkgs/applications/video/recordmydesktop/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchsvn, autoreconfHook, zlib, popt, alsaLib, libvorbis, libtheora +, libICE, libSM, libX11, libXext, libXfixes, libXdamage }: + +stdenv.mkDerivation rec { + name = "recordmydesktop-${version}"; + version = "0.3.8.1-svn${rev}"; + rev = "602"; + + src = fetchsvn { + url = https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk/recordmydesktop; + inherit rev; + sha256 = "1avirkc4ymrd575m616pi6wpgq1i0r5sb3qahps1g18sjpxks0lf"; + }; + + nativeBuildInputs = [ autoreconfHook ]; + + buildInputs = [ + zlib popt alsaLib libICE libSM libX11 libXext + libXfixes libXdamage libvorbis libtheora + ]; + + meta = with stdenv.lib; { + description = "Desktop session recorder"; + homepage = http://recordmydesktop.sourceforge.net/; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = [ ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/recordmydesktop/gtk.nix b/nixpkgs/pkgs/applications/video/recordmydesktop/gtk.nix new file mode 100644 index 000000000000..984b623cee7e --- /dev/null +++ b/nixpkgs/pkgs/applications/video/recordmydesktop/gtk.nix @@ -0,0 +1,37 @@ +{ stdenv, lib, fetchsvn, recordmydesktop, autoreconfHook, pkgconfig +, pythonPackages, jack2, xwininfo }: + +let + binPath = lib.makeBinPath [ recordmydesktop jack2 xwininfo ]; + +in stdenv.mkDerivation rec { + name = "gtk-recordmydesktop-${version}"; + version = "0.3.8-svn${recordmydesktop.rev}"; + + src = fetchsvn { + url = https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk/gtk-recordmydesktop; + inherit (recordmydesktop) rev; + sha256 = "010aykgjfxhyiixq9a9fg3p1a1ixz59m1vkn16hpy0lybgf4dsby"; + }; + + nativeBuildInputs = [ autoreconfHook pkgconfig ]; + + buildInputs = with pythonPackages; [ + python pygtk wrapPython + ]; + + pythonPath = with pythonPackages; [ pygtk ]; + + postInstall = '' + makeWrapperArgs="--prefix PATH : ${binPath}" + wrapPythonPrograms + ''; + + meta = with stdenv.lib; { + description = "GTK frontend for recordmydesktop"; + homepage = http://recordmydesktop.sourceforge.net/; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = [ ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/recordmydesktop/qt.nix b/nixpkgs/pkgs/applications/video/recordmydesktop/qt.nix new file mode 100644 index 000000000000..560801351515 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/recordmydesktop/qt.nix @@ -0,0 +1,37 @@ +{ stdenv, lib, fetchsvn, recordmydesktop, autoreconfHook, pkgconfig +, glib, pythonPackages, qt4, jack2, xwininfo }: + +let + binPath = lib.makeBinPath [ recordmydesktop jack2 xwininfo ]; + +in stdenv.mkDerivation rec { + name = "qt-recordmydesktop-${version}"; + version = "0.3.8-svn${recordmydesktop.rev}"; + + src = fetchsvn { + url = https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk/qt-recordmydesktop; + inherit (recordmydesktop) rev; + sha256 = "0vz7amrmz317sbx2cv2186d0r57as4l26xa9rpim5gbvzk20caqc"; + }; + + nativeBuildInputs = [ autoreconfHook pkgconfig ]; + + buildInputs = [ glib qt4 ] ++ (with pythonPackages; [ + python wrapPython pyqt4 + ]); + + pythonPath = with pythonPackages; [ pyqt4 ]; + + postInstall = '' + makeWrapperArgs="--prefix PATH : ${binPath}" + wrapPythonPrograms + ''; + + meta = with stdenv.lib; { + description = "GTK frontend for recordmydesktop"; + homepage = http://recordmydesktop.sourceforge.net/; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = [ ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/screenkey/default.nix b/nixpkgs/pkgs/applications/video/screenkey/default.nix new file mode 100644 index 000000000000..1671c3f14d00 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/screenkey/default.nix @@ -0,0 +1,60 @@ +{ lib +, substituteAll +, buildPythonApplication +, fetchFromGitHub +, distutils_extra +, setuptools-git +, intltool +, pygtk +, libX11 +, libXtst +, wrapGAppsHook +, gnome3 +, hicolor-icon-theme +}: +buildPythonApplication rec { + pname = "screenkey"; + version = "0.9"; + + src = fetchFromGitHub { + owner = "wavexx"; + repo = "screenkey"; + rev = "screenkey-${version}"; + sha256 = "14g7fiv9n7m03djwz1pp5034pffi87ssvss9bc1q8vq0ksn23vrw"; + }; + + patches = [ + (substituteAll { + src = ./paths.patch; + inherit libX11 libXtst; + }) + ]; + + nativeBuildInputs = [ + distutils_extra + setuptools-git + intltool + + wrapGAppsHook + ]; + + buildInputs = [ + gnome3.adwaita-icon-theme + hicolor-icon-theme + ]; + + propagatedBuildInputs = [ + pygtk + ]; + + # screenkey does not have any tests + doCheck = false; + + meta = with lib; { + homepage = https://www.thregr.org/~wavexx/software/screenkey/; + description = "A screencast tool to display your keys inspired by Screenflick"; + license = licenses.gpl3Plus; + platforms = platforms.linux; + maintainers = [ maintainers.rasendubi ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/screenkey/paths.patch b/nixpkgs/pkgs/applications/video/screenkey/paths.patch new file mode 100644 index 000000000000..7e5ed47fc19d --- /dev/null +++ b/nixpkgs/pkgs/applications/video/screenkey/paths.patch @@ -0,0 +1,20 @@ +--- a/Screenkey/xlib.py ++++ b/Screenkey/xlib.py +@@ -6,7 +6,7 @@ + from ctypes import * + + ## base X11 +-libX11 = CDLL('libX11.so.6') ++libX11 = CDLL('@libX11@/lib/libX11.so.6') + + # types + Atom = c_ulong +@@ -278,7 +278,7 @@ + + + ## record extensions +-libXtst = CDLL('libXtst.so.6') ++libXtst = CDLL('@libXtst@/lib/libXtst.so.6') + + # types + XPointer = String \ No newline at end of file diff --git a/nixpkgs/pkgs/applications/video/shotcut/default.nix b/nixpkgs/pkgs/applications/video/shotcut/default.nix new file mode 100644 index 000000000000..27a0fa3388ed --- /dev/null +++ b/nixpkgs/pkgs/applications/video/shotcut/default.nix @@ -0,0 +1,60 @@ +{ stdenv, fetchFromGitHub, SDL2, frei0r, gettext, mlt, jack1, pkgconfig, qtbase +, qtmultimedia, qtwebkit, qtx11extras, qtwebsockets, qtquickcontrols +, qtgraphicaleffects, libmlt +, qmake, makeWrapper, qttools }: + +assert stdenv.lib.versionAtLeast libmlt.version "6.8.0"; +assert stdenv.lib.versionAtLeast mlt.version "6.8.0"; + +stdenv.mkDerivation rec { + name = "shotcut-${version}"; + version = "19.02.28"; + + src = fetchFromGitHub { + owner = "mltframework"; + repo = "shotcut"; + rev = "v${version}"; + sha256 = "14l0cm81jy7syi08d8dg4nzp7s9zji9cycnf2mvh7zc7x069d1jr"; + }; + + enableParallelBuilding = true; + nativeBuildInputs = [ makeWrapper pkgconfig qmake ]; + buildInputs = [ + SDL2 frei0r gettext mlt libmlt + qtbase qtmultimedia qtwebkit qtx11extras qtwebsockets qtquickcontrols + qtgraphicaleffects + ]; + + NIX_CFLAGS_COMPILE = "-I${libmlt}/include/mlt++ -I${libmlt}/include/mlt"; + qmakeFlags = [ "QMAKE_LRELEASE=${stdenv.lib.getDev qttools}/bin/lrelease" "SHOTCUT_VERSION=${version}" ]; + + prePatch = '' + sed 's_shotcutPath, "qmelt"_"${mlt}/bin/melt"_' -i src/jobs/meltjob.cpp + sed 's_shotcutPath, "ffmpeg"_"${mlt.ffmpeg}/bin/ffmpeg"_' -i src/jobs/ffmpegjob.cpp + NICE=$(type -P nice) + sed "s_/usr/bin/nice_''${NICE}_" -i src/jobs/meltjob.cpp src/jobs/ffmpegjob.cpp + ''; + + postInstall = '' + mkdir -p $out/share/shotcut + cp -r src/qml $out/share/shotcut/ + wrapProgram $out/bin/shotcut --prefix FREI0R_PATH : ${frei0r}/lib/frei0r-1 --prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ jack1 SDL2 ]} --prefix PATH : ${mlt}/bin + ''; + + meta = with stdenv.lib; { + description = "A free, open source, cross-platform video editor"; + longDescription = '' + An official binary for Shotcut, which includes all the + dependencies pinned to specific versions, is provided on + http://shotcut.org. + + If you encounter problems with this version, please contact the + nixpkgs maintainer(s). If you wish to report any bugs upstream, + please use the official build from shotcut.org instead. + ''; + homepage = https://shotcut.org; + license = licenses.gpl3; + maintainers = with maintainers; [ goibhniu woffs ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/simplescreenrecorder/default.nix b/nixpkgs/pkgs/applications/video/simplescreenrecorder/default.nix new file mode 100644 index 000000000000..b456d8ee9a66 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/simplescreenrecorder/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchurl, alsaLib, ffmpeg, libjack2, libX11, libXext, qtx11extras +, libXfixes, libGLU_combined, pkgconfig, libpulseaudio, qtbase, cmake, ninja +}: + +stdenv.mkDerivation rec { + name = "simplescreenrecorder-${version}"; + version = "0.3.11"; + + src = fetchurl { + url = "https://github.com/MaartenBaert/ssr/archive/${version}.tar.gz"; + sha256 = "0l6irdadqpajvv0dj3ngs1231n559l0y1pykhs2h7526qm4w7xal"; + }; + + cmakeFlags = [ "-DWITH_QT5=TRUE" ]; + + patches = [ ./fix-paths.patch ]; + + postPatch = '' + for i in scripts/ssr-glinject src/AV/Input/GLInjectInput.cpp; do + substituteInPlace $i \ + --subst-var out \ + --subst-var-by sh ${stdenv.shell} + done + ''; + + nativeBuildInputs = [ pkgconfig cmake ninja ]; + buildInputs = [ + alsaLib ffmpeg libjack2 libX11 libXext libXfixes libGLU_combined + libpulseaudio qtbase qtx11extras + ]; + + meta = with stdenv.lib; { + description = "A screen recorder for Linux"; + homepage = http://www.maartenbaert.be/simplescreenrecorder; + license = licenses.gpl3; + platforms = [ "x86_64-linux" ]; + maintainers = [ maintainers.goibhniu ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/simplescreenrecorder/fix-paths.patch b/nixpkgs/pkgs/applications/video/simplescreenrecorder/fix-paths.patch new file mode 100644 index 000000000000..ba02240ce1f2 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/simplescreenrecorder/fix-paths.patch @@ -0,0 +1,35 @@ +diff --git a/scripts/ssr-glinject b/scripts/ssr-glinject +index 48be48d..5038d4c 100755 +--- a/scripts/ssr-glinject ++++ b/scripts/ssr-glinject +@@ -59,6 +59,6 @@ do + fi + done + +-echo "ssr-glinject: LD_PRELOAD = $LD_PRELOAD:libssr-glinject.so" ++echo "ssr-glinject: LD_PRELOAD = $LD_PRELOAD:@out@/lib/libssr-glinject.so" + echo "ssr-glinject: command = $@" +-LD_PRELOAD="$LD_PRELOAD:libssr-glinject.so" "$@" ++LD_PRELOAD="$LD_PRELOAD:@out@/lib/libssr-glinject.so" "$@" +diff --git a/src/AV/Input/GLInjectInput.cpp b/src/AV/Input/GLInjectInput.cpp +index 6b378f8..cbcf82b 100644 +--- a/src/AV/Input/GLInjectInput.cpp ++++ b/src/AV/Input/GLInjectInput.cpp +@@ -96,7 +96,7 @@ void GLInjectInput::SetCapturing(bool capturing) { + bool GLInjectInput::LaunchApplication(const QString& channel, bool relax_permissions, const QString& command, const QString& working_directory) { + + // prepare command +- QString full_command = "LD_PRELOAD=\"libssr-glinject.so\" "; ++ QString full_command = "LD_PRELOAD=\"@out@/lib/libssr-glinject.so\" "; + full_command += "SSR_CHANNEL=\"" + ShellEscape(channel) + "\" "; + if(relax_permissions) + full_command += "SSR_STREAM_RELAX_PERMISSIONS=1 "; +@@ -106,7 +106,7 @@ bool GLInjectInput::LaunchApplication(const QString& channel, bool relax_permiss + QStringList args; + args.push_back("-c"); + args.push_back(full_command); +- return QProcess::startDetached("/bin/sh", args, working_directory); ++ return QProcess::startDetached("@sh@", args, working_directory); + + } + diff --git a/nixpkgs/pkgs/applications/video/smplayer/default.nix b/nixpkgs/pkgs/applications/video/smplayer/default.nix new file mode 100644 index 000000000000..00a0942ccf6f --- /dev/null +++ b/nixpkgs/pkgs/applications/video/smplayer/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchurl, qmake, qtscript }: + +stdenv.mkDerivation rec { + name = "smplayer-19.5.0"; + + src = fetchurl { + url = "mirror://sourceforge/smplayer/${name}.tar.bz2"; + sha256 = "1xda9pbrc3dfbs71n5l8yszlcywz9456mwkv52vmn8lszhvjpjxm"; + }; + + buildInputs = [ qtscript ]; + nativeBuildInputs = [ qmake ]; + + dontUseQmakeConfigure = true; + + preConfigure = '' + makeFlags="PREFIX=$out" + ''; + + meta = { + description = "A complete front-end for MPlayer"; + homepage = http://smplayer.sourceforge.net/; + license = stdenv.lib.licenses.gpl3Plus; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/smtube/default.nix b/nixpkgs/pkgs/applications/video/smtube/default.nix new file mode 100644 index 000000000000..41f82a8bdd5c --- /dev/null +++ b/nixpkgs/pkgs/applications/video/smtube/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchurl, qmake, qtscript, qtwebkit }: + +stdenv.mkDerivation rec { + version = "19.6.0"; + name = "smtube-${version}"; + + src = fetchurl { + url = "mirror://sourceforge/smtube/SMTube/${version}/${name}.tar.bz2"; + sha256 = "0d3hskd6ar51zq29xj899i8sii9g4cxq99gz2y1dhgsnqbn36hpm"; + }; + + makeFlags = [ + "PREFIX=$(out)" + ]; + + dontUseQmakeConfigure = true; + + nativeBuildInputs = [ qmake ]; + buildInputs = [ qtscript qtwebkit ]; + + meta = with stdenv.lib; { + description = "Play and download Youtube videos"; + homepage = http://smplayer.sourceforge.net/smtube.php; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ vbgl ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/streamlink/default.nix b/nixpkgs/pkgs/applications/video/streamlink/default.nix new file mode 100644 index 000000000000..79f092a882c7 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/streamlink/default.nix @@ -0,0 +1,32 @@ +{ stdenv, pythonPackages, fetchFromGitHub, rtmpdump, ffmpeg }: + +pythonPackages.buildPythonApplication rec { + version = "1.1.1"; + name = "streamlink-${version}"; + + src = fetchFromGitHub { + owner = "streamlink"; + repo = "streamlink"; + rev = "${version}"; + sha256 = "1vyf0pifdqygg98azdkfhy5fdckb0w2ca7c46mkrj452gkvmcq33"; + }; + + checkInputs = with pythonPackages; [ pytest mock requests-mock freezegun ]; + + propagatedBuildInputs = (with pythonPackages; [ pycryptodome requests iso-639 iso3166 websocket_client isodate ]) ++ [ rtmpdump ffmpeg ]; + + meta = with stdenv.lib; { + homepage = https://github.com/streamlink/streamlink; + description = "CLI for extracting streams from various websites to video player of your choosing"; + longDescription = '' + Streamlink is a CLI utility that pipes flash videos from online + streaming services to a variety of video players such as VLC, or + alternatively, a browser. + + Streamlink is a fork of the livestreamer project. + ''; + license = licenses.bsd2; + platforms = platforms.linux ++ platforms.darwin; + maintainers = with maintainers; [ dezgeg zraexy enzime ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/subdl/default.nix b/nixpkgs/pkgs/applications/video/subdl/default.nix new file mode 100644 index 000000000000..32bd731f16e9 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/subdl/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchFromGitHub, python3 }: + +stdenv.mkDerivation rec { + name = "subdl-0.0pre.2017.11.06"; + + src = fetchFromGitHub { + owner = "alexanderwink"; + repo = "subdl"; + rev = "4cf5789b11f0ff3f863b704b336190bf968cd471"; + sha256 = "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"; + }; + + meta = { + homepage = https://github.com/alexanderwink/subdl; + description = "A command-line tool to download subtitles from opensubtitles.org"; + platforms = stdenv.lib.platforms.all; + license = stdenv.lib.licenses.gpl3; + maintainers = [ stdenv.lib.maintainers.exfalso ]; + }; + + buildInputs = [ python3 ]; + + installPhase = '' + install -vD subdl $out/bin/subdl + ''; +} diff --git a/nixpkgs/pkgs/applications/video/subtitleeditor/default.nix b/nixpkgs/pkgs/applications/video/subtitleeditor/default.nix new file mode 100644 index 000000000000..ea51471d9aa4 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/subtitleeditor/default.nix @@ -0,0 +1,63 @@ +{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, intltool, file, + desktop-file-utils, enchant, gtk3, gtkmm3, gst_all_1, hicolor-icon-theme, + libsigcxx, libxmlxx, xdg_utils, isocodes, wrapGAppsHook +}: + +let + version = "0.54.0"; +in + +stdenv.mkDerivation rec { + name = "subtitleeditor-${version}"; + + src = fetchFromGitHub { + owner = "kitone"; + repo = "subtitleeditor"; + rev = version; + sha256 = "0vxcscc9m6gymgj173ahk2g9hlk9588z5fdaavmkpyriqdlhwm11"; + }; + + nativeBuildInputs = [ + autoreconfHook + pkgconfig + intltool + file + wrapGAppsHook + ]; + + buildInputs = [ + desktop-file-utils + enchant + gtk3 + gtkmm3 + gst_all_1.gstreamer + gst_all_1.gstreamermm + gst_all_1.gst-plugins-base + gst_all_1.gst-plugins-good + hicolor-icon-theme + libsigcxx + libxmlxx + xdg_utils + isocodes + ]; + + enableParallelBuilding = true; + + preConfigure = "substituteInPlace ./configure --replace /usr/bin/file ${file}/bin/file"; + + configureFlags = [ "--disable-debug" ]; + + meta = { + description = "GTK+3 application to edit video subtitles"; + longDescription = '' + Subtitle Editor is a GTK+3 tool to edit subtitles for GNU/Linux/*BSD. It + can be used for new subtitles or as a tool to transform, edit, correct + and refine existing subtitle. This program also shows sound waves, which + makes it easier to synchronise subtitles to voices. + ''; + homepage = http://kitone.github.io/subtitleeditor/; + license = stdenv.lib.licenses.gpl3Plus; + platforms = stdenv.lib.platforms.linux; + maintainers = [ stdenv.lib.maintainers.plcplc ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/tivodecode/default.nix b/nixpkgs/pkgs/applications/video/tivodecode/default.nix new file mode 100644 index 000000000000..83ca41e201c9 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/tivodecode/default.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchurl }: + +let + version = "0.2pre4"; + +in + +stdenv.mkDerivation { + name = "tivodecode-${version}"; + + src = fetchurl { + url = "mirror://sourceforge/tivodecode/tivodecode/${version}/tivodecode-${version}.tar.gz"; + sha256 = "1pww5r2iygscqn20a1cz9xbfh18p84a6a5ifg4h5nvyn9b63k23q"; + }; + + meta = with stdenv.lib; { + description = "Converts a .TiVo file (produced by TiVoToGo) to a normal MPEG file"; + homepage = http://tivodecode.sourceforge.net; + platforms = platforms.unix; + license = licenses.bsd3; + }; +} diff --git a/nixpkgs/pkgs/applications/video/uvccapture/default.nix b/nixpkgs/pkgs/applications/video/uvccapture/default.nix new file mode 100644 index 000000000000..dd595baa52e8 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/uvccapture/default.nix @@ -0,0 +1,50 @@ +{ stdenv, fetchurl, libjpeg }: + +let + debianPatches = fetchurl { + url = "mirror://debian/pool/main/u/uvccapture/uvccapture_0.5-3.debian.tar.gz"; + sha256 = "0m29by13nw1r8sch366qzdxg5rsd1k766kqg1nj2pdb8f7pwjh9r"; + }; + +in + +stdenv.mkDerivation rec { + name = "uvccapture-0.5"; + + src = fetchurl { + url = "mirror://debian/pool/main/u/uvccapture/uvccapture_0.5.orig.tar.gz"; + sha256 = "1b3akkcmr3brbf93akr8xi20w8zqf2g0qfq928500wy04qi6jqpi"; + }; + + buildInputs = [ libjpeg ]; + + patchPhase = '' + tar xvf "${debianPatches}" + for fname in debian/patches/fix_videodev_include_FTBFS.patch \ + debian/patches/warnings.patch \ + debian/patches/numbuffers.patch + do + echo "Applying patch $fname" + patch < "$fname" + done + ''; + + makeFlagsArray = [ "PREFIX=$(out)/bin/" ]; + + preInstall = '' + mkdir -p "$out/bin" + ''; + + # Upstream has no man page, install one from Debian + postInstall = '' + mkdir -p "$out/share/man/man1" + cp -v debian/uvccapture.1 "$out/share/man/man1/" + ''; + + meta = with stdenv.lib; { + description = "Capture image from USB webcam at a specified interval"; + license = licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = [ maintainers.bjornfor ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/vdr/default.nix b/nixpkgs/pkgs/applications/video/vdr/default.nix new file mode 100644 index 000000000000..e81002193589 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/vdr/default.nix @@ -0,0 +1,55 @@ +{ stdenv, fetchurl, fontconfig, libjpeg, libcap, freetype, fribidi, pkgconfig +, gettext, systemd, perl, lib +, enableSystemd ? true +, enableBidi ? true +}: stdenv.mkDerivation rec { + + pname = "vdr"; + version = "2.4.1"; + + src = fetchurl { + url = "ftp://ftp.tvdr.de/vdr/${pname}-${version}.tar.bz2"; + sha256 = "1p51b14aqzncx3xpfg0rjplc48pg7520035i5p6r5zzkqhszihr5"; + }; + + enableParallelBuilding = true; + + postPatch = "substituteInPlace Makefile --replace libsystemd-daemon libsystemd"; + + buildInputs = [ fontconfig libjpeg libcap freetype ] + ++ lib.optional enableSystemd systemd + ++ lib.optional enableBidi fribidi; + + buildFlags = [ "vdr" "i18n" ] + ++ lib.optional enableSystemd "SDNOTIFY=1" + ++ lib.optional enableBidi "BIDI=1"; + + nativeBuildInputs = [ perl ]; + + # plugins uses the same build environment as vdr + propagatedNativeBuildInputs = [ pkgconfig gettext ]; + + installFlags = [ + "DESTDIR=$(out)" + "PREFIX=" # needs to be empty, otherwise plugins try to install at same prefix + ]; + + installTargets = [ "install-pc" "install-bin" "install-doc" "install-i18n" + "install-includes" ]; + + postInstall = '' + mkdir -p $out/lib/vdr # only needed if vdr is started without any plugin + mkdir -p $out/share/vdr/conf + cp *.conf $out/share/vdr/conf + ''; + + outputs = [ "out" "dev" "man" ]; + + meta = with lib; { + homepage = http://www.tvdr.de/; + description = "Video Disc Recorder"; + maintainers = [ maintainers.ck3d ]; + platforms = [ "i686-linux" "x86_64-linux" ]; + license = licenses.gpl2; + }; +} diff --git a/nixpkgs/pkgs/applications/video/vdr/plugins.nix b/nixpkgs/pkgs/applications/video/vdr/plugins.nix new file mode 100644 index 000000000000..022f4382a492 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/vdr/plugins.nix @@ -0,0 +1,338 @@ +{ stdenv, fetchurl, fetchgit, vdr, alsaLib, fetchFromGitHub +, libvdpau, libxcb, xcbutilwm, graphicsmagick, libav, pcre, xorgserver, ffmpeg +, libiconv, boost, libgcrypt, perl, utillinux, groff, libva, xorg, ncurses +, callPackage +}: let + mkPlugin = name: stdenv.mkDerivation { + name = "vdr-${vdr.version}-${name}"; + inherit (vdr) src; + buildInputs = [ vdr ]; + preConfigure = "cd PLUGINS/src/${name}"; + installFlags = [ "DESTDIR=$(out)" ]; + }; +in { + + xineliboutput = callPackage ./xineliboutput {}; + + skincurses = (mkPlugin "skincurses").overrideAttrs(oldAttr: { + buildInputs = oldAttr.buildInputs ++ [ ncurses ]; + }); + + inherit (stdenv.lib.genAttrs [ + "epgtableid0" "hello" "osddemo" "pictures" "servicedemo" "status" "svdrpdemo" + ] mkPlugin); + + femon = stdenv.mkDerivation rec { + + name = "vdr-femon-2.4.0"; + + buildInputs = [ vdr ]; + + src = fetchurl { + url = "http://www.saunalahti.fi/~rahrenbe/vdr/femon/files/${name}.tgz"; + sha256 = "1hra1xslj8s68zbyr8zdqp8yap0aj1p6rxyc6cwy1j122kwcnapp"; + }; + + postPatch = "substituteInPlace Makefile --replace /bin/true true"; + + makeFlags = [ "DESTDIR=$(out)" ]; + + meta = with stdenv.lib; { + homepage = http://www.saunalahti.fi/~rahrenbe/vdr/femon/; + description = "DVB Frontend Status Monitor plugin for VDR"; + maintainers = [ maintainers.ck3d ]; + license = licenses.gpl2; + platforms = [ "i686-linux" "x86_64-linux" ]; + }; + + }; + + vaapidevice = stdenv.mkDerivation { + + name = "vdr-vaapidevice-0.7.0"; + + buildInputs = [ + vdr libxcb xcbutilwm ffmpeg + alsaLib + libvdpau # vdpau + libva # va-api + ] ++ (with xorg; [ libxcb libX11 ]); + + makeFlags = [ "DESTDIR=$(out)" ]; + + postPatch = '' + substituteInPlace softhddev.c --replace /usr/bin/X ${xorgserver}/bin/X + ''; + + src = fetchFromGitHub { + owner = "pesintta"; + repo = "vdr-plugin-vaapidevice"; + sha256 = "072y61fpkh3i2dragg0nsd4g3malgwxkwpdrb1ykdljyzf52s5hs"; + rev = "c99afc23a53e6d91f9afaa99af59b30e68e626a8"; + }; + + meta = with stdenv.lib; { + homepage = https://github.com/pesintta/vdr-plugin-vaapidevice; + description = "VDR SoftHDDevice Plug-in (with VA-API VPP additions)"; + maintainers = [ maintainers.ck3d ]; + license = licenses.gpl2; + platforms = [ "i686-linux" "x86_64-linux" ]; + }; + + }; + + + markad = stdenv.mkDerivation rec { + name = "vdr-markad-2017-03-13"; + + src = fetchgit { + url = "git://projects.vdr-developer.org/vdr-plugin-markad.git"; + sha256 = "0jvy70r8bcmbs7zdqilfz019z5xkz5c6rs57h1dsgv8v6x86c2i4"; + rev = "ea2e182ec798375f3830f8b794e7408576f139ad"; + }; + + buildInputs = [ vdr libav ]; + + postPatch = '' + substituteInPlace command/Makefile --replace '$(DESTDIR)/usr' '$(DESTDIR)' + + substituteInPlace plugin/markad.cpp \ + --replace "/usr/bin" "$out/bin" \ + --replace "/var/lib/markad" "$out/var/lib/markad" + + substituteInPlace command/markad-standalone.cpp \ + --replace "/var/lib/markad" "$out/var/lib/markad" + ''; + + preBuild = '' + mkdir -p $out/lib/vdr + ''; + + buildFlags = [ + "DESTDIR=$(out)" + "LIBDIR=$(out)/lib/vdr" + "VDRDIR=${vdr.dev}/include/vdr" + "LOCALEDIR=$(DESTDIR)/share/locale" + ]; + + installFlags = buildFlags; + + meta = with stdenv.lib; { + homepage = https://projects.vdr-developer.org/projects/plg-markad; + description = "Ein Programm zum automatischen Setzen von Schnittmarken bei Werbeeinblendungen während einer Sendung."; + maintainers = [ maintainers.ck3d ]; + license = licenses.gpl2; + platforms = [ "i686-linux" "x86_64-linux" ]; + }; + + }; + + epgsearch = stdenv.mkDerivation rec { + pname = "vdr-epgsearch"; + version = "2.4.0"; + + src = fetchurl { + url = "https://projects.vdr-developer.org/git/vdr-plugin-epgsearch.git/snapshot/vdr-plugin-epgsearch-${version}.tar.bz2"; + sha256 = "0xfgn17vicyjwdf0rbkrik4q16mnfi305d4wmi8f0qk825pa0z3y"; + }; + + postPatch = '' + for f in *.sh; do + patchShebangs "$f" + done + ''; + + nativeBuildInputs = [ + perl # for pod2man and pos2html + utillinux + groff + ]; + + buildInputs = [ + vdr + pcre + ]; + + buildFlags = [ + "SENDMAIL=" + "REGEXLIB=pcre" + ]; + + installFlags = [ + "DESTDIR=$(out)" + ]; + + outputs = [ "out" "man" ]; + + meta = with stdenv.lib; { + homepage = http://winni.vdr-developer.org/epgsearch; + description = "Searchtimer and replacement of the VDR program menu"; + maintainers = [ maintainers.ck3d ]; + license = licenses.gpl2; + platforms = [ "i686-linux" "x86_64-linux" ]; + }; + + }; + + vnsiserver = let + name = "vnsiserver"; + version = "1.8.0"; + in stdenv.mkDerivation { + name = "vdr-${name}-${version}"; + + buildInputs = [ vdr ]; + + installFlags = [ "DESTDIR=$(out)" ]; + + src = fetchFromGitHub { + repo = "vdr-plugin-${name}"; + owner = "FernetMenta"; + rev = "v${version}"; + sha256 = "0n7idpxqx7ayd63scl6xwdx828ik4kb2mwz0c30cfjnmnxxd45lw"; + }; + + meta = with stdenv.lib; { + homepage = https://github.com/FernetMenta/vdr-plugin-vnsiserver; + description = "VDR plugin to handle KODI clients."; + maintainers = [ maintainers.ck3d ]; + license = licenses.gpl2; + platforms = [ "i686-linux" "x86_64-linux" ]; + }; + + }; + + text2skin = stdenv.mkDerivation rec { + name = "vdr-text2skin-1.3.4-20170702"; + + src = fetchgit { + url = "git://projects.vdr-developer.org/vdr-plugin-text2skin.git"; + sha256 = "19hkwmaw6nwak38bv6cm2vcjjkf4w5yjyxb98qq6zfjjh5wq54aa"; + rev = "8f7954da2488ced734c30e7c2704b92a44e6e1ad"; + }; + + buildInputs = [ vdr graphicsmagick ]; + + buildFlags = [ + "DESTDIR=$(out)" + "IMAGELIB=graphicsmagic" + "VDRDIR=${vdr.dev}/include/vdr" + "LOCALEDIR=$(DESTDIR)/share/locale" + "LIBDIR=$(DESTDIR)/lib/vdr" + ]; + + preBuild = '' + mkdir -p $out/lib/vdr + ''; + + installPhase = ":"; + + meta = with stdenv.lib; { + homepage = https://projects.vdr-developer.org/projects/plg-text2skin; + description = "VDR Text2Skin Plugin"; + maintainers = [ maintainers.ck3d ]; + license = licenses.gpl2; + platforms = [ "i686-linux" "x86_64-linux" ]; + }; + }; + + fritzbox = let + libconvpp = stdenv.mkDerivation { + name = "jowi24-libconv++-20130216"; + propagatedBuildInputs = [ libiconv ]; + CXXFLAGS = "-std=gnu++11 -Os"; + src = fetchFromGitHub { + owner = "jowi24"; + repo = "libconvpp"; + rev = "90769b2216bc66c5ea5e41a929236c20d367c63b"; + sha256 = "0bf0dwxrzd42l84p8nxcsjdk1gvzlhad93nsbn97z6kr61n4cr33"; + }; + installPhase = '' + mkdir -p $out/lib $out/include/libconv++ + cp source.a $out/lib/libconv++.a + cp *.h $out/include/libconv++ + ''; + }; + + liblogpp = stdenv.mkDerivation { + name = "jowi24-liblogpp-20130216"; + CXXFLAGS = "-std=gnu++11 -Os"; + src = fetchFromGitHub { + owner = "jowi24"; + repo = "liblogpp"; + rev = "eee4046d2ae440974bcc8ceec00b069f0a2c62b9"; + sha256 = "01aqvwmwh5kk3mncqpim8llwha9gj5qq0c4cvqfn4h8wqi3d9l3p"; + }; + installPhase = '' + mkdir -p $out/lib $out/include/liblog++ + cp source.a $out/lib/liblog++.a + cp *.h $out/include/liblog++ + ''; + }; + + libnetpp = stdenv.mkDerivation { + name = "jowi24-libnet++-20180628"; + CXXFLAGS = "-std=gnu++11 -Os"; + src = fetchFromGitHub { + owner = "jowi24"; + repo = "libnetpp"; + rev = "212847f0efaeffee8422059b8e202d844174aaf3"; + sha256 = "0vjl6ld6aj25rzxm26yjv3h2gy7gp7qnbinpw6sf1shg2xim9x0b"; + }; + installPhase = '' + mkdir -p $out/lib $out/include/libnet++ + cp source.a $out/lib/libnet++.a + cp *.h $out/include/libnet++ + ''; + buildInputs = [ boost liblogpp libconvpp ]; + }; + + libfritzpp = stdenv.mkDerivation { + name = "jowi24-libfritzpp-20131201"; + CXXFLAGS = "-std=gnu++11 -Os"; + src = fetchFromGitHub { + owner = "jowi24"; + repo = "libfritzpp"; + rev = "ca19013c9451cbac7a90155b486ea9959ced0f67"; + sha256 = "0jk93zm3qzl9z96gfs6xl1c8ip8lckgbzibf7jay7dbgkg9kyjfg"; + }; + installPhase = '' + mkdir -p $out/lib $out/include/libfritz++ + cp source.a $out/lib/libfritz++.a + cp *.h $out/include/libfritz++ + ''; + propagatedBuildInputs = [ libgcrypt ]; + buildInputs = [ boost liblogpp libconvpp libnetpp ]; + }; + + in stdenv.mkDerivation rec { + pname = "vdr-fritzbox"; + + version = "1.5.3"; + + src = fetchFromGitHub { + owner = "jowi24"; + repo = "vdr-fritz"; + rev = version; + sha256 = "0wab1kyma9jzhm6j33cv9hd2a5d1334ghgdi2051nmr1bdcfcsw8"; + }; + + postUnpack = '' + cp ${libfritzpp}/lib/* $sourceRoot/libfritz++ + cp ${liblogpp}/lib/* $sourceRoot/liblog++ + cp ${libnetpp}/lib/* $sourceRoot/libnet++ + cp ${libconvpp}/lib/* $sourceRoot/libconv++ + ''; + + buildInputs = [ vdr boost libconvpp libfritzpp libnetpp liblogpp ]; + + installFlags = [ "DESTDIR=$(out)" ]; + + meta = with stdenv.lib; { + homepage = https://github.com/jowi24/vdr-fritz; + description = "A plugin for VDR to access AVMs Fritz Box routers"; + maintainers = [ maintainers.ck3d ]; + license = licenses.gpl2; + platforms = [ "i686-linux" "x86_64-linux" ]; + }; + }; +} diff --git a/nixpkgs/pkgs/applications/video/vdr/wrapper.nix b/nixpkgs/pkgs/applications/video/vdr/wrapper.nix new file mode 100644 index 000000000000..497ad7c77a08 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/vdr/wrapper.nix @@ -0,0 +1,30 @@ +{ symlinkJoin, lib, makeWrapper, vdr +, plugins ? [] +}: let + + makeXinePluginPath = l: lib.concatStringsSep ":" (map (p: "${p}/lib/xine/plugins") l); + + requiredXinePlugins = lib.flatten (map (p: p.passthru.requiredXinePlugins or []) plugins); + +in symlinkJoin { + + name = "vdr-with-plugins-${(builtins.parseDrvName vdr.name).version}"; + + paths = [ vdr ] ++ plugins; + + nativeBuildInputs = [ makeWrapper ]; + + postBuild = '' + wrapProgram $out/bin/vdr \ + --add-flags "-L $out/lib/vdr --localedir=$out/share/locale" \ + --prefix XINE_PLUGIN_PATH ":" ${makeXinePluginPath requiredXinePlugins} + ''; + + meta = with vdr.meta; { + inherit license homepage; + description = description + + " (with plugins: " + + lib.concatStrings (lib.intersperse ", " (map (x: ""+x.name) plugins)) + + ")"; + }; +} diff --git a/nixpkgs/pkgs/applications/video/vdr/xineliboutput/default.nix b/nixpkgs/pkgs/applications/video/vdr/xineliboutput/default.nix new file mode 100644 index 000000000000..98fcd2b5d408 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/vdr/xineliboutput/default.nix @@ -0,0 +1,64 @@ +{ stdenv, fetchurl, lib, vdr +, libav, libcap, libvdpau +, xineLib, libjpeg, libextractor, mesa, libGLU +, libX11, libXext, libXrender, libXrandr +, makeWrapper +}: let + name = "vdr-xineliboutput-2.1.0"; + + makeXinePluginPath = l: lib.concatStringsSep ":" (map (p: "${p}/lib/xine/plugins") l); + + self = stdenv.mkDerivation { + inherit name; + + src = fetchurl { + url = "mirror://sourceforge/project/xineliboutput/xineliboutput/${name}/${name}.tgz"; + sha256 = "1phrxpaz8li7z0qy241spawalhcmwkv5hh3gdijbv4h7mm899yba"; + }; + + # configure don't accept argument --prefix + dontAddPrefix = true; + + postConfigure = '' + sed -i config.mak \ + -e 's,XINEPLUGINDIR=/[^/]*/[^/]*/[^/]*/,XINEPLUGINDIR=/,' + ''; + + makeFlags = [ "DESTDIR=$(out)" ]; + + postFixup = '' + for f in $out/bin/*; do + wrapProgram $f \ + --prefix XINE_PLUGIN_PATH ":" "${makeXinePluginPath [ "$out" xineLib ]}" + done + ''; + + nativeBuildInputs = [ makeWrapper ]; + + buildInputs = [ + libav + libcap + libextractor + libjpeg + libGLU + libvdpau + libXext + libXrandr + libXrender + libX11 + mesa + vdr + xineLib + ]; + + passthru.requiredXinePlugins = [ xineLib self ]; + + meta = with lib;{ + homepage = "https://sourceforge.net/projects/xineliboutput/"; + description = "Xine-lib based software output device for VDR"; + maintainers = [ maintainers.ck3d ]; + license = licenses.gpl2; + inherit (vdr.meta) platforms; + }; + }; +in self diff --git a/nixpkgs/pkgs/applications/video/vlc/default.nix b/nixpkgs/pkgs/applications/video/vlc/default.nix new file mode 100644 index 000000000000..e9fc0b4feda3 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/vlc/default.nix @@ -0,0 +1,102 @@ +{ stdenv, fetchurl, autoreconfHook +, libarchive, perl, xorg, libdvdnav, libbluray +, zlib, a52dec, libmad, faad2, ffmpeg, alsaLib +, pkgconfig, dbus, fribidi, freefont_ttf, libebml, libmatroska +, libvorbis, libtheora, speex, lua5, libgcrypt, libgpgerror, libupnp +, libcaca, libpulseaudio, flac, schroedinger, libxml2, librsvg +, mpeg2dec, systemd, gnutls, avahi, libcddb, libjack2, SDL, SDL_image +, libmtp, unzip, taglib, libkate, libtiger, libv4l, samba, liboggz +, libass, libva, libdvbpsi, libdc1394, libraw1394, libopus +, libvdpau, libsamplerate, live555, fluidsynth, wayland, wayland-protocols +, onlyLibVLC ? false +, withQt5 ? true, qtbase ? null, qtsvg ? null, qtx11extras ? null +, jackSupport ? false +, removeReferencesTo +, chromecastSupport ? true, protobuf, libmicrodns +}: + +# chromecastSupport requires TCP port 8010 to be open for it to work. +# If your firewall is enabled, make sure to have something like: +# networking.firewall.allowedTCPPorts = [ 8010 ]; + +with stdenv.lib; + +assert (withQt5 -> qtbase != null && qtsvg != null && qtx11extras != null); + +stdenv.mkDerivation rec { + name = "vlc-${version}"; + version = "3.0.7.1"; + + src = fetchurl { + url = "http://get.videolan.org/vlc/${version}/${name}.tar.xz"; + sha256 = "1xb4c8n0hkwijzfdlbwadhxnx9z8rlhmrdq4c7q74rq9f51q0m86"; + }; + + # VLC uses a *ton* of libraries for various pieces of functionality, many of + # which are not included here for no other reason that nobody has mentioned + # needing them + buildInputs = [ + zlib a52dec libmad faad2 ffmpeg alsaLib libdvdnav libdvdnav.libdvdread + libbluray dbus fribidi libvorbis libtheora speex lua5 libgcrypt libgpgerror + libupnp libcaca libpulseaudio flac schroedinger libxml2 librsvg mpeg2dec + systemd gnutls avahi libcddb SDL SDL_image libmtp unzip taglib libarchive + libkate libtiger libv4l samba liboggz libass libdvbpsi libva + xorg.xlibsWrapper xorg.libXv xorg.libXvMC xorg.libXpm xorg.xcbutilkeysyms + libdc1394 libraw1394 libopus libebml libmatroska libvdpau libsamplerate + fluidsynth wayland wayland-protocols + ] ++ optional (!stdenv.hostPlatform.isAarch64) live555 + ++ optionals withQt5 [ qtbase qtsvg qtx11extras ] + ++ optional jackSupport libjack2 + ++ optionals chromecastSupport [ protobuf libmicrodns ]; + + nativeBuildInputs = [ autoreconfHook perl pkgconfig removeReferencesTo ]; + + enableParallelBuilding = true; + + LIVE555_PREFIX = if (!stdenv.hostPlatform.isAarch64) then live555 else null; + + # vlc depends on a c11-gcc wrapper script which we don't have so we need to + # set the path to the compiler + BUILDCC = "${stdenv.cc}/bin/gcc"; + + postPatch = '' + substituteInPlace configure \ + --replace /bin/echo echo + + substituteInPlace modules/text_renderer/freetype/platform_fonts.h --replace \ + /usr/share/fonts/truetype/freefont ${freefont_ttf}/share/fonts/truetype + ''; + + # - Touch plugins (plugins cache keyed off mtime and file size: + # https://github.com/NixOS/nixpkgs/pull/35124#issuecomment-370552830 + # - Remove references to the Qt development headers (used in error messages) + postFixup = '' + find $out/lib/vlc/plugins -exec touch -d @1 '{}' ';' + $out/lib/vlc/vlc-cache-gen $out/vlc/plugins + '' + optionalString withQt5 '' + remove-references-to -t "${qtbase.dev}" $out/lib/vlc/plugins/gui/libqt_plugin.so + ''; + + # Most of the libraries are auto-detected so we don't need to set a bunch of + # "--enable-foo" flags here + configureFlags = [ + "--with-kde-solid=$out/share/apps/solid/actions" + ] ++ optional onlyLibVLC "--disable-vlc" + ++ optionals chromecastSupport [ + "--enable-sout" + "--enable-chromecast" + "--enable-microdns" + ]; + + # Remove runtime dependencies on libraries + postConfigure = '' + sed -i 's|^#define CONFIGURE_LINE.*$|#define CONFIGURE_LINE "<removed>"|g' config.h + ''; + + meta = with stdenv.lib; { + description = "Cross-platform media player and streaming server"; + homepage = http://www.videolan.org/vlc/; + license = licenses.lgpl21Plus; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/vokoscreen/default.nix b/nixpkgs/pkgs/applications/video/vokoscreen/default.nix new file mode 100644 index 000000000000..e609c1cd3395 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/vokoscreen/default.nix @@ -0,0 +1,53 @@ +{ stdenv, fetchFromGitHub +, pkgconfig, qtbase, qttools, qmake, qtmultimedia, qtx11extras, alsaLib, libv4l, libXrandr +, ffmpeg +}: + +stdenv.mkDerivation rec { + + pname = "vokoscreen"; + version = "2.5.8-beta"; + + src = fetchFromGitHub { + owner = "vkohaupt"; + repo = "vokoscreen"; + rev = version; + sha256 = "1a85vbsi53mhzva49smqwcs61c51wv3ic410nvb9is9nlsbifwan"; + }; + + nativeBuildInputs = [ pkgconfig qmake ]; + buildInputs = [ + alsaLib + libv4l + qtbase + qtmultimedia + qttools + qtx11extras + libXrandr + ]; + + patches = [ + ./ffmpeg-out-of-box.patch + ]; + + preConfigure = '' + sed -i 's/lrelease-qt5/lrelease/g' vokoscreen.pro + ''; + + postConfigure = '' + substituteInPlace settings/QvkSettings.cpp --subst-var-by ffmpeg ${ffmpeg} + ''; + + meta = with stdenv.lib; { + description = "Simple GUI screencast recorder, using ffmpeg"; + homepage = "http://linuxecke.volkoh.de/vokoscreen/vokoscreen.html"; + longDescription = '' + vokoscreen is an easy to use screencast creator to record + educational videos, live recordings of browser, installation, + videoconferences, etc. + ''; + license = licenses.gpl2Plus; + maintainers = [ maintainers.league ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/vokoscreen/ffmpeg-out-of-box.patch b/nixpkgs/pkgs/applications/video/vokoscreen/ffmpeg-out-of-box.patch new file mode 100644 index 000000000000..afcee3f9715f --- /dev/null +++ b/nixpkgs/pkgs/applications/video/vokoscreen/ffmpeg-out-of-box.patch @@ -0,0 +1,24 @@ +diff --git a/settings/QvkSettings.cpp b/settings/QvkSettings.cpp +index 3008e62..07485bd 100644 +--- a/settings/QvkSettings.cpp ++++ b/settings/QvkSettings.cpp +@@ -66,17 +66,8 @@ void QvkSettings::readAll() + Minimized = settings.value( "Minimized", 0 ).toUInt(); + MinimizedByStart = settings.value( "MinimizedByStart", 0 ).toUInt(); + Countdown = settings.value( "Countdown", 0 ).toUInt(); +- QFile file; +- if ( file.exists( qApp->applicationDirPath().append( "/bin/ffmpeg" ) ) == true ) +- { +- vokoscreenWithLibs = true; +- Recorder = qApp->applicationDirPath().append( "/bin/ffmpeg" ); +- } +- else +- { +- vokoscreenWithLibs = false; +- Recorder = settings.value( "Recorder", "ffmpeg" ).toString(); +- } ++ vokoscreenWithLibs = true; ++ Recorder = settings.value( "Recorder", "@ffmpeg@/bin/ffmpeg" ).toString(); + settings.endGroup(); + + settings.beginGroup( "Videooptions" ); diff --git a/nixpkgs/pkgs/applications/video/w_scan/default.nix b/nixpkgs/pkgs/applications/video/w_scan/default.nix new file mode 100644 index 000000000000..2bf74da3d0f2 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/w_scan/default.nix @@ -0,0 +1,19 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + name = "w_scan-${version}"; + version = "20170107"; + + src = fetchurl { + url = "http://wirbel.htpc-forum.de/w_scan/${name}.tar.bz2"; + sha256 = "1zkgnj2sfvckix360wwk1v5s43g69snm45m0drnzyv7hgf5g7q1q"; + }; + + meta = { + description = "Small CLI utility to scan DVB and ATSC transmissions"; + homepage = http://wirbel.htpc-forum.de/w_scan/index_en.html; + platforms = stdenv.lib.platforms.linux; + maintainers = [ stdenv.lib.maintainers.nico202 ] ; + license = stdenv.lib.licenses.gpl2; + }; +} diff --git a/nixpkgs/pkgs/applications/video/webtorrent_desktop/default.nix b/nixpkgs/pkgs/applications/video/webtorrent_desktop/default.nix new file mode 100644 index 000000000000..086190000ab4 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/webtorrent_desktop/default.nix @@ -0,0 +1,88 @@ +{ + alsaLib, atk, cairo, cups, dbus, dpkg, expat, fetchurl, fontconfig, freetype, + gdk_pixbuf, glib, gnome2, libX11, libXScrnSaver, libXcomposite, libXcursor, + libXdamage, libXext, libXfixes, libXi, libXrandr, libXrender, libXtst, + libxcb, nspr, nss, stdenv, udev +}: + + let + rpath = stdenv.lib.makeLibraryPath ([ + alsaLib + atk + cairo + cups + dbus + expat + fontconfig + freetype + gdk_pixbuf + glib + gnome2.GConf + gnome2.gtk + gnome2.pango + libX11 + libXScrnSaver + libXcomposite + libXcursor + libXdamage + libXext + libXfixes + libXi + libXrandr + libXrender + libXtst + libxcb + nspr + nss + stdenv.cc.cc + udev + ]); + in stdenv.mkDerivation rec { + name = "webtorrent-desktop-${version}"; + version = "0.20.0"; + + src = + if stdenv.hostPlatform.system == "x86_64-linux" then + fetchurl { + url = "https://github.com/webtorrent/webtorrent-desktop/releases/download/v0.20.0/webtorrent-desktop_${version}-1_amd64.deb"; + sha256 = "1kkrnbimiip5pn2nwpln35bbdda9gc3cgrjwphq4fqasbjf2781k"; + } + else + throw "Webtorrent is not currently supported on ${stdenv.hostPlatform.system}"; + phases = [ "unpackPhase" "installPhase" ]; + nativeBuildInputs = [ dpkg ]; + unpackPhase = "dpkg-deb -x $src ."; + installPhase = '' + mkdir -p $out + cp -R opt $out + + mv ./usr/share $out/share + mv $out/opt/webtorrent-desktop $out/libexec + chmod +x $out/libexec/WebTorrent + rmdir $out/opt + + chmod -R g-w $out + + # Patch WebTorrent + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ + --set-rpath ${rpath}:$out/libexec $out/libexec/WebTorrent + + # Symlink to bin + mkdir -p $out/bin + ln -s $out/libexec/WebTorrent $out/bin/WebTorrent + + # Fix the desktop link + substituteInPlace $out/share/applications/webtorrent-desktop.desktop \ + --replace /opt/webtorrent-desktop $out/bin + ''; + + meta = with stdenv.lib; { + description = "Streaming torrent app for Mac, Windows, and Linux."; + homepage = https://webtorrent.io/desktop; + license = licenses.mit; + maintainers = [ maintainers.flokli ]; + platforms = [ + "x86_64-linux" + ]; + }; + } diff --git a/nixpkgs/pkgs/applications/video/wf-recorder/default.nix b/nixpkgs/pkgs/applications/video/wf-recorder/default.nix new file mode 100644 index 000000000000..d52a4a6ab9b9 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/wf-recorder/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchFromGitHub, meson, ninja, pkgconfig, wayland, wayland-protocols +, ffmpeg, x264, libpulseaudio +}: + +stdenv.mkDerivation rec { + pname = "wf-recorder"; + version = "0.1"; + + src = fetchFromGitHub { + owner = "ammen99"; + repo = pname; + rev = "v${version}"; + sha256 = "1rl75r87ijja9mfyrwrsz8r4zvjnhm0103qmgyhq2phlrdpkks5d"; + }; + + nativeBuildInputs = [ meson ninja pkgconfig ]; + buildInputs = [ wayland wayland-protocols ffmpeg x264 libpulseaudio ]; + + meta = with stdenv.lib; { + description = "Utility program for screen recording of wlroots-based compositors"; + homepage = https://github.com/ammen99/wf-recorder; + license = licenses.mit; + maintainers = with maintainers; [ CrazedProgrammer ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/wxcam/default.nix b/nixpkgs/pkgs/applications/video/wxcam/default.nix new file mode 100644 index 000000000000..64fcf0ba04a5 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/wxcam/default.nix @@ -0,0 +1,51 @@ +{ stdenv, fetchurl +, pkgconfig +, intltool +, libX11, libXv, libSM +, gtk, libglade +, wxGTK +, perlPackages +, xvidcore +, mjpegtools +, alsaLib +, libv4l +, cimg }: + +stdenv.mkDerivation rec { + + name = "wxcam-${version}"; + version = "1.1"; + + src = fetchurl { + url = "mirror://sourceforge/project/wxcam/wxcam/${version}/${name}.tar.gz"; + sha256 = "1765bvc65fpzn9ycnnj5hais9xkx9v0sm6a878d35x54bpanr859"; + }; + + buildInputs = with stdenv.lib; + [ pkgconfig intltool libX11 libXv libSM gtk libglade wxGTK perlPackages.XMLParser xvidcore mjpegtools alsaLib libv4l cimg ]; + + NIX_CFLAGS_COMPILE="-I ${cimg}/include/cimg"; + + postUnpack = '' + sed -ie 's|/usr/share/|'"$out/share/"'|g' $sourceRoot/Makefile.in + ''; + + installPhase = '' + make install prefix="$out" wxcamdocdir="$out/share/doc/wxcam" + ''; + + meta = with stdenv.lib; { + description = "An open-source, wxGTK-based webcam app for Linux"; + longDescription = '' + wxCam is a webcam application for linux. It supports video recording + (avi uncompressed and Xvid formats), snapshot taking, and some special + commands for philips webcams, so you can also use it for astronomy purposes. + It supports both video4linux 1 and 2 drivers, + so it should work on a very large number of devices. + ''; + homepage = http://wxcam.sourceforge.net/; + license = licenses.gpl3Plus; + maintainers = [ maintainers.AndersonTorres ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/xawtv/default.nix b/nixpkgs/pkgs/applications/video/xawtv/default.nix new file mode 100644 index 000000000000..db9a5ce7850b --- /dev/null +++ b/nixpkgs/pkgs/applications/video/xawtv/default.nix @@ -0,0 +1,32 @@ +{stdenv, fetchurl, ncurses, libjpeg, libX11, libXt, alsaLib, aalib, libXft, xorgproto, libv4l +, libFS, libXaw, libXpm, libXext, libSM, libICE, perl, linux}: + +stdenv.mkDerivation rec { + name = "xawtv-3.106"; + src = fetchurl { + url = "https://linuxtv.org/downloads/xawtv/${name}.tar.bz2"; + sha256 = "174wd36rk0k23mgx9nlnpc398yd1f0wiv060963axg6sz0v4rksp"; + }; + + preConfigure = '' + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${linux}/lib/modules/${linux.modDirVersion}/build" + ''; + + configureFlags= [ "--prefix=" ]; + + NIX_LDFLAGS = "-lgcc_s"; + + makeFlags = "SUID_ROOT= DESTDIR=\$(out) PREFIX="; + + buildInputs = [ncurses libjpeg libX11 libXt libXft xorgproto libFS perl alsaLib aalib + libXaw libXpm libXext libSM libICE libv4l]; + + meta = { + description = "TV application for Linux with apps and tools such as a teletext browser"; + license = stdenv.lib.licenses.gpl2; + homepage = https://www.kraxel.org/blog/linux/xawtv/; + maintainers = with stdenv.lib.maintainers; [ domenkozar ]; + platforms = stdenv.lib.platforms.linux; + }; + +} diff --git a/nixpkgs/pkgs/applications/video/xine-ui/default.nix b/nixpkgs/pkgs/applications/video/xine-ui/default.nix new file mode 100644 index 000000000000..4d3d88d5be8d --- /dev/null +++ b/nixpkgs/pkgs/applications/video/xine-ui/default.nix @@ -0,0 +1,34 @@ +{stdenv, fetchurl, pkgconfig, xorg, libpng, xineLib, readline, ncurses, curl +, lirc, shared-mime-info, libjpeg }: + +stdenv.mkDerivation rec { + name = "xine-ui-0.99.10"; + + src = fetchurl { + url = "mirror://sourceforge/xine/${name}.tar.xz"; + sha256 = "0i3jzhiipfs5p1jbxviwh42zcfzag6iqc6yycaan0vrqm90an86a"; + }; + + nativeBuildInputs = [ pkgconfig shared-mime-info ]; + + buildInputs = + [ xineLib libpng readline ncurses curl lirc libjpeg + xorg.xlibsWrapper xorg.libXext xorg.libXv xorg.libXxf86vm xorg.libXtst xorg.xorgproto + xorg.libXinerama xorg.libXi xorg.libXft + ]; + + patchPhase = ''sed -e '/curl\/types\.h/d' -i src/xitk/download.c''; + + configureFlags = [ "--with-readline=${readline.dev}" ]; + + LIRC_CFLAGS="-I${lirc}/include"; + LIRC_LIBS="-L ${lirc}/lib -llirc_client"; +#NIX_LDFLAGS = "-lXext -lgcc_s"; + + meta = with stdenv.lib; { + homepage = http://www.xine-project.org/; + description = "Xlib-based interface to Xine, a video player"; + platforms = platforms.linux; + license = licenses.gpl2; + }; +} diff --git a/nixpkgs/pkgs/applications/video/xscast/default.nix b/nixpkgs/pkgs/applications/video/xscast/default.nix new file mode 100644 index 000000000000..ae048f1bdac4 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/xscast/default.nix @@ -0,0 +1,35 @@ +{ stdenv, fetchFromGitHub, makeWrapper, ffmpeg, imagemagick, dzen2, xorg }: + +stdenv.mkDerivation rec { + name = "xscast-unstable-${version}"; + version = "2016-07-26"; + + src = fetchFromGitHub { + owner = "KeyboardFire"; + repo = "xscast"; + rev = "9e6fd3c28d3f5ae630619f6dbccaf1f6ca594b21"; + sha256 = "0br27bq9bpglfdpv63h827bipgvhlh10liyhmhcxls4227kagz72"; + }; + + buildInputs = [ makeWrapper ]; + + installPhase = '' + runHook preInstall + + install -Dm755 xscast.sh $out/bin/xscast + install -Dm644 xscast.1 $out/share/man/man1/xscast.1 + patchShebangs $out/bin + + wrapProgram "$out/bin/xscast" \ + --prefix PATH : ${stdenv.lib.makeBinPath [ ffmpeg dzen2 xorg.xwininfo xorg.xinput xorg.xmodmap imagemagick ]} + + runHook postInstall + ''; + + meta = with stdenv.lib; { + homepage = https://github.com/KeyboardFire/xscast; + license = licenses.mit; + description = "Screencasts of windows with list of keystrokes overlayed"; + maintainers = with maintainers; [ ma27 ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/xvidcap/default.nix b/nixpkgs/pkgs/applications/video/xvidcap/default.nix new file mode 100644 index 000000000000..6e07fbb105b6 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/xvidcap/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchurl, perlPackages, pkgconfig, gtk2 +, scrollkeeper, libglade, libXmu, libX11, libXext, gettext +, lame, libXfixes, libXdamage }: + +stdenv.mkDerivation { + name = "xvidcap-1.1.7"; + + src = fetchurl { + url = mirror://sourceforge/xvidcap/xvidcap-1.1.7.tar.gz; + sha256 = "0p8rhpyhxgy37crf1xk1046z4p663jg7ww776jw92pld3s024ihm"; + }; + + patches = [ ./xlib.patch ]; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ + gtk2 scrollkeeper + libglade libXmu gettext lame libXdamage libXfixes libXext libX11 + ] ++ (with perlPackages; [ perl XMLParser ]); + + # !!! don't know why this is necessary + NIX_LDFLAGS = "-lXext -lX11 -lz -lgcc_s"; + + meta = with stdenv.lib; { + description = "Screencast video catpuring tool"; + homepage = http://xvidcap.sourceforge.net/; + license = stdenv.lib.licenses.gpl2; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/xvidcap/xlib.patch b/nixpkgs/pkgs/applications/video/xvidcap/xlib.patch new file mode 100644 index 000000000000..eb97854386b2 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/xvidcap/xlib.patch @@ -0,0 +1,15 @@ +diff --git a/src/app_data.c b/src/app_data.c +index 5a44363..482b115 100644 +--- a/src/app_data.c ++++ b/src/app_data.c +@@ -52,9 +52,9 @@ + #include <pthread.h> + #include <signal.h> + ++#include <X11/Xlib.h> + #ifdef HAVE_LIBXFIXES + #include <X11/X.h> +-#include <X11/Xlib.h> + #include <X11/Xlibint.h> + #include <X11/Xproto.h> + #include <X11/Xutil.h> |