nixpkgs/pkgs/applications/video/vdr/wrapper.nix
Christian Kögler 8eafd21f9e initial vdr plugin xineliboutput-2.1.0
Needed to patch package xineLib to fix usage of XINE_PLUGIN_PATH .
2019-06-14 10:04:27 +02:00

31 lines
813 B
Nix

{ 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))
+ ")";
};
}