summary refs log tree commit diff
path: root/pkgs/applications/video/vdr
diff options
context:
space:
mode:
authormarkuskowa <markus.kowalewski@gmail.com>2019-06-20 13:37:36 +0200
committerGitHub <noreply@github.com>2019-06-20 13:37:36 +0200
commit02128a8bb505c424b50a55559a4095027be90937 (patch)
tree5500ac3bb6346434d91f95dfccbb635c8b87b7d4 /pkgs/applications/video/vdr
parenta4c5d37226c20351c75c89ec75d64bc53d3386d3 (diff)
parent10d9abb1eb117f676d97e3e37574f56d3d21440f (diff)
downloadnixpkgs-02128a8bb505c424b50a55559a4095027be90937.tar
nixpkgs-02128a8bb505c424b50a55559a4095027be90937.tar.gz
nixpkgs-02128a8bb505c424b50a55559a4095027be90937.tar.bz2
nixpkgs-02128a8bb505c424b50a55559a4095027be90937.tar.lz
nixpkgs-02128a8bb505c424b50a55559a4095027be90937.tar.xz
nixpkgs-02128a8bb505c424b50a55559a4095027be90937.tar.zst
nixpkgs-02128a8bb505c424b50a55559a4095027be90937.zip
Merge pull request #63113 from ck3d/vdr-xineliboutput
initial vdr plugin xineliboutput-2.1.0
Diffstat (limited to 'pkgs/applications/video/vdr')
-rw-r--r--pkgs/applications/video/vdr/plugins.nix7
-rw-r--r--pkgs/applications/video/vdr/wrapper.nix15
-rw-r--r--pkgs/applications/video/vdr/xineliboutput/default.nix64
3 files changed, 81 insertions, 5 deletions
diff --git a/pkgs/applications/video/vdr/plugins.nix b/pkgs/applications/video/vdr/plugins.nix
index 589c0144647..022f4382a49 100644
--- a/pkgs/applications/video/vdr/plugins.nix
+++ b/pkgs/applications/video/vdr/plugins.nix
@@ -1,7 +1,8 @@
 { stdenv, fetchurl, fetchgit, vdr, 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 2272d1605fd..497ad7c77a0 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 00000000000..d2215b7e486
--- /dev/null
+++ b/pkgs/applications/video/vdr/xineliboutput/default.nix
@@ -0,0 +1,64 @@
+{ 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 {
+      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_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;
+      inherit (vdr.meta) platforms;
+    };
+  };
+in self