Ben Woodcroft <[email protected]> skribis:
> Hmm. It just dawned on me that it is impossible to implement the
> pypi-uri so that it returns the new format because the new URI is
> generated from the content of the package, not just the name and
> version.
Oh indeed.
> So I think we must either write the hash or the entire URL into the
> package, or grab the json from pypi each time we download.
The former, I guess.
I guess the hash is SHA1, right?
Maybe we could make something like:
(define-syntax-rule (pypi-origin package sha1 sha256-string)
(origin
(method url-fetch)
(uri (string-append … sha1 …))
(sha256 (base32 sha256-string))))
and then use it like:
(package
(name "python-foo")
(source (pypi-origin "foo" "cabba9e" "somelongstring")))
?
Ludo’.