guix-commits
[Top][All Lists]
Advanced

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

01/03: build-system/haskell: CONFIG_SHELL env variable.


From: Paul
Subject: 01/03: build-system/haskell: CONFIG_SHELL env variable.
Date: Mon, 26 Oct 2015 09:17:46 +0000

toothbrush pushed a commit to branch master
in repository guix.

commit f862f38ade0c6a648d5a8711d636281314b2db62
Author: Paul van der Walt <address@hidden>
Date:   Fri Oct 23 19:33:43 2015 +0200

    build-system/haskell: CONFIG_SHELL env variable.
    
    For Cabal packages with "build-type: Configure", a configure shell
    script is run to set up build parameters.  These scripts need the
    CONFIG_SHELL environment variable to be set to function properly.
    
    * guix/build/haskell-build-system.scm (configure): Set CONFIG_SHELL if
      necessary.
---
 guix/build/haskell-build-system.scm |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/guix/build/haskell-build-system.scm 
b/guix/build/haskell-build-system.scm
index c0cb789..4506e96 100644
--- a/guix/build/haskell-build-system.scm
+++ b/guix/build/haskell-build-system.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Federico Beffa <address@hidden>
+;;; Copyright © 2015 Paul van der Walt <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -96,6 +97,14 @@ and parameters ~s~%"
                              '("--enable-tests")
                              '())
                          configure-flags)))
+    ;; For packages where the Cabal build-type is set to "Configure",
+    ;; ./configure will be executed.  In these cases, the following
+    ;; environment variable is needed to be able to find the shell executable.
+    ;; For other package types, the configure script isn't present.  For more
+    ;; information, see the Build Information section of
+    ;; <https://www.haskell.org/cabal/users-guide/developing-packages.html>.
+    (when (file-exists? "configure")
+      (setenv "CONFIG_SHELL" "sh"))
     (run-setuphs "configure" params)))
 
 (define* (build #:rest empty)



reply via email to

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