nixpkgs-suyu/pkgs/applications/video/vdr/wrapper.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
797 B
Nix
Raw Normal View History

{ 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" \
2022-05-06 18:30:18 +02:00
--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)
+ ")";
};
}