[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/43: build-system/haskell: Support parallel builds.
From: |
guix-commits |
Subject: |
02/43: build-system/haskell: Support parallel builds. |
Date: |
Sat, 8 Aug 2020 22:41:05 -0400 (EDT) |
samplet pushed a commit to branch wip-haskell-updates-2
in repository guix.
commit 34ee68953aabf6156593b5e97722014ee81fb039
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Tue Jun 16 22:25:48 2020 +0200
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.
---
guix/build-system/haskell.scm | 2 ++
guix/build/haskell-build-system.scm | 7 +++++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/guix/build-system/haskell.scm b/guix/build-system/haskell.scm
index 1ec11c7..ab93c96 100644
--- a/guix/build-system/haskell.scm
+++ b/guix/build-system/haskell.scm
@@ -105,6 +105,7 @@ version REVISION."
(haddock-flags ''())
(tests? #t)
(test-target "test")
+ (parallel-build? #t)
(configure-flags ''())
(phases '(@ (guix build haskell-build-system)
%standard-phases))
@@ -138,6 +139,7 @@ provides a 'Setup.hs' file as its build system."
#:system ,system
#:test-target ,test-target
#:tests? ,tests?
+ #:parallel-build? ,parallel-build?
#:haddock? ,haddock?
#:phases ,phases
#:outputs %outputs
diff --git a/guix/build/haskell-build-system.scm
b/guix/build/haskell-build-system.scm
index 91f6213..5fd0c7d 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."
- branch wip-haskell-updates-2 created (now 2e60a66), guix-commits, 2020/08/08
- 01/43: gnu: Add ghc-8.8., guix-commits, 2020/08/08
- 02/43: build-system/haskell: Support parallel builds.,
guix-commits <=
- 06/43: haskell-build-system: register: Respect lib output., guix-commits, 2020/08/08
- 03/43: build-system/haskell: Refactor configure step., guix-commits, 2020/08/08
- 04/43: build-system/haskell: Configure to link with shared libraries., guix-commits, 2020/08/08
- 05/43: build-system/haskell: Add default output "static"., guix-commits, 2020/08/08
- 07/43: haskell-build-system: register: Remove references to the doc output., guix-commits, 2020/08/08
- 08/43: build-system/haskell: Add 'extra-directories' keyword., guix-commits, 2020/08/08
- 09/43: build-system/haskell: Do not pass "--bindir" during configure., guix-commits, 2020/08/08
- 10/43: gnu: Add "static" output to Haskell packages with custom outputs., guix-commits, 2020/08/08
- 11/43: gnu: ghc-8.6: Remove unnecessary references., guix-commits, 2020/08/08
- 12/43: gnu: ghc-hspec: Add "doc" output., guix-commits, 2020/08/08