Nix NodeJS | 210 Members | |
| 61 Servers |
| Sender | Message | Time |
|---|---|---|
| 10 Nov 2023 | ||
In reply to @peter-lustig:matrix.orgI don't think npmBuild is doing anything there (it's not a valid arg?) and npm install implicitly has --omit=dev, but what that will do is prune dev dependencies (like vite) also when installing deps... | 22:30:04 | |
If you want to prune deps, you should npm prune --omit=dev yourself | 22:30:33 | |
| wait the more i'm reading this the less sense it makes | 22:31:44 | |
| are you able to share more info on the npm package itself? | 22:31:55 | |
In reply to @lily:lily.flowersThis is what I am following now, just trying to do that stuff with nix: https://kit.svelte.dev/docs/adapter-node#deploying | 22:32:23 | |
| (and you shouldn't need modules if you use rollup, right?) | 22:32:29 | |
i'm pretty sure buildNpmPackage will do the right thing without trying to recreate what these docs are suggesting | 22:33:24 | |
you might just need to add build as a dir for npm package in your package.json | 22:33:35 | |
| and then it should handle everything else | 22:33:42 | |
| * and then buildNpmPackage should handle everything else | 22:33:47 | |
In reply to @lily:lily.flowersso what could I omit in buildNpmPackage? | 22:34:03 | |
these docs are confusing because if it's using rollup, why is it saying you need node_modules? | 22:34:28 | |
| unless i'm misremembering what rollup does | 22:34:35 | |
also that buildInputs is likely not doing anything either | 22:35:00 | |
| this might just be fine:
| 22:35:37 | |
actually maybe move build somewhere more useful | 22:36:09 | |
In reply to @lily:lily.flowersIsn't this one missing the {pre,post}install hooks? | 22:36:21 | |
In reply to @c0ba1t:matrix.orgit is, yes. but it's an out-of-tree package so i didn't bother 😅 | 22:37:07 | |
| does that nodejs even exist? | 22:37:09 | |
Download image.png | 22:37:10 | |
| It does on 23.05 https://search.nixos.org/packages?channel=23.05&from=0&size=50&sort=relevance&type=packages&query=nodejs | 22:37:36 | |
| * It does on 23.05: https://search.nixos.org/packages?channel=23.05&from=0&size=50&sort=relevance&type=packages&query=nodejs | 22:37:50 | |
In reply to @c0ba1t:matrix.orgyeah, but i have nerver seen it being used like this | 22:38:02 | |
| I guess I need pkgs.nodejs_20 | 22:38:13 | |
In reply to @lily:lily.flowers maybe something like this if you want a bin you can just execute
| 22:40:36 | |
(note you need to be on like nixpkgs master to get the nodejs arg on buildNpmPackage | 22:40:54 | |
* (note you need to be on like nixpkgs master to get the nodejs arg on buildNpmPackage) | 22:40:56 | |
| (that was merged like ... yesterday) | 22:41:02 | |
In reply to @lily:lily.flowersah okay, but isnt buildInputs = [ nodejs_20 ] dong the same | 22:41:21 | |
In reply to @peter-lustig:matrix.orgbecause buildNpmPackage takes the nodejs you give it and sets up everything to use it | 22:41:39 | |