1{
2 symlinkJoin,
3 lib,
4 makeWrapper,
5 vdr,
6 plugins ? [ ],
7}:
8let
9
10 makeXinePluginPath = l: lib.concatStringsSep ":" (map (p: "${p}/lib/xine/plugins") l);
11
12 requiredXinePlugins = lib.flatten (map (p: p.passthru.requiredXinePlugins or [ ]) plugins);
13
14in
15symlinkJoin {
16
17 name = "vdr-with-plugins-${lib.getVersion vdr}";
18
19 paths = [ vdr ] ++ plugins;
20
21 nativeBuildInputs = [ makeWrapper ];
22
23 postBuild = ''
24 wrapProgram $out/bin/vdr \
25 --add-flags "-L $out/lib/vdr --localedir=$out/share/locale" \
26 --prefix XINE_PLUGIN_PATH ":" ${lib.escapeShellArg (makeXinePluginPath requiredXinePlugins)}
27 '';
28
29 meta = with vdr.meta; {
30 inherit license homepage;
31 description =
32 description + " (with plugins: " + lib.concatStringsSep ", " (map (x: "" + x.name) plugins) + ")";
33 };
34}