summaryrefslogtreecommitdiff
path: root/guix/import
diff options
context:
space:
mode:
authorXinglu Chen <public@yoctocell.xyz>2021-11-02 17:48:09 +0100
committerLudovic Courtès <ludo@gnu.org>2021-12-01 17:53:25 +0100
commit39f4ef59ffc37259de40f67c476a1a720aa8d007 (patch)
treee390543a1aae3f1233cc6795f95d9173488406aa /guix/import
parenta955e4d7f6843bd7dc804ea69ccdef953f4780bc (diff)
build-system: haskell: Add ‘hackage-uri’ procedure.
* guix/build-system/haskell (hackage-uri): New procedure. * guix/import/hackage.scm (hackage-module->sexp, latest-release): Use it. * tests/hackage.scm (match-ghc-foo, match-ghc-foo-6, match-ghc-foo-revision, match-ghc-foo-import): Adjust accordingly. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'guix/import')
-rw-r--r--guix/import/hackage.scm5
1 files changed, 3 insertions, 2 deletions
diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm
index 03881f1a3d..0d5616ca62 100644
--- a/guix/import/hackage.scm
+++ b/guix/import/hackage.scm
@@ -40,6 +40,7 @@
#:use-module (guix memoization)
#:use-module (guix upstream)
#:use-module (guix packages)
+ #:autoload (guix build-system haskell) (hackage-uri)
#:use-module ((guix utils) #:select (call-with-temporary-output-file))
#:export (%hackage-url
hackage->guix-package
@@ -303,7 +304,7 @@ the hash of the Cabal file."
(version ,version)
(source (origin
(method url-fetch)
- (uri (string-append ,@(factorize-uri source-url version)))
+ (uri (hackage-uri ,name version))
(sha256
(base32
,(if tarball
@@ -367,7 +368,7 @@ respectively."
(hackage-cabal-url hackage-name))
#f)
((_ *** ("version" (version)))
- (let ((url (hackage-source-url hackage-name version)))
+ (let ((url (hackage-uri hackage-name version)))
(upstream-source
(package (package-name package))
(version version)