Open lfdominguez opened 9 months ago
Right now my workaround is run node2nix
two times (a lot of time wasted, but it's only the first time) with different args:
-d -o node-packages-dev.nix
-o node-packages-dist.nix
Then on my flake.nix
:
nodePackagesDev = import ./node-packages-dev.nix {
inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
inherit nodeEnv;
};
nodePackagesDist = import ./node-packages-dist.nix {
inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
inherit nodeEnv;
};
nodeDependenciesDev = nodePackagesDev.nodeDependencies.override {
buildInputs = with pkgs;[ pkg-config vips.dev pixman cairo.dev pango.dev ];
};
nodeDependenciesDist = nodePackagesDist.nodeDependencies.override {
buildInputs = with pkgs;[ pkg-config vips.dev pixman cairo.dev pango.dev ];
};
And use each one on needed steps of my derivation.
Hi, thanks for this great project.
I'm really trying hard to build a NextJS project using node2nix. I can't use the package-lock.json because devs don't want to use Nix and use the package-lock version 3 that is not supported by node2nix.
Furthermore, I can suggest that on the
node-packages.nix
if you use the-d
arg to node-nix not to merge thenodeDependencies
fromdevDependencies
anddependencies
?? My focus is thatdevDependencies
it's in theory only for build process, but not for runtime, then if I need a build step on my project need to executenode2nix
with-d
and this will add so many dependencies to my runtime final derivation that I don't want.On the
node-packages.nix
creation process then can be created the currentnodeDependencies
but if-d
is used then putnodeDependenciesDist
with only thedependencies
and not thedevDependencies
. Is this possible?