diff options
author | Mathieu Othacehe <othacehe@gnu.org> | 2020-08-26 18:35:14 +0200 |
---|---|---|
committer | Mathieu Othacehe <othacehe@gnu.org> | 2020-08-26 18:35:14 +0200 |
commit | 17dddeeee560527a8f30d37761949d658056cb09 (patch) | |
tree | 15b0b19c55787f556eb9b42c28d173bddc5435db /guix/build-system/haskell.scm | |
parent | 331a09654eb7e9f6212b7e8469077fa7393e8b11 (diff) | |
parent | 6a9581741e4ee81226aeb2f1c997df76670a6aab (diff) | |
download | guix-patches-17dddeeee560527a8f30d37761949d658056cb09.tar guix-patches-17dddeeee560527a8f30d37761949d658056cb09.tar.gz |
Merge remote-tracking branch 'origin/master' into core-updates
Diffstat (limited to 'guix/build-system/haskell.scm')
-rw-r--r-- | guix/build-system/haskell.scm | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/guix/build-system/haskell.scm b/guix/build-system/haskell.scm index 1ec11c71d8..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 @@ -67,7 +69,7 @@ version REVISION." #:rest arguments) "Return a bag for NAME." (define private-keywords - '(#:target #:haskell #:cabal-revision #:inputs #:native-inputs)) + '(#:target #:haskell #:cabal-revision #:inputs #:native-inputs #:outputs)) (define (cabal-revision->origin cabal-revision) (match cabal-revision @@ -95,9 +97,23 @@ version REVISION." ,@(standard-packages))) (build-inputs `(("haskell" ,haskell) ,@native-inputs)) - (outputs outputs) + ;; XXX: this is a hack to get around issue #41569. + (outputs (match outputs + (("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 @@ -105,10 +121,12 @@ version REVISION." (haddock-flags ''()) (tests? #t) (test-target "test") + (parallel-build? #t) (configure-flags ''()) + (extra-directories ''()) (phases '(@ (guix build haskell-build-system) %standard-phases)) - (outputs '("out")) + (outputs '("out" "static")) (search-paths '()) (system (%current-system)) (guile #f) @@ -134,10 +152,12 @@ 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 #:tests? ,tests? + #:parallel-build? ,parallel-build? #:haddock? ,haddock? #:phases ,phases #:outputs %outputs |