import: hackage: Use guix-hash-url.

* guix/import/hackage.scm (hackage-module->sexp): Use guix-hash-url.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Nicolas Graves 2025-09-16 19:05:12 +02:00 committed by Ludovic Courtès
parent dd720662e7
commit 8bf8fed532
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -316,13 +316,13 @@ the hash of the Cabal file."
`(package `(package
(name ,(hackage-name->package-name name)) (name ,(hackage-name->package-name name))
(version ,version) (version ,version)
(source (origin (source
(method url-fetch) (origin
(uri (hackage-uri ,name version)) (method url-fetch)
(sha256 (uri (hackage-uri ,name version))
(base32 (sha256
,(if tarball (base32 ,(if tarball
(bytevector->nix-base32-string (file-sha256 tarball)) (guix-hash-url tarball)
"failed to download tar archive"))))) "failed to download tar archive")))))
(build-system haskell-build-system) (build-system haskell-build-system)
(properties '((upstream-name . ,name))) (properties '((upstream-name . ,name)))