Nix NodeJS | 205 Members | |
| 59 Servers |
| Sender | Message | Time |
|---|---|---|
| 17 Nov 2023 | ||
| I had this idea today for a radically simple ingestion method for
I have a PoC here: https://github.com/adisbladis/fetch-package-lock/blob/master/flake.nix#L78-L82 I'm wondering if there is anything obvious I've missed? It seems to easy/simple. | 08:45:12 | |
| It certainly seems to be working alright, even for some larger stuff | 09:14:37 | |
| Hmm, you'd need to alter the source, right? Or do you plan to replace the package lock with a linked version? | 09:53:57 | |
In reply to @c0ba1t:matrix.orgI replace it with one where all the URLs are substituted with Nix store paths | 09:55:03 | |
| Okay, that sounds nice. That might also be a neat way to work around the occasional npm cache re-download issues. | 09:58:34 | |
| adisbladis: we have a weird cursed JS codebase at work I could try this on | 10:27:22 | |
| it has several package.json files in the repo but is not a workspace | 10:27:35 | |
In reply to @whentze:matrix.orgCool :) | 11:31:16 | |
| 14:43:37 | ||
| 18:22:25 | ||
| Hello Nix Community! | 18:22:56 | |
| Is there a way to have a development environment created from a single file?, for example, entering an angular project and running a nix related command would give me a specific docker postgresql database and specific nodejs and npm versions that would go with the Angular project | 18:23:42 | |
| You might want to look at arion | 18:32:26 | |
| i think https://devenv.sh/ is probably the better choice | 18:32:49 | |
| * You might want to look at arion, https://docs.hercules-ci.com/arion/ | 18:33:13 | |
| https://numtide.github.io/devshell/ too | 18:40:55 | |
| I love devenv. It helps you get started, making the learning curve to nix much more bearable | 19:33:01 | |
| 18 Nov 2023 | ||
| I also managed to solve https://github.com/nix-community/npmlock2nix/issues/86 with some clever setup hook machinery | 03:49:54 | |
| Took some inspiration from how home-manager deals with unmanaged/managed files | 03:51:11 | |
| https://github.com/adisbladis/buildNodeModules/blob/master/hooks/node-modules-hook.js#L49 | 03:51:29 | |
So now I can use npm as a locker, and Nix builds everything in node_modules <3 | 03:51:52 | |
| And the shell hook takes care of keeping symlinks up to date | 03:52:08 | |
| Created a readme at https://github.com/adisbladis/buildNodeModules | 04:16:34 | |
| I converted
| 10:01:22 | |
| Are the results in any way surprising? The cputime looks a bit too small to be used for reliable measurements without perf counters | 10:41:33 | |
| Not surprising to me. I was expecting it to be a bit faster and use less memory I'm not overly concerned with exact wall time, I'm OK concluding it's a bit faster and leave it at that. | 11:11:13 | |
| A concern that often comes up when when talking about lock file parsing in nixpkgs performance. I wanted to have ballpark numbers to refer to. | 11:12:52 | |
| Ah, okay. Thank you for sharing | 11:13:31 | |
In reply to @adis:blad.isYou know that I nerdsnipped @tomberek on adding the parsing built-in based on a EBNF grammar (a packrat parser) | 11:48:39 | |
| He got OK speed I think | 11:48:46 | |