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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user