dream2nix
dream2nix copied to clipboard
How to choose a node version?
I'd like to make dream2nix use a certain nodejs version - how do I do that?
Thanks
Are you looking for this? https://github.com/nix-community/dream2nix/blob/a5e098038c42528bf4dff2db6cb958b1777b00e3/examples/nodejs_eslint/flake.nix#L20
Are you looking for this?
https://github.com/nix-community/dream2nix/blob/a5e098038c42528bf4dff2db6cb958b1777b00e3/examples/nodejs_eslint/flake.nix#L20
Yes! I see now this documented in https://nix-community.github.io/dream2nix/subsystems/node.html#example and in the README.. I just didn't think what is the meaning of it and I missed it.. Perhaps this should be renamed nodejsVersion? To match the naming scheme of pythonVersion? Or at least comment something like:
diff --git i/README.md w/README.md
index 5ac2f74..5d24c11 100644
--- i/README.md
+++ w/README.md
@@ -100,6 +100,7 @@ Extensive Example `flake.nix`:
{
filter = project: project.translator == "package-json";
subsystemInfo.npmArgs = "--legacy-peer-deps";
+ # nodejs major version
subsystemInfo.nodejs = 18;
}
];
diff --git i/examples/nodejs_eslint/flake.nix w/examples/nodejs_eslint/flake.nix
index a224c6a..e83272d 100644
--- i/examples/nodejs_eslint/flake.nix
+++ w/examples/nodejs_eslint/flake.nix
@@ -17,6 +17,7 @@
settings = [
{
subsystemInfo.noDev = true;
+ # nodejs major version
subsystemInfo.nodejs = 18;
}
];
Good point! We should rename it.
Now that makeFlakeOutputs is legacy, what's the right way to do this?