nixpkgs-multiverse: every version that ever existed
The Nixpkgs multiverse is a single flake input that provides access to every version of every package that has ever existed in the Nixpkgs repository. The user experienced issues when a dependency they relied on was version bumped, breaking their tooling. To circumvent this, they added another nixpkgs input pinned to a specific commit, but this became cumbersome as they needed to search for and pin specific versions of packages.
To simplify this process, the author created the nixpkgs-multiverse, which consolidates all versions of packages into a single flake input. This allows users to query the flake for all versions of a package that have existed in Nixpkgs, and mix them together in a single shell, package, or build environment. The concept of a Nixpkgs input being distinct from a flake input is illustrated, with the author noting that each Nixpkgs input creates a separate universe.
The multiverse eliminates the need for flake inputs that are eagerly fetched even if not used, and instead fetches revisions lazily, only when needed. This results in a more efficient and manageable way to access historical versions of packages. The author emphasizes that every version of every package is already available, it's just a matter of addressing them by version number instead of commit hash.
The entire project is a mere 5 MB of JSON and about 200 lines of Nix code, making it a simple yet powerful solution to managing package versions in Nixpkgs.
Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.