Hacker News new | ask | show | jobs
by eptcyka 1903 days ago
I find its easier to setup environments via Nix. Its no longer just a bunch of shell scripts.
1 comments

What never been clear to me, is how does one pin a specific version in nix? For example, say I want python 3.9.2 exactly?
You need to find the Nixpkgs GitHub commit with that specific version – in some cases it won't necessarily be in the binary cache so you have to compile it yourself because otherwise they'd have an insane amount more binaries to host. You can use Cachix to get your own binary cache (or alternatively just straight up host your own), and check out Niv if you want to make it easier to manage pinned Nixpkgs.
Niv looks interesting, I’ll have to check it out.

Trawling through git commits, hosting my own binary cache, these are all awful stories. Package versions are the normal pattern, and this lack of support for them in Nix has turned me off the two times I’ve explored using it. I kinda get why they aren’t supported, but it is a huge dissonance from the rest of the software world.