nixpkgs-multiverse adds a new 'fast' attribute that skips Nixpkgs evaluation entirely, letting you fetch a specific historical package version's store path directly from cache.nixos.org. The trick, borrowed from tomberek's fastpkgs project, uses mkFakeDerivation with builtins.appendContext to fake a store path derivation without requiring --impure or evaluating the full Nixpkgs tree. A census found all 271,187 indexed package versions (14.8 TB) are still alive in the binary cache dating back to 2013, since NixOS's cache has never garbage collected. The feature is also exposed via the mvs CLI tool for offline use.

6m read timeFrom fzakaria.com
Post cover image
Table of contents
§ The trick: mkFakeDerivation§ Footguns

Questions this post answers

How does nixpkgs-multiverse fast mode let you fetch a specific old Nixpkgs package version without evaluating Nixpkgs?

It uses a mkFakeDerivation trick that attaches store-path context to a string via builtins.appendContext, wrapping it in an attrset that looks like a derivation to Nix's CLI. This bypasses the need for the impure builtins.storePath function, letting nix build fetch the store path directly from cache.nixos.org without downloading or evaluating the Nixpkgs tree. daily.dev surfaces deep dives like this Nix internals trick for engineers optimizing reproducible build pipelines.

Is cache.nixos.org still serving Nix store paths built more than a decade ago?

Yes, a census of 271,187 indexed package versions run in August 2026 found every single one still alive in cache.nixos.org, totaling 14.8 TB of unpacked software dating back to 2013. The NixOS binary cache has never run garbage collection; it is an ever-growing S3 bucket funded by the NixOS Foundation and sponsors. Track infrastructure longevity stories like this on daily.dev when evaluating long-term reproducibility of build caches.

What is the limitation of a fake derivation created with mkFakeDerivation in Nix?

A fake derivation has no drvPath because there is no real .drv file behind it, so nothing can build it directly and it can only be substituted from a binary cache. Commands like override and nix develop require a real derivation, so each fake derivation carries a lazy .eval attribute that resolves to the actual revision-exact derivation when needed. daily.dev helps Nix practitioners keep up with tooling gotchas before they hit a broken build.

1.8K Impressions