Showing previous package versions in package search results

There’s this issue on the NixOS package search repo that I’d like some input on. I’m a Nix newbie, so I don’t have the historical or technical context to really guide the discussion there.

As a newcomer it’s a very basic thing to want to use a specific version of a piece of software. There are obviously maintenance burdens maintaining recipes for all versions of all packages, but that’s not really what’s being suggested. Information about previous package versions is already available in the git history of nixpkgs, and beginners are already digging through that to find the specific versions they want. The author of Nix Package Versions posts metrics in the issue showing that the site is used ~300 times per month, which is a small number, but is probably also an underestimate. You can also see questions on Discourse and Reddit of new users either asking how to do this or being guided to doing it by other community members.

Surely there’s a middle ground between making users (who may be confused about whether this is the best option in the first place) dig through git history and supporting every version of every package that has ever been on nixpkgs.

Isn’t that something to be documented first then? I.e. how to override a package version and also why this approach (i.e. using random nixpkgs revs) is probably not what you want (well, except for quickly trying things out).

I mean, I’ve seen this “pattern” being used in actual production (on a bigger scale, i.e. multiple nixpkgs revs over a timespan of ~5 years being used) and maintaining this is very hard, so I’m kinda hesitant to see this being advertised on official sources.

A possible middle-ground would be to link third-party tools (e.g. “Nix package versions”) from official sources with some sort of “if you really want to do this, try this” comment above.

1 Like