1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-16 09:53:17 +00:00
nixpkgs/pkgs/applications/video/vdr/wrapper.nix
John Ericson 9b090ccbca treewide: Get rid of most parseDrvName without breaking compat
That is because this commit should be merged to both master and
release-19.09.
2019-11-24 17:22:28 +00:00

31 lines
791 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 ":" ${makeXinePluginPath requiredXinePlugins}
'';
meta = with vdr.meta; {
inherit license homepage;
description = description
+ " (with plugins: "
+ lib.concatStrings (lib.intersperse ", " (map (x: ""+x.name) plugins))
+ ")";
};
}