pnpm-config-hook: propagate writableTmpDirAsHomeHook

This should bring this in line with other packages in nixpkgs.

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
Sefa Eyeoglu
2026-03-14 10:33:30 +01:00
parent 7cdabd1793
commit 890910d4c3
2 changed files with 3 additions and 2 deletions
@@ -7,6 +7,7 @@
cacert,
makeSetupHook,
pnpm,
writableTmpDirAsHomeHook,
yq,
zstd,
}:
@@ -198,6 +199,7 @@ in
pnpmConfigHook = makeSetupHook {
name = "pnpm-config-hook";
propagatedBuildInputs = [
writableTmpDirAsHomeHook
zstd
];
substitutions = {
@@ -25,7 +25,6 @@ pnpmConfigHook() {
echo "Configuring pnpm store"
export HOME=$(mktemp -d)
export STORE_PATH=$(mktemp -d)
export npm_config_arch="@npmArch@"
export npm_config_platform="@npmPlatform@"
@@ -41,7 +40,7 @@ pnpmConfigHook() {
# If the packageManager field in package.json is set to a different pnpm version than what is in nixpkgs,
# any pnpm command would fail in that directory, the following disables this
pushd ..
pushd $HOME
pnpm config set manage-package-manager-versions false
popd