chore: Nix: fix depRoot with huge number of deps (#2179)
If `deps` or `depRoots` are too large, bash will carsh when executing the modified script. This is because there are OS-level limits on the size of environment variables. This commit changes the script so that `deps` and `depRoots` are written to files instead of being passed as environment variables.
This commit is contained in:
parent
742d053a97
commit
6d583284df
1 changed files with 4 additions and 2 deletions
|
|
@ -69,12 +69,14 @@ with builtins; let
|
|||
name = "${name}-depRoot";
|
||||
inherit deps;
|
||||
depRoots = map (drv: drv.LEAN_PATH) deps;
|
||||
|
||||
passAsFile = [ "deps" "depRoots" ];
|
||||
buildCommand = ''
|
||||
mkdir -p $out
|
||||
for i in $depRoots; do
|
||||
for i in $(cat $depRootsPath); do
|
||||
cp -dru --no-preserve=mode $i/. $out
|
||||
done
|
||||
for i in $deps; do
|
||||
for i in $(cat $depsPath); do
|
||||
cp -drsu --no-preserve=mode $i/. $out
|
||||
done
|
||||
'';
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue