Skip to content

Commit 25cae90

Browse files
committed
chore(pnpm): pin an autoDedupe-capable toolchain
Pin the manifest and Nix package to pnpm 12.8.1 so autoDedupe no longer aborts frozen installs on a manifest-matching package manager. Build the official release with fixed source and Cargo hashes. Remove pnpm's Cargo source replacements to keep Nix's vendored dependencies authoritative.
1 parent 6a0401f commit 25cae90

3 files changed

Lines changed: 15 additions & 3 deletions

File tree

‎nix/pnpm.nix‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@
33
perSystem =
44
{ system, ... }:
55
{
6-
packages.pnpm = inputs.pnpm-nixpkgs.legacyPackages.${system}.pnpm_12;
6+
# The pinned nixpkgs pnpm predates autoDedupe support.
7+
packages.pnpm =
8+
(inputs.pnpm-nixpkgs.legacyPackages.${system}.pnpm_12.override {
9+
version = "12.8.1";
10+
srcHash = "sha256-masnC/BOw8SGlwCxbnfHl0qiOatiXacEPYvV6hVyVAY=";
11+
cargoHash = "sha256-rT3kFHLPVSwAqM2e0HXfeF2rGG/btFr3lsokVhs9OIk=";
12+
}).overrideAttrs
13+
(previous: {
14+
postPatch = (previous.postPatch or "") + ''
15+
# Nix supplies vendored Cargo sources; pnpm's duplicates the Git source.
16+
sed -i '/# >>> pnpm-managed cargo sources >>>/,/# <<< pnpm-managed cargo sources <<</d' .cargo/config.toml
17+
'';
18+
});
719
};
820
}

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
"preinstall": "npx only-allow pnpm"
1313
},
1414
"dependencies": {},
15-
"packageManager": "pnpm@12.5.1"
15+
"packageManager": "pnpm@12.8.1"
1616
}

‎pnpm-workspace.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@ pmOnFail: ignore
4646

4747
# Collapse duplicate versions when one satisfies every range, so the lockfile
4848
# does not accumulate redundant copies between manual `pnpm dedupe` runs.
49-
# Requires pnpm 12.6+; older pnpm warns and ignores it.
49+
# Requires pnpm 12.6+, pinned for Nix and package-manager installs.
5050
autoDedupe: true

0 commit comments

Comments
 (0)