> nix shell nixpkgs#nodejs_16
no longer works. It is gone and EOL. I could revert my system, but I want to avoid that. I find SO post (node.js - NixOS install specific NodeJS version - Stack Overflow) that mentions site (Nix Package Versions) that helps you find old revisions that actually work.
So I guess there is this third party site you have to rely on… ok
I try recommended command:
> nix-shell -p nodejs_16 -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/824421b1796332ad1bcb35bc7855da832c43305f.tar.gz
It starts building from source… ok. Oh, it takes several days on some pcs. That won’t work. I try and use substituters command:
> NIXPKGS_ALLOW_INSECURE=1 nix-shell -p nodejs_16 -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/824421b1796332ad1bcb35bc7855da832c43305f.tar.gz --option
substituters https://cache.nixos.org/
but I don’t really know why it it still insists on building everything from source. This didn’t happen before I updated my system. My guess is that it is not cached anymore?
Next workaround, I put the revision as input in my system’s flake.nix:
...
nixpkgs = {
url = "github:nixos/nixpkgs/nixos-unstable";
};
oldnixpkgs = {
url = "github:nixos/nixpkgs/824421b1796332ad1bcb35bc7855da832c43305f";
};
...
I guess this is not the right way to do it. Because:
> nix shell oldnixpkgs#nodejs_16
error: cannot find flake 'flake:oldnixpkgs' in the flake registries
does not work.
Why is this so hard? :(((((((
Another workaround, let’s just download from source. Nope, lol. You are not allowed and does not makes sense because nothing FSH or FHS or whatever, which makes sense.
I would prefer a method of getting node 16 that is as simple as before I updated my system:
> nix shell nixpkgs#nodejs_16
This might be frowned upon, but I have avoided reading about how the nix-env, nix-shell, qpIa, …etc., stuff works because I have gotten really far and built my whole system with just flakes. I like them and they work well. I also like the newer commands.
I am normally really patient, but the fact that this worked like a month ago and I spent a few hours on this already is really frustrating and I hope someone has a good solution for this?
I would like to avoid using a shell.nix file and others, I just want to instantiate a shell with nodejs 16.
Thank you all in advance.