-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
[PoC] fetchurl: use Software Heritage as a content addressable mirror #53787
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
Conversation
How does Guix do this? |
@asymmetric According to https://issues.guix.info/issue/33432, it seems they fallback to Software Heritage for their git fetcher. They can use the commit id as an identifier. |
@nlewo This explains a lot. When I originally made this PR I tested it with zlib and it so happened that they had that tarball. Later I tried to locate couple other tarballs on SH to no avail. It seems like they prefer to mirror whole repositories instead, and that would be a reason for guix to implement this for git fetcher. The problem with using |
@veprbl it seems to be a pain to translate hash in bash! There are several hash types ( |
This should just work now (at least on darwin). Conversion is only implemented for sha256 hashes for now. |
This comment has been minimized.
This comment has been minimized.
27856f7
to
7989a03
Compare
This is a proof of concept implementation of the idea from #53653.
Can be tested like this:
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.