mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
symlinkJoin: fix "bash: Argument list too long" error
When the `paths` argument is too big `symlinkJoin` will fail with: ``` while setting up the build environment: executing '/nix/store/rm1hz1lybxangc8sdl7xvzs5dcvigvf7-bash-4.4-p23/bin/bash': Argument list too long ``` This is fixed by passing `paths` as a file instead of as an environment variable.
This commit is contained in:
parent
fc592a52ca
commit
4e0a6bc4be
@ -255,11 +255,14 @@ rec {
|
||||
}:
|
||||
let
|
||||
args = removeAttrs args_ [ "name" "postBuild" ]
|
||||
// { inherit preferLocalBuild allowSubstitutes; }; # pass the defaults
|
||||
// {
|
||||
inherit preferLocalBuild allowSubstitutes;
|
||||
passAsFile = [ "paths" ];
|
||||
}; # pass the defaults
|
||||
in runCommand name args
|
||||
''
|
||||
mkdir -p $out
|
||||
for i in $paths; do
|
||||
for i in $(cat $pathsPath); do
|
||||
${lndir}/bin/lndir -silent $i $out
|
||||
done
|
||||
${postBuild}
|
||||
|
Loading…
Reference in New Issue
Block a user