Closed happysalada closed 3 years ago
@happysalada please check the updated docs (https://github.com/svanderburg/node2nix/pull/218). I hope they’ll help you get it to work!
Thanks a lot, it is looking good. I'll try it as soon as I get a chance!
@happysalada Please let me know if this works for you! And if so, then this issue can be closed.
In the future, I intend to make integrations of NPM deployments in other projects more convenient. I'm already working on a prototype that makes this possible, but it will take a bit of time to complete this.
I've just managed to test. Thanks a lot!
When you have something new, feel free to tag me and I will be glad to test it!
Thanks for the project!
I'm currently trying to make a builder for the Elixir web framework called Phoenix (What rails is to ruby). I've seen in the documentation how to use node2nix for a webpack project (which is what Phoenix is using), however I think there is one more step that I am still missing. Phoenix's directory layout is that it has all the frontend assets in an
./assets
folder. That includes the package.json and the webpack configuration. When webpack is run those assets will be compiled and sent to./priv/assets/*
.Should node2nix be run inside the
./assets
folder where thepackage.json
file is? Or should it be run inside the main directory? The problem I see with running it in the main directory is that there will be some nix expressions to handleElixir
files building as well, and those might conflict.In figuring it out here is where I am
the
mixDeps
part is already figured out. However for the nodeDependencies, I'm not sure what argument should be called in front of callPackage.Before I've tried creating a script a little like this one https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/version-management/sourcehut/fetchNodeModules.nix However it seems a little simple, and I'm afraid to not benefit from the experience that this project has.
I would be happy to make a PR on the doc once this is figured out (if you think it's necessary of course)