| 2 Nov 2024 |
Winter | In reply to @c0ba1t:matrix.org Yeah, sometimes `npm ci` gets hung up forever on some network call (based on strace, it is epoll). I haven't had time to investigate it further but it looks like a (missing) timeout issue inside of npm. the version check hit is my guess | 18:31:36 |
Winter | since they do that even if you pass --offline for whatever reason | 18:31:48 |
| 5 Nov 2024 |
| @grossmap:in.tum.de left the room. | 14:16:26 |
@vengmark2:matrix.org | In reply to @winter:catgirl.cloud don't use nodePackages anymore Do you mean Node.js packages are meant to be top-level now? | 22:08:42 |
Winter | yes | 22:09:02 |
Winter | use buildNpmPackage or similar | 22:09:11 |
@vengmark2:matrix.org | Nice! Isn't there a pkgs.nodejs.withPackages though? | 22:09:34 |
@vengmark2:matrix.org | * Nice! Isn't there a pkgs.nodejs.withPackages though, like for Python? | 22:10:01 |
@vengmark2:matrix.org | Hmh, that doesn't seem to be a thing. How do you do the equivalent of pkgs.python.withPackages (ps: [ps.foo]) for NPM packages? | 22:11:37 |
Lily Foster | In reply to @vengmark2:matrix.org Hmh, that doesn't seem to be a thing. How do you do the equivalent of pkgs.python.withPackages (ps: [ps.foo]) for NPM packages? you don't, it doesn't make as much sense in the context of npm | 22:22:30 |
@vengmark2:matrix.org | In reply to @lily:lily.flowers you don't, it doesn't make as much sense in the context of npm How do I achieve the same thing then, a self-contained node executable with a given set of packages? | 22:23:40 |
Winter | node operates with node_modules folders, i guess you can make such a thing if you wanna add stuff to lib/node_modules, but what's your goal? | 22:31:26 |
Lily Foster | yeah it's a request that doesn't quite compute as a concrete technical need, with how npm works | 22:32:51 |
Lily Foster | * yeah it's a request that doesn't quite compute to a concrete technical need, with how npm works | 22:34:21 |
| 7 Nov 2024 |
@vengmark2:matrix.org | So if I install an NPM package globally, that won't be available in a project Nix shell? | 09:36:26 |
Sandro 🐧 | depends | 10:40:30 |
Tomodachi94 (they/them) | In reply to@vengmark2:matrix.org So if I install an NPM package globally, that won't be available in a project Nix shell? That depends on if the shell is --pure or not. It also depends on the shell configuration (doesn't NPM install executables into a separate directory?) | 19:32:22 |
Tomodachi94 (they/them) | That depends on if the shell is --pure or not. It also depends on the user's shell configuration if the shell is impure (doesn't NPM install executables into a separate directory?) | 19:51:38 |
@vengmark2:matrix.org | In reply to @tomodachi94:matrix.org That depends on if the shell is --pure or not. It also depends on the user's shell configuration if the shell is impure (doesn't NPM install executables into a separate directory?) Ah, that clarifies it, and shows a real use case: Doing pkgs.python310.withPackages (ps: [ps.numpy]) in a Nix shell in a Python project ensures that I get a specific Python interpreter version with a specific package set, with no need for having to develop in a pure shell. Being able to do the same thing with Node.js would be great: pkgs.nodejs_X.withPackages (ps: [ps.foo]) would result in having a specific Node.js interpreter version and a specific package set, with no worries about interference from globally installed packages. | 19:53:19 |
Tomodachi94 (they/them) | Iirc impure shells should prepend to the PATH, so explicitly specifying the packages should work if they're packaged | 23:48:41 |
Tomodachi94 (they/them) | * Iirc impure shells should prepend to the PATH, so explicitly specifying the packages should work if they're packaged in Nix | 23:56:16 |
| 8 Nov 2024 |
| moved to @amadaluzia:tchncs.de changed their display name from (artur 'manuel) to @amadaluzia:tchncs.de. | 14:28:48 |
| moved to @amadaluzia:tchncs.de changed their display name from @amadaluzia:tchncs.de to moved to @amadaluzia:tchncs.de. | 14:30:07 |
| 10 Nov 2024 |
| loudgolem joined the room. | 04:44:48 |
| 16 Nov 2024 |
| 🐰 xiaoxiangmoe joined the room. | 06:22:03 |
| 18 Nov 2024 |
| aktaboot changed their profile picture. | 08:03:12 |
Tumble | Could I make a node js service call the nixos-rebuild command? | 12:14:00 |
Cobalt | You can? It's just an executable (script). You might need elevated permission though. | 13:03:30 |
Cobalt | * You can. It's just an executable (script). You might need elevated permission though. | 13:04:19 |
@joepie91:pixie.town | Tumble: it's a bash script, so to call it 'safely' (insofar it can be called safely) you'd call it as childProcess.spawn("bash", [ "/path/to/nixos-rebuild", "switch" ]) or something along those lines | 13:16:06 |