From 39f4ef59ffc37259de40f67c476a1a720aa8d007 Mon Sep 17 00:00:00 2001 From: Xinglu Chen Date: Tue, 2 Nov 2021 17:48:09 +0100 Subject: build-system: haskell: Add ‘hackage-uri’ procedure. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 --- tests/hackage.scm | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'tests/hackage.scm') diff --git a/tests/hackage.scm b/tests/hackage.scm index aca807027c..ba694661f3 100644 --- a/tests/hackage.scm +++ b/tests/hackage.scm @@ -170,10 +170,7 @@ library ('source ('origin ('method 'url-fetch) - ('uri ('string-append - "https://hackage.haskell.org/package/foo/foo-" - 'version - ".tar.gz")) + ('uri ('hackage-uri "foo" 'version)) ('sha256 ('base32 (? string? hash))))) @@ -215,10 +212,7 @@ library ('source ('origin ('method 'url-fetch) - ('uri ('string-append - "https://hackage.haskell.org/package/foo/foo-" - 'version - ".tar.gz")) + ('uri ('hackage-uri "foo" 'version)) ('sha256 ('base32 (? string? hash))))) @@ -343,10 +337,7 @@ executable cabal ('source ('origin ('method 'url-fetch) - ('uri ('string-append - "https://hackage.haskell.org/package/foo/foo-" - 'version - ".tar.gz")) + ('uri ('hackage-uri "foo" 'version)) ('sha256 ('base32 (? string? hash))))) @@ -409,10 +400,7 @@ executable cabal ('source ('origin ('method 'url-fetch) - ('uri ('string-append - "https://hackage.haskell.org/package/foo/foo-" - 'version - ".tar.gz")) + ('uri ('hackage-uri "foo" 'version)) ('sha256 ('base32 (? string? hash))))) -- cgit 1.4.1