diff options
author | Timothy Sample <samplet@ngyro.com> | 2020-02-22 09:56:36 -0500 |
---|---|---|
committer | Guix Patches Tester <> | 2020-02-22 15:36:13 +0000 |
commit | 7a1f5ef1822a80ec7b6edc57921cd7f6837bb237 (patch) | |
tree | b44a1e0daa0cfff0a7baf727e7d027f04ef81ab9 /guix/build/haskell-build-system.scm | |
parent | 9a3971143854bf877c0739fc8fdf7b945a2e3935 (diff) | |
download | patches-7a1f5ef1822a80ec7b6edc57921cd7f6837bb237.tar patches-7a1f5ef1822a80ec7b6edc57921cd7f6837bb237.tar.gz |
build-system/haskell: Add 'extra-directories?' keyword.series-2978
See <https://bugs.gnu.org/39309>.
* guix/build-system/haskell.scm (haskell-build): Add
'extra-directories?' keyword and pass it through to the builder.
* guix/build/haskell-build-system.scm (configure): Use it to toggle
passing '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): Enable
'extra-directories?'.
gnu/packages/haskell-crypto.scm (ghc-digest, ghc-hsopenssl): Likewise.
Diffstat (limited to 'guix/build/haskell-build-system.scm')
-rw-r--r-- | guix/build/haskell-build-system.scm | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/guix/build/haskell-build-system.scm b/guix/build/haskell-build-system.scm index 91f62138d0..f69e16582a 100644 --- a/guix/build/haskell-build-system.scm +++ b/guix/build/haskell-build-system.scm @@ -72,8 +72,8 @@ and parameters ~s~%" (apply invoke "runhaskell" setup-file command params)) (error "no Setup.hs nor Setup.lhs found")))) -(define* (configure #:key outputs inputs tests? (configure-flags '()) - #:allow-other-keys) +(define* (configure #:key outputs inputs tests? extra-directories? + (configure-flags '()) #:allow-other-keys) "Configure a given Haskell package." (let* ((out (assoc-ref outputs "out")) (doc (assoc-ref outputs "doc")) @@ -84,6 +84,10 @@ and parameters ~s~%" (((_ . dir) ...) dir) (_ '()))) + (include-dirs (map (cut string-append "--extra-include-dirs=" <>) + (search-path-as-list '("include") input-dirs))) + (lib-dirs (map (cut string-append "--extra-lib-dirs=" <>) + (search-path-as-list '("lib") input-dirs))) (ghc-path (getenv "GHC_PACKAGE_PATH")) (params (append `(,(string-append "--prefix=" out)) `(,(string-append "--libdir=" (or lib out) "/lib")) @@ -94,12 +98,9 @@ and parameters ~s~%" '("--libsubdir=$compiler/$pkg-$version") `(,(string-append "--package-db=" %tmp-db-dir)) '("--global") - `(,@(map - (cut string-append "--extra-include-dirs=" <>) - (search-path-as-list '("include") input-dirs))) - `(,@(map - (cut string-append "--extra-lib-dirs=" <>) - (search-path-as-list '("lib") input-dirs))) + (if extra-directories? + (append include-dirs lib-dirs) + '()) (if tests? '("--enable-tests") '()) |