Fix 'argument list too long' during build
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -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: ''
|
||||
cp ${fetchOne args} '${args.filename}'
|
||||
'') cacheEntries;
|
||||
collectCacheScript = writeText "collect-cache.sh" (
|
||||
lib.concatMapStrings (args: ''
|
||||
cp ${fetchOne args} '${args.filename}'
|
||||
'') 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.
|
||||
|
||||
Reference in New Issue
Block a user