New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PoC] fetchurl: use Software Heritage as a content addressable mirror #53787

wants to merge 1 commit into
base: master


None yet
2 participants
Copy link

veprbl commented Jan 11, 2019

This is a proof of concept implementation of the idea from #53653.

Can be tested like this:

with import ./. {};

fetchurl {
  # simulate a dead URL (we never packaged version 1.2.9)
  url = "gopher://";

  # base32 hash as commonly used in nixpkgs
  sha256 = "08dabvnaqis3jlhyzwvh0dmz4lsq5zsmdbyjjm4fgl8yycp31avk";
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  593k  100  593k    0     0   144k      0  0:00:04  0:00:04 --:--:--  144k

To make this really work we would need to figure out how to convert hashes without "nix-hash". Also this would require some kind of negotiation with Software Heritage, and, perhaps, we would need to set up some kind of caching proxy.

Obviously, do not merge this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment