Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit d6a5c8a

Browse files
keegancsmithvovakulikov
authored andcommitted
nix: assert typescript version and reduce repetition in nodejs.nix (#58044)
1 parent ac67a9a commit d6a5c8a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dev/nix/nodejs.nix

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ pkgs.nodejs_20.overrideAttrs (oldAttrs: {
44
# and building is super expensive
55
# version = "16.19.0";
66

7-
passthru.pkgs = oldAttrs.passthru.pkgs // {
8-
pnpm = oldAttrs.passthru.pkgs.pnpm.override rec {
7+
passthru.pkgs = oldAttrs.passthru.pkgs // (with oldAttrs.passthru.pkgs; {
8+
pnpm = pnpm.override rec {
99
# PLEASE UPDATE THE SHA512 BELOW OR NOTIFY ONE OF THE NIX USERS BEFORE MERGING A CHANGE TO THESE FILES
1010
version = "8.9.2";
1111
src = fetchurl {
@@ -16,6 +16,6 @@ pkgs.nodejs_20.overrideAttrs (oldAttrs: {
1616
# fetching typescript 5.2.2 from npm registry results in an archive with a missing package-lock.json, which nix
1717
# refuses to build without. We can generate this lock file with `npm install --package-lock-only` but at the time I didn't
1818
# want to vendor the file. Fortunately, nixpkgs-unstable has typescript at 5.2.2
19-
typescript = pkgs.nodePackages.typescript; # 5.2.2
20-
};
19+
typescript = assert typescript.version == "5.2.2"; typescript;
20+
});
2121
})

0 commit comments

Comments
 (0)