Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
30 lines
797 B
Nix
30 lines
797 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-${lib.getVersion vdr}";
|
|
|
|
paths = [ vdr ] ++ plugins;
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
postBuild = ''
|
|
wrapProgram $out/bin/vdr \
|
|
--add-flags "-L $out/lib/vdr --localedir=$out/share/locale" \
|
|
--prefix XINE_PLUGIN_PATH ":" ${lib.escapeShellArg (makeXinePluginPath requiredXinePlugins)}
|
|
'';
|
|
|
|
meta = with vdr.meta; {
|
|
inherit license homepage;
|
|
description = description
|
|
+ " (with plugins: "
|
|
+ lib.concatStringsSep ", " (map (x: ""+x.name) plugins)
|
|
+ ")";
|
|
};
|
|
}
|