diff options
author | Timothy Sample <samplet@ngyro.com> | 2020-08-08 16:36:35 -0400 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2020-08-13 16:44:52 +0200 |
commit | 54a5fd0791f15108d7c06f0b439e75e049fde249 (patch) | |
tree | 9f61b048ad568c43a020d0fb0a5b65178f60c7d2 /guix/build | |
parent | 3f7922cbf5f43418d0cb6d44ba4903f33db8ac61 (diff) |
build-system/haskell: Add 'extra-directories' keyword.
See <https://bugs.gnu.org/39309>.
* guix/build-system/haskell.scm (lower): Include the transitive
propagated inputs of 'extra-directories' inputs.
(haskell-build): Add the 'extra-directories' keyword and pass it through
to the builder.
* guix/build/haskell-build-system.scm (configure): Use it to select
which inputs get passed via 'extra-include-dirs' and 'extra-lib-dirs' to
Cabal.
* gnu/packages/haskell-xyz.scm (ghc-alsa-core, ghc-hmatrix,
ghc-hmatrix-gsl, ghc-hslua, ghc-iwlib, ghc-libyaml, ghc-ncurses,
ghc-openglraw, ghc-x11, ghc-x11-xft, ghc-zlib): Set 'extra-directories'.
* gnu/packages/haskell-crypto.scm (ghc-digest, ghc-hsopenssl): Likewise.
Diffstat (limited to 'guix/build')
-rw-r--r-- | guix/build/haskell-build-system.scm | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/guix/build/haskell-build-system.scm b/guix/build/haskell-build-system.scm index d587962b8b..d7789cdef9 100644 --- a/guix/build/haskell-build-system.scm +++ b/guix/build/haskell-build-system.scm @@ -73,17 +73,14 @@ and parameters ~s~%" (error "no Setup.hs nor Setup.lhs found")))) (define* (configure #:key outputs inputs tests? (configure-flags '()) - #:allow-other-keys) + (extra-directories '()) #:allow-other-keys) "Configure a given Haskell package." (let* ((out (assoc-ref outputs "out")) (doc (assoc-ref outputs "doc")) (lib (assoc-ref outputs "lib")) (bin (assoc-ref outputs "bin")) (name-version (strip-store-file-name out)) - (input-dirs (match inputs - (((_ . dir) ...) - dir) - (_ '()))) + (extra-dirs (filter-map (cut assoc-ref inputs <>) extra-directories)) (ghc-path (getenv "GHC_PACKAGE_PATH")) (params `(,(string-append "--prefix=" out) ,(string-append "--libdir=" (or lib out) "/lib") @@ -94,9 +91,9 @@ and parameters ~s~%" ,(string-append "--package-db=" %tmp-db-dir) "--global" ,@(map (cut string-append "--extra-include-dirs=" <>) - (search-path-as-list '("include") input-dirs)) + (search-path-as-list '("include") extra-dirs)) ,@(map (cut string-append "--extra-lib-dirs=" <>) - (search-path-as-list '("lib") input-dirs)) + (search-path-as-list '("lib") extra-dirs)) ,@(if tests? '("--enable-tests") '()) |