guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/44: build-system/haskell: Refactor configure step.


From: guix-commits
Subject: 03/44: build-system/haskell: Refactor configure step.
Date: Thu, 13 Aug 2020 09:26:27 -0400 (EDT)

rekado pushed a commit to branch wip-haskell
in repository guix.

commit 0347888a7ec3a11c050c4269533c8d69197a4c6e
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Wed Jun 24 23:12:06 2020 +0200

    build-system/haskell: Refactor configure step.
    
    * guix/build/haskell-build-system.scm (configure): Replace append
    with quasiquotes and splicing.
---
 guix/build/haskell-build-system.scm | 35 ++++++++++++++++-------------------
 1 file changed, 16 insertions(+), 19 deletions(-)

diff --git a/guix/build/haskell-build-system.scm 
b/guix/build/haskell-build-system.scm
index 5fd0c7d..a8cd62d 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")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]