Which nixpkgs revisions have cached builds available?

I frequently need to reference older revisions of nixpkgs in order to grab a specific package version (e.g. when working on a Ruby 2.7.7 app). I’ll search the git log to identify a revision containing the version I want.

However, this often leads to building from source, because the revision I chose might not have a cached build available in the binary cache. It’s very likely there is a revision with the desired version and a cached build, but I’m not sure how to determine that. Is there a way to do so?

@ivanbrennan You can go to https://hydra.nixos.org and find the job for the package you want. The nixos “project” contains “jobsets” for all the different nixos channels; trunk-combined is the one for nixos-unstable for instance. Once there, in the “jobs” tab, search for the job for the package, and look at its previous builds to find a successful one of the version you want. Any successful builds on hydra should be cached.

Or, you can use https://channels.nix.gsc.io/ to look at the list of revisions a channel has actually advanced to before (and should therefore be cached), and find the oldest one that’s newer than the commit you identified in the git log. (Please be kind to this website; it is provided by the good will of the community so check the READMEs)