Fix 'argument list too long' during build

This commit is contained in:
Stéphan Kochen
2020-11-28 13:46:53 +01:00
parent 513b296d93
commit 60d9093d93
2 changed files with 8 additions and 6 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+6 -4
View File
@@ -1,7 +1,7 @@
# This file is generated by running "yarn install" inside your project.
# Manual changes might be lost - proceed with caution!
{ lib, coreutils, nodejs, stdenv }: src:
{ lib, coreutils, nodejs, stdenv, writeText }: src:
let
@@ -28,9 +28,11 @@ let
};
# Shell snippet to collect all project dependencies.
collectCache = lib.concatMapStrings (args: ''
collectCacheScript = writeText "collect-cache.sh" (
lib.concatMapStrings (args: ''
cp ${fetchOne args} '${args.filename}'
'') cacheEntries;
'') cacheEntries
);
in stdenv.mkDerivation {
name = @@PROJECT_NAME@@;
@@ -60,7 +62,7 @@ in stdenv.mkDerivation {
rm -fr '${cacheFolder}'
mkdir -p '${cacheFolder}'
pushd '${cacheFolder}' > /dev/null
${collectCache}
source ${collectCacheScript}
popd > /dev/null
# Store the absolute path to Yarn for the 'yarn' alias.