guix-commits
[Top][All Lists]
Advanced

[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")



reply via email to

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