Releases: vic/nix-versions
v1.0.0 - Vespa
This is the very first nix-versions
release. 🎂
See README for a lot of example (with screenshots I took) on how this can be useful to you.
After years (since ~2018) of using Nix, I really believe more people should benefit from the outstanding amount of packages it makes available to you, even if people don't have the time or energy to spend on learning the nix-language and tools.
Before using Nix, I was contributor to asdf-vm and loved how simple it was, just edit a .tool-versions
file and get your environment ready. However asdf also had shortcomings, it felt slow due to it resolving package versions on each shim execution issue I solved by creating asdf-direnv, and security, since tool installers are just shell-scripts that could potentially be changed without notice and no checksum on downloaded sources is performed. Few years later other asdf-like tools appeared, and since they were way faster than asdf, they also tried to do too much IMHO, becoming not only a version manager, but also re-implementing features that other tools are already excellent at (direnv for automatic environment) (just - for tasks), etc. Anyways, I was quite happy to see people improving what asdf was, but I really never tried asdf nor those newer versions of it, since I was already happy and sold on Nix flakes, mainly with devenv or devshell, both of which provide much much more than what asdf or mise can even dream of.
nix-versions
was born as a tool for myself, trying to list package versions other than the current on nixpkgs repository. I found a couple of services that provide such historical data, Lazamar and NixHub, both can give you the nixpkgs revision you need for a particular package version.
Then, I realized that this tiny nix-versions
tool could not only show a text table of available versions, if I added an nix installables
output format, you could easily use that output as input for nix shell
, giving you a devshell for-free, mix a bit of direnv
and viola, you have a fully working tools-version-manager and development shell for your projects. With nothing but just plain text files. Following the UNIX tradition of doing JUST ONE thing, and produce output that is reusable with other tools. Without re-inventing wheels, let direnv do what it is good for and nix do all installation, security-checksums, etc.
I believe this simple nix-versions
tool combined with nix-shell
can achieve I'd say 99% of what asdf provides but giving you access to the huge collection of packages from nixpkgs without ever touching or learning Nix. The only missing asdf-feature is not recursively searching up for .tool-versions
file. Anyways I consider that an anti-feature. If you need hierarchical environments, direnv is the right tool, create .envrc
on parent directories or use direnv's source_env
. Again, not trying to fix things other tools already have fixed.
Also, it's fast (written in Go - just wanted to learn something different to my daily functional-programming).
Hope someone finds it interesting and useful, I'm having a lot of fun doing Go (to my surprise).