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
+7 -5
View File
@@ -1,7 +1,7 @@
# This file is generated by running "yarn install" inside your project. # This file is generated by running "yarn install" inside your project.
# Manual changes might be lost - proceed with caution! # Manual changes might be lost - proceed with caution!
{ lib, coreutils, nodejs, stdenv }: src: { lib, coreutils, nodejs, stdenv, writeText }: src:
let let
@@ -28,9 +28,11 @@ let
}; };
# Shell snippet to collect all project dependencies. # Shell snippet to collect all project dependencies.
collectCache = lib.concatMapStrings (args: '' collectCacheScript = writeText "collect-cache.sh" (
cp ${fetchOne args} '${args.filename}' lib.concatMapStrings (args: ''
'') cacheEntries; cp ${fetchOne args} '${args.filename}'
'') cacheEntries
);
in stdenv.mkDerivation { in stdenv.mkDerivation {
name = @@PROJECT_NAME@@; name = @@PROJECT_NAME@@;
@@ -60,7 +62,7 @@ in stdenv.mkDerivation {
rm -fr '${cacheFolder}' rm -fr '${cacheFolder}'
mkdir -p '${cacheFolder}' mkdir -p '${cacheFolder}'
pushd '${cacheFolder}' > /dev/null pushd '${cacheFolder}' > /dev/null
${collectCache} source ${collectCacheScript}
popd > /dev/null popd > /dev/null
# Store the absolute path to Yarn for the 'yarn' alias. # Store the absolute path to Yarn for the 'yarn' alias.