git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #63113 from ck3d/vdr-xineliboutput

initial vdr plugin xineliboutput-2.1.0

commit02128a8bb505c424b50a55559a4095027be90937 authormarkuskowa <markus.kowalewski@gmail.com> dateThu 20 Jun 2019, 13:37 (7 years ago) parenta4c5d3710d9abb
4 files changed+90−6
pkgs/applications/video/vdr/plugins.nix+5−2 pkgs/applications/video/vdr/wrapper.nix+12−3 pkgs/applications/video/vdr/xineliboutput/default.nix+64 pkgs/development/libraries/xine-lib/default.nix+9−1
pkgs/applications/video/vdr/plugins.nix+5−2
@@ -1,7 +1,8 @@
11{ stdenv, fetchurl, fetchgit, vdr, alsaLib, fetchFromGitHub
22, libvdpau, libxcb, xcbutilwm, graphicsmagick, libav, pcre, xorgserver, ffmpeg
3−, libiconv, boost, libgcrypt, perl, utillinux, groff, libva, xorg, ncurses }:
4−let
3+, libiconv, boost, libgcrypt, perl, utillinux, groff, libva, xorg, ncurses
4+, callPackage
5+}: let
56 mkPlugin = name: stdenv.mkDerivation {
67 name = "vdr-${vdr.version}-${name}";
78 inherit (vdr) src;
@@ -11,6 +12,8 @@ let
1112 };
1213in {
1314
15+ xineliboutput = callPackage ./xineliboutput {};
16+
1417 skincurses = (mkPlugin "skincurses").overrideAttrs(oldAttr: {
1518 buildInputs = oldAttr.buildInputs ++ [ ncurses ];
1619 });
pkgs/applications/video/vdr/wrapper.nix+12−3
@@ -1,5 +1,12 @@
1−{ symlinkJoin, lib, makeWrapper, vdr, plugins ? [] }:
2−symlinkJoin {
1+{ symlinkJoin, lib, makeWrapper, vdr
2+, plugins ? []
3+}: let
4+
5+ makeXinePluginPath = l: lib.concatStringsSep ":" (map (p: "${p}/lib/xine/plugins") l);
6+
7+ requiredXinePlugins = lib.flatten (map (p: p.passthru.requiredXinePlugins or []) plugins);
8+
9+in symlinkJoin {
310
411 name = "vdr-with-plugins-${(builtins.parseDrvName vdr.name).version}";
512
@@ -8,7 +15,9 @@ symlinkJoin {
815 nativeBuildInputs = [ makeWrapper ];
916
1017 postBuild = ''
11− wrapProgram $out/bin/vdr --add-flags "-L $out/lib/vdr --localedir=$out/share/locale"
18+ wrapProgram $out/bin/vdr \
19+ --add-flags "-L $out/lib/vdr --localedir=$out/share/locale" \
20+ --prefix XINE_PLUGIN_PATH ":" ${makeXinePluginPath requiredXinePlugins}
1221 '';
1322
1423 meta = with vdr.meta; {
pkgs/applications/video/vdr/xineliboutput/default.nixnew file+64
@@ -0,0 +1,64 @@
1+{ stdenv, fetchurl, lib, vdr
2+, libav, libcap, libvdpau
3+, xineLib, libjpeg, libextractor, mesa_noglu, libGLU
4+, libX11, libXext, libXrender, libXrandr
5+, makeWrapper
6+}: let
7+ name = "vdr-xineliboutput-2.1.0";
8+
9+ makeXinePluginPath = l: lib.concatStringsSep ":" (map (p: "${p}/lib/xine/plugins") l);
10+
11+ self = stdenv.mkDerivation {
12+ inherit name;
13+
14+ src = fetchurl {
15+ url = "mirror://sourceforge/project/xineliboutput/xineliboutput/${name}/${name}.tgz";
16+ sha256 = "1phrxpaz8li7z0qy241spawalhcmwkv5hh3gdijbv4h7mm899yba";
17+ };
18+
19+ # configure don't accept argument --prefix
20+ dontAddPrefix = true;
21+
22+ postConfigure = ''
23+ sed -i config.mak \
24+ -e 's,XINEPLUGINDIR=/[^/]*/[^/]*/[^/]*/,XINEPLUGINDIR=/,'
25+ '';
26+
27+ makeFlags = [ "DESTDIR=$(out)" ];
28+
29+ postFixup = ''
30+ for f in $out/bin/*; do
31+ wrapProgram $f \
32+ --prefix XINE_PLUGIN_PATH ":" "${makeXinePluginPath [ "$out" xineLib ]}"
33+ done
34+ '';
35+
36+ nativeBuildInputs = [ makeWrapper ];
37+
38+ buildInputs = [
39+ libav
40+ libcap
41+ libextractor
42+ libjpeg
43+ libGLU
44+ libvdpau
45+ libXext
46+ libXrandr
47+ libXrender
48+ libX11
49+ mesa_noglu
50+ vdr
51+ xineLib
52+ ];
53+
54+ passthru.requiredXinePlugins = [ xineLib self ];
55+
56+ meta = with lib;{
57+ homepage = "https://sourceforge.net/projects/xineliboutput/";
58+ description = "Xine-lib based software output device for VDR";
59+ maintainers = [ maintainers.ck3d ];
60+ license = licenses.gpl2;
61+ inherit (vdr.meta) platforms;
62+ };
63+ };
64+in self
pkgs/development/libraries/xine-lib/default.nix+9−1
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, pkgconfig, xorg, alsaLib, libGLU_combined, aalib
1+{ stdenv, fetchurl, fetchpatch, pkgconfig, xorg, alsaLib, libGLU_combined, aalib
22, libvorbis, libtheora, speex, zlib, perl, ffmpeg
33, flac, libcaca, libpulseaudio, libmng, libcdio, libv4l, vcdimager
44, libmpcdec
@@ -20,6 +20,14 @@ stdenv.mkDerivation rec {
2020 libcaca libpulseaudio libmng libcdio libv4l vcdimager libmpcdec
2121 ];
2222
23+ patches = [
24+ (fetchpatch {
25+ name = "0001-fix-XINE_PLUGIN_PATH-splitting.patch";
26+ url = "https://sourceforge.net/p/xine/mailman/attachment/32394053-5e27-6558-f0c9-49e0da0bc3cc%40gmx.de/1/";
27+ sha256 = "0nrsdn7myvjs8fl9rj6k4g1bnv0a84prsscg1q9n49gwn339v5rc";
28+ })
29+ ];
30+
2331 NIX_LDFLAGS = "-lxcb-shm";
2432
2533 propagatedBuildInputs = [zlib];