From ab9515092b291fb92cf83a21c2a344a096ae8474 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Thu, 14 Jul 2016 15:30:30 +0200 Subject: [PATCH] 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. --- pkgs/build-support/trivial-builders.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/build-support/trivial-builders.nix b/pkgs/build-support/trivial-builders.nix index 18e49105ae78..8775286b1172 100644 --- a/pkgs/build-support/trivial-builders.nix +++ b/pkgs/build-support/trivial-builders.nix @@ -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