summaryrefslogtreecommitdiff
path: root/guix/build-system
diff options
context:
space:
mode:
authorTimothy Sample <samplet@ngyro.com>2020-08-08 16:36:35 -0400
committerRicardo Wurmus <rekado@elephly.net>2020-08-13 16:44:52 +0200
commit54a5fd0791f15108d7c06f0b439e75e049fde249 (patch)
tree9f61b048ad568c43a020d0fb0a5b65178f60c7d2 /guix/build-system
parent3f7922cbf5f43418d0cb6d44ba4903f33db8ac61 (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-system')
-rw-r--r--guix/build-system/haskell.scm17
1 files changed, 16 insertions, 1 deletions
diff --git a/guix/build-system/haskell.scm b/guix/build-system/haskell.scm
index f92fbcd713..8304e3b222 100644
--- a/guix/build-system/haskell.scm
+++ b/guix/build-system/haskell.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
+;;; Copyright © 2020 Timothy Sample <samplet@ngyro.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -26,6 +27,7 @@
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
#:use-module (ice-9 match)
+ #:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:export (%haskell-build-system-modules
haskell-build
@@ -100,7 +102,18 @@ version REVISION."
(("out") (cons "static" outputs))
(_ outputs)))
(build haskell-build)
- (arguments (strip-keyword-arguments private-keywords arguments)))))
+ (arguments
+ (substitute-keyword-arguments
+ (strip-keyword-arguments private-keywords arguments)
+ ((#:extra-directories extra-directories)
+ `(list ,@(append-map
+ (lambda (name)
+ (match (assoc name inputs)
+ ((_ pkg)
+ (match (package-transitive-propagated-inputs pkg)
+ (((propagated-names . _) ...)
+ (cons name propagated-names))))))
+ extra-directories))))))))
(define* (haskell-build store name inputs
#:key source
@@ -110,6 +123,7 @@ version REVISION."
(test-target "test")
(parallel-build? #t)
(configure-flags ''())
+ (extra-directories ''())
(phases '(@ (guix build haskell-build-system)
%standard-phases))
(outputs '("out" "static"))
@@ -138,6 +152,7 @@ provides a 'Setup.hs' file as its build system."
(derivation->output-path revision))
(revision revision))
#:configure-flags ,configure-flags
+ #:extra-directories ,extra-directories
#:haddock-flags ,haddock-flags
#:system ,system
#:test-target ,test-target