I only started diving into nix this year so I’m still learning, but yeah, I’m pretty sure the lack of granular versioning is a common pain point with nixpkgs. I’d suggest checking out flakes if you haven’t already, but be warned, it gets hairy lol
Comment on Tool to manage CLI tools
RegalPotoo@lemmy.world 11 months agoVery briefly playing about with Nix it does seem pretty compelling - only issue I can see is I don’t seem to have a straight forward way of installing a specific version of a tool from the official repo - you get whatever the current version is that the package maintainers have published for the specific snapshot you are using. I guess I could maintain my own packaging for different versions if it turns out to be important
degen@midwest.social 11 months ago
pkill@programming.dev 11 months ago
It is not? At one of my previous jobs it was nix that allowed me to get a compatible legacy version of kubectl up and running easily iirc
jeffhykin@lemm.ee 11 months ago
It definitely still is. Just because it’s very possible doesn’t mean it’s not a pain point for many people.
With the right tools getting an old version is fine. But mixing that old version with newer versions of other packages causes problems because of the nix LD_LIBRARY_PATH issue.
pkill@programming.dev 11 months ago
Eh so probably got lucky with the fact that the software I needed was statically linked
degen@midwest.social 11 months ago
For some reason I thought it was more annoying to work out than it looks to be. @RegalPotoo you might want to check out nix-versions
jeffhykin@lemm.ee 11 months ago
jeffhykin@lemm.ee 11 months ago
ericjmorey@programming.dev 11 months ago
If you’re using the Debian “no Frankenstein” approach, you’re limited to what is packaged, but if you do your own thing, you can have it build/install whatever you want.
chameleon@kbin.social 11 months ago
You can hardcode a specific version of nixpkgs, instead of a branch. With the new Nix CLI & flakes enabled you can do something like this:
That's the commit I'm seeing for
nixos-23.11
today, and it should still give you that exact version of cowsay years from now.Of course, the better option is to make a dev shell with flakes. Flakes come with a lockfile builtin that accomplishes the same effect, and there's no problems having different projects on different lockfiles/versions. It's a bit more work to learn, the Zero to Nix tutorials are pretty decent at teaching and come with examples though (ultimately most things are ~30 lines of boilerplate and a list of packages that you want).