diff options
author | Christian Kögler <ck3d@gmx.de> | 2019-06-14 10:04:27 +0200 |
---|---|---|
committer | Christian Kögler <ck3d@gmx.de> | 2019-06-14 10:04:27 +0200 |
commit | 8eafd21f9e25d0de92079d04412d985558daeb4d (patch) | |
tree | eea24a63dc9faa4b09e200e9c3dbc474f4df04e1 /pkgs/applications/video | |
parent | 7815c86c104a99417db844791dcda34fe7a7965f (diff) | |
download | nixlib-8eafd21f9e25d0de92079d04412d985558daeb4d.tar nixlib-8eafd21f9e25d0de92079d04412d985558daeb4d.tar.gz nixlib-8eafd21f9e25d0de92079d04412d985558daeb4d.tar.bz2 nixlib-8eafd21f9e25d0de92079d04412d985558daeb4d.tar.lz nixlib-8eafd21f9e25d0de92079d04412d985558daeb4d.tar.xz nixlib-8eafd21f9e25d0de92079d04412d985558daeb4d.tar.zst nixlib-8eafd21f9e25d0de92079d04412d985558daeb4d.zip |
initial vdr plugin xineliboutput-2.1.0
Needed to patch package xineLib to fix usage of XINE_PLUGIN_PATH .
Diffstat (limited to 'pkgs/applications/video')
-rw-r--r-- | pkgs/applications/video/vdr/plugins.nix | 7 | ||||
-rw-r--r-- | pkgs/applications/video/vdr/wrapper.nix | 15 | ||||
-rw-r--r-- | pkgs/applications/video/vdr/xineliboutput/default.nix | 63 |
3 files changed, 80 insertions, 5 deletions
diff --git a/pkgs/applications/video/vdr/plugins.nix b/pkgs/applications/video/vdr/plugins.nix index 4fc3783ba510..45991f259cf0 100644 --- a/pkgs/applications/video/vdr/plugins.nix +++ b/pkgs/applications/video/vdr/plugins.nix @@ -1,7 +1,8 @@ { stdenv, fetchurl, fetchgit, vdr, ffmpeg_2, alsaLib, fetchFromGitHub , libvdpau, libxcb, xcbutilwm, graphicsmagick, libav, pcre, xorgserver, ffmpeg -, libiconv, boost, libgcrypt, perl, utillinux, groff, libva, xorg, ncurses }: -let +, libiconv, boost, libgcrypt, perl, utillinux, groff, libva, xorg, ncurses +, callPackage +}: let mkPlugin = name: stdenv.mkDerivation { name = "vdr-${vdr.version}-${name}"; inherit (vdr) src; @@ -11,6 +12,8 @@ let }; in { + xineliboutput = callPackage ./xineliboutput {}; + skincurses = (mkPlugin "skincurses").overrideAttrs(oldAttr: { buildInputs = oldAttr.buildInputs ++ [ ncurses ]; }); diff --git a/pkgs/applications/video/vdr/wrapper.nix b/pkgs/applications/video/vdr/wrapper.nix index 2272d1605fd0..497ad7c77a08 100644 --- a/pkgs/applications/video/vdr/wrapper.nix +++ b/pkgs/applications/video/vdr/wrapper.nix @@ -1,5 +1,12 @@ -{ symlinkJoin, lib, makeWrapper, vdr, plugins ? [] }: -symlinkJoin { +{ 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}"; @@ -8,7 +15,9 @@ symlinkJoin { nativeBuildInputs = [ makeWrapper ]; postBuild = '' - wrapProgram $out/bin/vdr --add-flags "-L $out/lib/vdr --localedir=$out/share/locale" + wrapProgram $out/bin/vdr \ + --add-flags "-L $out/lib/vdr --localedir=$out/share/locale" \ + --prefix XINE_PLUGIN_PATH ":" ${makeXinePluginPath requiredXinePlugins} ''; meta = with vdr.meta; { diff --git a/pkgs/applications/video/vdr/xineliboutput/default.nix b/pkgs/applications/video/vdr/xineliboutput/default.nix new file mode 100644 index 000000000000..2184730cd765 --- /dev/null +++ b/pkgs/applications/video/vdr/xineliboutput/default.nix @@ -0,0 +1,63 @@ +{ stdenv, fetchurl, lib, vdr +, libav, libcap, libvdpau +, xineLib, libjpeg, libextractor, mesa_noglu, 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 { + name = "src.tgz"; + url = "https://sourceforge.net/projects/xineliboutput/files/xineliboutput/${name}/${name}.tgz/download"; + sha256 = "6af99450ad0792bd646c6f4058f6e49541aab8ba3a10e131f82752f4d5ed19de"; + }; + + configurePhase = '' + ./configure + 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_noglu + 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; + platforms = [ "i686-linux" "x86_64-linux" ]; + }; + }; +in self |