mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
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:
parent
efe4d48e8e
commit
ab9515092b
1 changed files with 5 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue