Open andir opened 4 years ago
Hi, I already have some long term plans on my drawing board to bring some responsibilities of node2nix to a companion tool.
What is your main use case? You need something that can populate the node_modules/
folder without using NPM?
My main use case is to have a nix expression in my repository to build something that is not in the local checkout. I basically want a way to have a build from source tarball (fetchurl
) instead of a local checkout.
I started creating a Nix expression for a project that I do not maintain and that will probably not accept the Nix expression into their repository.
To ease updating of future versions I wrote a nix-shell driven updater that invokes node2nix. So far this is working great.
In order to make it work out of tree and for others I had to start patching the generated files to allow me to specify the source expression of the actual package I want to build.
Here is my current hack: https://git.darmstadt.ccc.de/andi/matrix-appservice-irc-nix/blob/master/upgrade.nix#L25-32
The generated files would refer to
../../../../…/nix/store/…
which obviously isn't going to work for others or even after a GC.My proposal would be another CLI option that allows me to specify the path and/or expression that should be used in the generated nix files.