2019-06-14 09:04:27 +01: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
|
|
|
|
2019-11-24 17:22:28 +00:00
|
|
|
name = "vdr-with-plugins-${lib.getVersion vdr}";
|
2018-12-08 09:18:26 +00:00
|
|
|
|
|
|
|
paths = [ vdr ] ++ plugins;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
postBuild = ''
|
2019-06-14 09:04:27 +01: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))
|
|
|
|
+ ")";
|
|
|
|
};
|
|
|
|
}
|