···210* `npmPruneFlags`: Flags to pass to `npm prune`. Defaults to the value of `npmInstallFlags`.
211* `makeWrapperArgs`: Flags to pass to `makeWrapper`, added to executable calling the generated `.js` with `node` as an interpreter. These scripts are defined in `package.json`.
212* `nodejs`: The `nodejs` package to build against, using the corresponding `npm` shipped with that version of `node`. Defaults to `pkgs.nodejs`.
0213214#### prefetch-npm-deps {#javascript-buildNpmPackage-prefetch-npm-deps}
215
···210* `npmPruneFlags`: Flags to pass to `npm prune`. Defaults to the value of `npmInstallFlags`.
211* `makeWrapperArgs`: Flags to pass to `makeWrapper`, added to executable calling the generated `.js` with `node` as an interpreter. These scripts are defined in `package.json`.
212* `nodejs`: The `nodejs` package to build against, using the corresponding `npm` shipped with that version of `node`. Defaults to `pkgs.nodejs`.
213+* `npmDeps`: The dependencies used to build the npm package. Especially useful to not have to recompute workspace depedencies.
214215#### prefetch-npm-deps {#javascript-buildNpmPackage-prefetch-npm-deps}
216
···35 # Value for npm `--workspace` flag and directory in which the files to be installed are found.
36, npmWorkspace ? null
37, nodejs ? topLevelArgs.nodejs
0000038, ...
39} @ args:
4041let
42- npmDeps = fetchNpmDeps {
43- inherit forceGitDeps src srcs sourceRoot prePatch patches postPatch;
44- name = "${name}-npm-deps";
45- hash = npmDepsHash;
46- };
47-48 # .override {} negates splicing, so we need to use buildPackages explicitly
49 npmHooks = buildPackages.npmHooks.override {
50 inherit nodejs;
···35 # Value for npm `--workspace` flag and directory in which the files to be installed are found.
36, npmWorkspace ? null
37, nodejs ? topLevelArgs.nodejs
38+, npmDeps ? fetchNpmDeps {
39+ inherit forceGitDeps src srcs sourceRoot prePatch patches postPatch;
40+ name = "${name}-npm-deps";
41+ hash = npmDepsHash;
42+}
43, ...
44} @ args:
4546let
00000047 # .override {} negates splicing, so we need to use buildPackages explicitly
48 npmHooks = buildPackages.npmHooks.override {
49 inherit nodejs;