unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul van der Walt <paul@denknerd.org>
To: guix-devel@gnu.org
Subject: [PATCH] build-system/haskell: CONFIG_SHELL env variable.
Date: Fri, 23 Oct 2015 19:37:22 +0200	[thread overview]
Message-ID: <1445621842-17735-1-git-send-email-paul@denknerd.org> (raw)

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 file changed, 9 insertions(+)

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 <beffa@fbengineering.ch>
+;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
 ;;;
 ;;; 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)
-- 
2.6.1

             reply	other threads:[~2015-10-23 17:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-23 17:37 Paul van der Walt [this message]
2015-10-23 18:04 ` [PATCH] gnu: haskell: Remove CONFIG_SHELL patches Paul van der Walt
2015-10-25 21:58 ` [PATCH] build-system/haskell: CONFIG_SHELL env variable Ludovic Courtès
2015-10-26  9:18   ` Paul van der Walt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1445621842-17735-1-git-send-email-paul@denknerd.org \
    --to=paul@denknerd.org \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).