| 28 May 2023 |
hellwolf | Hey y'all! Let's say I pick a rfew nodePakcages e.g "nodePackages.three|mathjax", what would a one liner say using nix-shell where then I can run node and require("three")? | 13:34:44 |
Lily Foster | I think we would need setup hooks that set NODE_PATH. Which actually would probably be a good idea to add to the nodejs derivation | 13:41:51 |
Lily Foster | Hmmm if I remember later I'll experiment with adding that | 13:42:18 |
hellwolf | Okay. Something similar to haskellPackages.ghcWithPackages would be handy, say:
nix-shell -p 'nodejsPackages.nodeWithPackages { pkgs: [ pkgs.three ] } ?
| 14:06:45 |
Lily Foster | Well it would be something like nodejs.withPackages probably but also nodePackages is gonna go away and/or be redone before that's viable... | 14:08:49 |
hellwolf | I see.
I don't think it's too big a stretch to proposing the Nth package manager for NodeJS ecosytem, after now pnpm. | 14:10:06 |
hellwolf | I think Nix has the potential to be the right one :) | 14:10:19 |
hellwolf | But still need that Nth nix node builder though too. | 14:10:54 |
hellwolf | Or is buildNpmPackage targeting that? | 14:11:25 |
hellwolf | * Or is buildNpmPackage targeting that role? | 14:11:27 |
Lily Foster | buildNpmPackage is really more for leaf-like application-level npm packages | 14:12:03 |
Lily Foster | At some point we may end up trying to build out a real Nix-based node package set, but npm dependencies go really deep. Unlike how other package sets like python generally are | 14:14:08 |
Lily Foster | So I doubt it'll really be worth it tbh | 14:14:23 |
Lily Foster | We'll probably aim for more like how the rust stuff works | 14:14:35 |