Concept: use any package version

With flakes it’s already pretty easy to run/install something from an arbitrary version of Nixpkgs, e.g.

$ nix run nixpkgs/9077284a7ca32efd56e652286fdaa2ad851ce0c9#hello -c hello
Hello, world!

What is missing is a way to search historical versions of Nixpkgs for a particular version of a package. This cannot be done locally because it would be way too expensive and the database would be too large. However, @garbas is working on loading the packages.json files from each Nixpkgs release into ElasticSearch. The capability to search this database could be added to the nix CLI as a convenience.

However this would only be a CLI thing. This:

environment.systemPackages = with pkgs; [ firefox@55 ];

will never work because firefox@55 is very under-specified: Nix would have no idea what firefox@55 to use. Also, we’re moving away from a reliance on version numbers. The nix command, unlike nix-env, is based on attribute names rather than <pname>-<version>.

This can be build by a standalone hydra job from master branch.

That’s basically https://hydra.nixos.org/job/nixpkgs/trunk/tarball/latest/download-by-type/file/json-br.

9 Likes