Earlier quoted context omitted.
Looks like you are right. Relevant issue: https://github.com/NixOS/nixpkgs/issues/93327
It amazes me how many people in that thread keep saying that we shouldn't even want it, that this is not what nix is about, that no one should install historical versions etc. BTW, another issues linked is from 2015 https://github.com/NixOS/nixpkgs/issues/9682 Given that my question never got an answer in HN (not until I had a discussion with the original article's author on Twitter and he posted this solution), it's…
Ju (@Arkham) proposed a solution:
1- Finding the commit hash of of nixpkgs which contains a specific version of a dependency (e.g. ruby 2.6.3) and use that to bring in the dependency
2- If a specific version does not exist in any of the hashes, we should patch the `.nix` file and build the dependency ourselves. This causes all other transitive dependencies to be rebuilt.
Arguments against 1:
Why should we rely on an external thrid-party webservice to find the hashes of a specific package? This should be integrated to the `nix` tooling. Hope the community incorporates history search into the tooling :)
Arguments against 2:
@dimitriid says the solution is cumbersome.
Arguments for 2:
- What if rvm or nvm don't have a specific version or deprecate that version from their repos? At least there is a solution via Nix.
- What are you going to do for other languages which don't have a package/VM manager like Java, C/C++, etc? At least the Nix solution is universal and you don't have to learn the tooling of every technology.
I think @technomancy over at Lobste.rs has a wise take on this issue: https://lobste.rs/s/emyfhx/ditch_your_version_manager#c_5acg...
> I feel like Nix/Guix vs Docker is like … do you want the right idea with not-enough-polish-applied, or do you want the wrong idea with way-too-much-polish-applied?