Files
nixpkgs/pkgs/applications/video/vdr/wrapper.nix
2026-08-11 09:24:24 +02:00

38 lines
831 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 {
pname = "vdr-with-plugins";
inherit (vdr) version;
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 = {
inherit (vdr.meta) license homepage;
description =
vdr.meta.description
+ " (with plugins: "
+ lib.concatStringsSep ", " (map (x: "" + x.name) plugins)
+ ")";
};
}