From 54a5fd0791f15108d7c06f0b439e75e049fde249 Mon Sep 17 00:00:00 2001 From: Timothy Sample Date: Sat, 8 Aug 2020 16:36:35 -0400 Subject: build-system/haskell: Add 'extra-directories' keyword. See . * 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. --- guix/build/haskell-build-system.scm | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'guix/build') 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") '()) -- cgit v1.2.3