diff options
author | Xinglu Chen <public@yoctocell.xyz> | 2021-11-02 17:48:09 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2021-12-01 17:53:25 +0100 |
commit | 39f4ef59ffc37259de40f67c476a1a720aa8d007 (patch) | |
tree | e390543a1aae3f1233cc6795f95d9173488406aa /guix/build-system/haskell.scm | |
parent | a955e4d7f6843bd7dc804ea69ccdef953f4780bc (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/build-system/haskell.scm')
-rw-r--r-- | guix/build-system/haskell.scm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/guix/build-system/haskell.scm b/guix/build-system/haskell.scm index 18a584f782..72e37f2b0e 100644 --- a/guix/build-system/haskell.scm +++ b/guix/build-system/haskell.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch> ;;; Copyright © 2020 Timothy Sample <samplet@ngyro.com> ;;; Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com> +;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz> ;;; ;;; This file is part of GNU Guix. ;;; @@ -30,7 +31,9 @@ #:use-module (ice-9 match) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) - #:export (%haskell-build-system-modules + #:export (hackage-uri + + %haskell-build-system-modules haskell-build haskell-build-system)) @@ -41,6 +44,12 @@ ;; ;; Code: +(define (hackage-uri name version) + "Return a URI string for the Haskell package hosted on Hackage corresponding +to NAME and VERSION." + (string-append "https://hackage.haskell.org/package/" name "/" + name "-" version ".tar.gz")) + (define %haskell-build-system-modules ;; Build-side modules imported by default. `((guix build haskell-build-system) |