nixpkgs-suyu/pkgs/applications/video/vdr/wrapper.nix
polykernel ca20a96b5f treewide: concatStrings (intersperse ...) -> concatStringsSep ...
Update all usage of lib.concatStrings (lib.intersperse ...) to
lib.concatStringsSep. This produces the same result as per https://github.com/NixOS/nixpkgs/pull/135843,
however it yields a performance benefit on Nix versions that
support the builtins.concatStringsSep primop.
2021-08-28 11:57:59 -04:00

30 lines
776 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.concatStringsSep ", " (map (x: ""+x.name) plugins)
+ ")";
};
}