git.iko.soy/typeable/nixpkgs
on master help sign in
initial vdr plugin xineliboutput-2.1.0

Needed to patch package xineLib to fix usage of XINE_PLUGIN_PATH .

commit8eafd21f9e25d0de92079d04412d985558daeb4d authorChristian Kögler <ck3d@gmx.de> dateFri 14 Jun 2019, 10:04 (7 years ago) parent7815c86
4 files changed+89−6
pkgs/applications/video/vdr/plugins.nix+5−2 pkgs/applications/video/vdr/wrapper.nix+12−3 pkgs/applications/video/vdr/xineliboutput/default.nix+63 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, ffmpeg_2, 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+63
@@ -0,0 +1,63 @@
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+ name = "src.tgz";
16+ url = "https://sourceforge.net/projects/xineliboutput/files/xineliboutput/${name}/${name}.tgz/download";
17+ sha256 = "6af99450ad0792bd646c6f4058f6e49541aab8ba3a10e131f82752f4d5ed19de";
18+ };
19+
20+ configurePhase = ''
21+ ./configure
22+ sed -i config.mak \
23+ -e 's,XINEPLUGINDIR=/[^/]*/[^/]*/[^/]*/,XINEPLUGINDIR=/,'
24+ '';
25+
26+ makeFlags = [ "DESTDIR=$(out)" ];
27+
28+ postFixup = ''
29+ for f in $out/bin/*; do
30+ wrapProgram $f \
31+ --prefix XINE_PLUGIN_PATH ":" "${makeXinePluginPath [ "$out" xineLib ]}"
32+ done
33+ '';
34+
35+ nativeBuildInputs = [ makeWrapper ];
36+
37+ buildInputs = [
38+ libav
39+ libcap
40+ libextractor
41+ libjpeg
42+ libGLU
43+ libvdpau
44+ libXext
45+ libXrandr
46+ libXrender
47+ libX11
48+ mesa_noglu
49+ vdr
50+ xineLib
51+ ];
52+
53+ passthru.requiredXinePlugins = [ xineLib self ];
54+
55+ meta = with lib;{
56+ homepage = https://sourceforge.net/projects/xineliboutput/;
57+ description = "xine-lib based software output device for VDR.";
58+ maintainers = [ maintainers.ck3d ];
59+ license = licenses.gpl2;
60+ platforms = [ "i686-linux" "x86_64-linux" ];
61+ };
62+ };
63+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];