!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

211 Members
61 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
9 Jan 2023
@adis:blad.is@adis:blad.is left the room.06:27:07
12 Jan 2023
@strum355:matrix.orgstroem - sourcegraph joined the room.20:43:46
@strum355:matrix.orgstroem - sourcegraph How do I set the nodejs used by a package in nixpkgs.nodePackages? Ive tried .override { nodejs = pkgs.nodejs_16-x; } but thats not doing the job 20:55:28
@strum355:matrix.orgstroem - sourcegraph nodejs-16_x.pkgs.pnpm doesnt add pnpm to path like nodePackages.pnpm does 21:01:34
@strum355:matrix.orgstroem - sourcegraph ive also tried an overlay to set global nodejs = nodejs-16_x; to no avail, as well as the approach from here https://discourse.nixos.org/t/how-to-use-pnpm-with-recent-nodejs/21867/2, which adds nodejs16 to the PATH of /nix/store/s01asphglgvimr64ymbddc0lf8ln7rs1-pnpm-7.24.2/bin/pnpm, but that script invokes /nix/store/s01asphglgvimr64ymbddc0lf8ln7rs1-pnpm-7.24.2/bin/.pnpm-wrapped which has node 14 in its shebang 21:12:19
@lily:lily.flowersLily Foster
In reply to @strum355:matrix.org
nodejs-16_x.pkgs.pnpm doesnt add pnpm to path like nodePackages.pnpm does
(oops I tried to fix as much of that as I could in the node2nix update, but I was more doing that as a quick/hacky stopgap until we got better tooling so I guess some packages stopped working)
21:13:31
@strum355:matrix.orgstroem - sourcegraphis there a quick-fix i can do in my flake? 😬21:14:07
@lily:lily.flowersLily Foster
In reply to @strum355:matrix.org
ive also tried an overlay to set global nodejs = nodejs-16_x; to no avail, as well as the approach from here https://discourse.nixos.org/t/how-to-use-pnpm-with-recent-nodejs/21867/2, which adds nodejs16 to the PATH of /nix/store/s01asphglgvimr64ymbddc0lf8ln7rs1-pnpm-7.24.2/bin/pnpm, but that script invokes /nix/store/s01asphglgvimr64ymbddc0lf8ln7rs1-pnpm-7.24.2/bin/.pnpm-wrapped which has node 14 in its shebang
So wait you want it to build with nodejs-14_x but then run with 16?
21:14:13
@strum355:matrix.orgstroem - sourcegraphi want nothing to do with node 1421:14:25
@strum355:matrix.orgstroem - sourcegraphim not sure where or how node 14 is getting dragged into it21:14:42
@lily:lily.flowersLily FosterOhh it works in 18 but not 16. Well that's bizarre21:14:43
@lily:lily.flowersLily Foster
In reply to @strum355:matrix.org
im not sure where or how node 14 is getting dragged into it
(thought it was my sins from that node2nix PR I made to unblock nodePackages coming to haunt me -- that's when I had nightmares about npm not copying bins right and just rewrote it to copy manually)
21:15:21
@lily:lily.flowersLily Foster
In reply to @strum355:matrix.org
is there a quick-fix i can do in my flake? 😬
Easiest fix is probably to just make a wrapper derivation to manually add the bin on top of nodejs-16_x.pkgs.pnpm
21:16:35
@lily:lily.flowersLily FosterI'm not sure why it wouldn't be getting copied though21:16:42

Show newer messages


Back to Room ListRoom Version: 6