Split runtime node_modules into reusable layers
- Add shared installFlags support to the common Bun node_modules builder - Factor base and desktop overlay node_modules derivations for reuse - Reuse the new runtime node_modules outputs in desktop and server builds
This commit is contained in:
@@ -17,6 +17,9 @@
|
||||
|
||||
renderBunFilters = filters:
|
||||
lib.concatMapStringsSep "\n" (filter: " --filter ${filter} \\") filters;
|
||||
|
||||
renderBunInstallFlags = flags:
|
||||
lib.concatMapStringsSep "\n" (flag: " ${flag} \\") flags;
|
||||
in {
|
||||
inherit workspacePreparePatched;
|
||||
|
||||
@@ -29,6 +32,7 @@ in {
|
||||
src,
|
||||
outputHash,
|
||||
filters,
|
||||
installFlags ? [],
|
||||
extraNativeBuildInputs ? [],
|
||||
impureEnvVars ? [],
|
||||
extraEnv ? "",
|
||||
@@ -68,6 +72,7 @@ in {
|
||||
--backend=copyfile \
|
||||
--linker=hoisted \
|
||||
--no-progress \
|
||||
${renderBunInstallFlags installFlags}
|
||||
${renderBunFilters filters}
|
||||
|
||||
bun --bun ${./scripts/canonicalize-node-modules.ts}
|
||||
|
||||
Reference in New Issue
Block a user