···428428429429In case you are patching `package.json` or `pnpm-lock.yaml`, make sure to pass `finalAttrs.patches` to the function as well (i.e. `inherit (finalAttrs) patches`.
430430431431-`pnpm.configHook` supports adding additional `pnpm install` flags via `pnpmInstallFlags` which can be set to a Nix string array.
431431+`pnpm.configHook` supports adding additional `pnpm install` flags via `pnpmInstallFlags` which can be set to a Nix string array:
432432+433433+```nix
434434+{
435435+ pnpm,
436436+}:
437437+438438+stdenv.mkDerivation (finalAttrs: {
439439+ pname = "foo";
440440+ version = "0-unstable-1980-01-01";
441441+442442+ src = ...;
443443+444444+ pnpmInstallFlags = [ "--shamefully-hoist" ];
445445+446446+ pnpmDeps = pnpm.fetchDeps {
447447+ inherit (finalAttrs) pnpmInstallFlags;
448448+ };
449449+})
450450+```
432451433452#### Dealing with `sourceRoot` {#javascript-pnpm-sourceRoot}
434453···459478460479#### PNPM Workspaces {#javascript-pnpm-workspaces}
461480462462-If you need to use a PNPM workspace for your project, then set `pnpmWorkspace = "<workspace project name>"` in your `pnpm.fetchDeps` call,
463463-which will make PNPM only install dependencies for that workspace package.
481481+If you need to use a PNPM workspace for your project, then set `pnpmWorkspaces = [ "<workspace project name 1>" "<workspace project name 2>" ]`, etc, in your `pnpm.fetchDeps` call,
482482+which will make PNPM only install dependencies for those workspace packages.
464483465484For example:
466485467486```nix
468487...
469469-pnpmWorkspace = "@astrojs/language-server";
488488+pnpmWorkspaces = [ "@astrojs/language-server" ];
470489pnpmDeps = pnpm.fetchDeps {
471471- inherit (finalAttrs) pnpmWorkspace;
490490+ inherit (finalAttrs) pnpmWorkspaces;
472491 ...
473492}
474493```
···476495The above would make `pnpm.fetchDeps` call only install dependencies for the `@astrojs/language-server` workspace package.
477496Note that you do not need to set `sourceRoot` to make this work.
478497479479-Usually in such cases, you'd want to use `pnpm --filter=$pnpmWorkspace build` to build your project, as `npmHooks.npmBuildHook` probably won't work. A `buildPhase` based on the following example will probably fit most workspace projects:
498498+Usually in such cases, you'd want to use `pnpm --filter=<pnpm workspace name> build` to build your project, as `npmHooks.npmBuildHook` probably won't work. A `buildPhase` based on the following example will probably fit most workspace projects:
480499481500```nix
482501buildPhase = ''
+4-2
maintainers/scripts/rebuild-amount.sh
···8181 # could eat too much memory for a standard 4GiB machine.
8282 local -a list
8383 for i in 1 2; do
8484- local l="$($MKTEMP)"
8484+ local l
8585+ l="$($MKTEMP)"
8586 list[$i]="$l"
8687 toRemove+=("$l")
87888888- local expr="$($MKTEMP)"
8989+ local expr
9090+ expr="$($MKTEMP)"
8991 toRemove+=("$expr")
9092 nixexpr "${!i}" > "$expr"
9193
···12731273 yacc = throw "'yacc' has been renamed to/replaced by 'bison'"; # Converted to throw 2024-10-17
12741274 yafaray-core = libyafaray; # Added 2022-09-23
12751275 yi = throw "'yi' has been removed, as it was broken and unmaintained"; # added 2024-05-09
12761276+ youtrack_2022_3 = throw "'youtrack_2022_3' has been removed as it was deprecated. Please update to the 'youtrack' package."; # Added 2024-10-17
12761277 yrd = throw "'yrd' has been removed, as it was broken and unmaintained"; # added 2024-05-27
1277127812781279 ### Z ###