symlinkJoin: truly pass the defaulted parameters

The catch is that in nix the @-pattern binds the set that was *explicitly*
passed to the function, i.e. default values are *not* taken into account.
This commit is contained in:
Vladimír Čunát 2016-07-14 15:30:30 +02:00
parent efe4d48e8e
commit ab9515092b

View file

@ -49,15 +49,17 @@ rec {
# Create a forest of symlinks to the files in `paths'.
symlinkJoin =
args@{ name
args_@{ name
, paths
, preferLocalBuild ? true
, allowSubstitutes ? false
, postBuild ? ""
, ...
}:
runCommand name
(removeAttrs args [ "name" "postBuild" ])
let
args = removeAttrs args_ [ "name" "postBuild" ]
// { inherit preferLocalBuild allowSubstitutes; }; # pass the defaults
in runCommand name args
''
mkdir -p $out
for i in $paths; do