diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2020-06-24 23:12:06 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2020-08-12 14:45:48 +0200 |
commit | 0347888a7ec3a11c050c4269533c8d69197a4c6e (patch) | |
tree | ddc0b2b7a20b2b1a2873c1ad88d12654d7be224a /guix/build | |
parent | 67cb9fa2357026ee42ec5bb0923ec4dc4a43abe2 (diff) |
build-system/haskell: Refactor configure step.
* guix/build/haskell-build-system.scm (configure): Replace append
with quasiquotes and splicing.
Diffstat (limited to 'guix/build')
-rw-r--r-- | guix/build/haskell-build-system.scm | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/guix/build/haskell-build-system.scm b/guix/build/haskell-build-system.scm index 5fd0c7dbfe..a8cd62d03c 100644 --- a/guix/build/haskell-build-system.scm +++ b/guix/build/haskell-build-system.scm @@ -85,25 +85,22 @@ and parameters ~s~%" 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 "--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))) ;; Cabal errors if GHC_PACKAGE_PATH is set during 'configure', so unset ;; and restore it. (unsetenv "GHC_PACKAGE_PATH") |