[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/44: build-system/haskell: Simplify configure step.
From: |
guix-commits |
Subject: |
06/44: build-system/haskell: Simplify configure step. |
Date: |
Fri, 17 Jul 2020 08:33:30 -0400 (EDT) |
rekado pushed a commit to branch wip-haskell-updates
in repository guix.
commit c028ac327c37ce122a72d0d98aa589679c333928
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Wed Jun 24 23:12:06 2020 +0200
build-system/haskell: Simplify configure step.
The "--extra-include-dirs" and "--extra-lib-dirs" options end up adding
references to too many unnecessary inputs. Turns out that these options
aren't even needed for a correct build.
The "--bindir" option is not as useful as it seems as the configured
location
is embedded in the outputs. Instead of using "--bindir" it seems better to
build a statically linked binary and move the binary to its own output to
avoid references between the "out" and "bin" outputs.
* guix/build/haskell-build-system.scm (configure): Do not pass "--bindir",
"--extra-include-dirs", and "--extra-lib-dirs".
---
guix/build/haskell-build-system.scm | 36 ++++++++++++------------------------
1 file changed, 12 insertions(+), 24 deletions(-)
diff --git a/guix/build/haskell-build-system.scm
b/guix/build/haskell-build-system.scm
index 49d1c03..e745c49 100644
--- a/guix/build/haskell-build-system.scm
+++ b/guix/build/haskell-build-system.scm
@@ -78,32 +78,20 @@ and parameters ~s~%"
(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)
- (_ '())))
(ghc-path (getenv "GHC_PACKAGE_PATH"))
- (params (append `(,(string-append "--prefix=" out))
- `(,(string-append "--libdir=" (or lib out) "/lib"))
- `(,(string-append "--bindir=" (or bin out) "/bin"))
- `(,(string-append
- "--docdir=" (or doc out)
- "/share/doc/" name-version))
- '("--libsubdir=$compiler/$pkg-$version")
- `(,(string-append "--package-db=" %tmp-db-dir))
- '("--global")
- `(,@(map
- (cut string-append "--extra-include-dirs=" <>)
- (search-path-as-list '("include") input-dirs)))
- `(,@(map
- (cut string-append "--extra-lib-dirs=" <>)
- (search-path-as-list '("lib") input-dirs)))
- (if tests?
- '("--enable-tests")
- '())
- configure-flags)))
+ (params `(,(string-append "--prefix=" out)
+ ,(string-append "--libdir=" (or lib out) "/lib")
+ ,(string-append
+ "--docdir=" (or doc out)
+ "/share/doc/" name-version)
+ "--libsubdir=$compiler/$pkg-$version"
+ ,(string-append "--package-db=" %tmp-db-dir)
+ "--global"
+ ,@(if tests?
+ '("--enable-tests")
+ '())
+ ,@configure-flags)))
;; Cabal errors if GHC_PACKAGE_PATH is set during 'configure', so unset
;; and restore it.
(unsetenv "GHC_PACKAGE_PATH")
- branch wip-haskell-updates created (now a989d4f), guix-commits, 2020/07/17
- 01/44: gnu: Add ghc-8.8., guix-commits, 2020/07/17
- 02/44: build-system/haskell: Support parallel builds., guix-commits, 2020/07/17
- 03/44: build-system/haskell: Add default output "static"., guix-commits, 2020/07/17
- 04/44: haskell-build-system: register: Respect lib output., guix-commits, 2020/07/17
- 06/44: build-system/haskell: Simplify configure step.,
guix-commits <=
- 08/44: gnu: Add "static" output to Haskell packages with custom outputs., guix-commits, 2020/07/17
- 13/44: gnu: ghc-crypto-api-tests: Add "doc" output., guix-commits, 2020/07/17
- 12/44: gnu: ghc-hspec: Add "doc" output., guix-commits, 2020/07/17
- 14/44: gnu: ghc-cryptonite: Add "doc" output., guix-commits, 2020/07/17
- 16/44: gnu: ghc-aeson: Add "doc" output., guix-commits, 2020/07/17
- 07/44: build-system/haskell: Configure to link with shared libraries., guix-commits, 2020/07/17
- 05/44: haskell-build-system: register: Remove references to the doc output., guix-commits, 2020/07/17
- 09/44: gnu: ghc-libyaml: Add libyaml via --extra-lib-dirs., guix-commits, 2020/07/17
- 21/44: gnu: ghc-cmdargs: Add "doc" output., guix-commits, 2020/07/17
- 22/44: gnu: ghc-conduit: Add "doc" output., guix-commits, 2020/07/17