2019-06-14 08:04:27 +00:00
|
|
|
{ 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 {
|
2018-12-08 09:18:26 +00:00
|
|
|
|
|
|
|
name = "vdr-with-plugins-${(builtins.parseDrvName vdr.name).version}";
|
|
|
|
|
|
|
|
paths = [ vdr ] ++ plugins;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
postBuild = ''
|
2019-06-14 08:04:27 +00:00
|
|
|
wrapProgram $out/bin/vdr \
|
|
|
|
--add-flags "-L $out/lib/vdr --localedir=$out/share/locale" \
|
|
|
|
--prefix XINE_PLUGIN_PATH ":" ${makeXinePluginPath requiredXinePlugins}
|
2018-12-08 09:18:26 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with vdr.meta; {
|
|
|
|
inherit license homepage;
|
|
|
|
description = description
|
|
|
|
+ " (with plugins: "
|
|
|
|
+ lib.concatStrings (lib.intersperse ", " (map (x: ""+x.name) plugins))
|
|
|
|
+ ")";
|
|
|
|
};
|
|
|
|
}
|