summaryrefslogtreecommitdiff
path: root/guix/build/haskell-build-system.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2020-06-16 22:25:48 +0200
committerRicardo Wurmus <rekado@elephly.net>2020-08-12 14:45:48 +0200
commit67cb9fa2357026ee42ec5bb0923ec4dc4a43abe2 (patch)
tree653d37e1173e68d5f5dcb4e3ae7c044cb3e896d2 /guix/build/haskell-build-system.scm
parent54c9b5bfd721fa6eff2138612a919539cfd18855 (diff)
downloadguix-patches-67cb9fa2357026ee42ec5bb0923ec4dc4a43abe2.tar
guix-patches-67cb9fa2357026ee42ec5bb0923ec4dc4a43abe2.tar.gz
build-system/haskell: Support parallel builds.
* guix/build-system/haskell.scm (haskell-build): Add keyword PARALLEL-BUILD? and pass it on to the builder. * guix/build/haskell-build-system.scm (build): Accept keyword PARALLEL-BUILD? and pass the number of parallel jobs to GHC.
Diffstat (limited to 'guix/build/haskell-build-system.scm')
-rw-r--r--guix/build/haskell-build-system.scm7
1 files changed, 5 insertions, 2 deletions
diff --git a/guix/build/haskell-build-system.scm b/guix/build/haskell-build-system.scm
index 91f62138d0..5fd0c7dbfe 100644
--- a/guix/build/haskell-build-system.scm
+++ b/guix/build/haskell-build-system.scm
@@ -121,9 +121,12 @@ and parameters ~s~%"
(setenv "GHC_PACKAGE_PATH" ghc-path)
#t))
-(define* (build #:rest empty)
+(define* (build #:key parallel-build? #:allow-other-keys)
"Build a given Haskell package."
- (run-setuphs "build" '()))
+ (run-setuphs "build"
+ (if parallel-build?
+ `(,(string-append "--ghc-option=-j" (number->string (parallel-job-count))))
+ '())))
(define* (install #:rest empty)
"Install a given Haskell package."