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
|
|
|
|
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 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: "
|
2021-08-28 15:18:03 +00:00
|
|
|
+ lib.concatStringsSep ", " (map (x: ""+x.name) plugins)
|
2018-12-08 09:18:26 +00:00
|
|
|
+ ")";
|
|
|
|
};
|
|
|
|
}
|