From mboxrd@z Thu Jan 1 00:00:00 1970 From: ericbavier@openmailbox.org Subject: Re: [PATCH] gnu: Add ghc-unix-time. Date: Thu, 22 Oct 2015 03:47:46 -0500 Message-ID: <1445503671-30014-18-git-send-email-ericbavier@openmailbox.org> References: <1445483479-19104-1-git-send-email-ericbavier@openmailbox.org> <1445503671-30014-1-git-send-email-ericbavier@openmailbox.org> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52395) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpG8A-00044Z-Lh for guix-devel@gnu.org; Thu, 22 Oct 2015 09:42:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZpG87-00086H-M0 for guix-devel@gnu.org; Thu, 22 Oct 2015 09:42:10 -0400 Received: from smtp5.openmailbox.org ([62.4.1.39]:36437) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpG87-00085l-EJ for guix-devel@gnu.org; Thu, 22 Oct 2015 09:42:07 -0400 In-Reply-To: <1445503671-30014-1-git-send-email-ericbavier@openmailbox.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org, Paul van der Walt From: Eric Bavier > * gnu/packages/haskell.scm (ghc-unix-time): New variable. > --- > gnu/packages/haskell.scm | 40 ++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 40 insertions(+) > > diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm > index fc1f836..de55610 100644 > --- a/gnu/packages/haskell.scm > +++ b/gnu/packages/haskell.scm > @@ -972,6 +972,46 @@ transformers 0.2 or 0.3 compatibility to run on old versions of the platform, > but also need those types.") > (license bsd-3))) > > +(define-public ghc-unix-time > + (package > + (name "ghc-unix-time") > + (version "0.3.6") > + (source > + (origin > + (method url-fetch) > + (uri (string-append > + "http://hackage.haskell.org/package/unix-time/unix-time-" > + version > + ".tar.gz")) > + (sha256 > + (base32 > + "0dyvyxwaffb94bgri1wc4b9wqaasy32pyjn0lww3dqblxv8fn5ax")))) > + (build-system haskell-build-system) > + (arguments > + `(#:tests? #f ; FIXME: Test fails with "System.Time not found". This is > + ; weird, that should be provided by GHC 7.10.2. > + #:phases > + (alist-cons-before > + 'configure 'fix-/bin/sh > + (lambda _ > + ;; Use `sh', not `/bin/sh'. > + (substitute* (find-files "." "Makefile|configure") > + (("/bin/sh") > + "sh"))) > + %standard-phases))) See the ghc-x11 package for a, IMHO, more elegant solution. This appears to be a more general issue however. Any package that declares in its *.cabal file "build-type: Configure" is going to need CONFIG_SHELL and/or SHELL in the environment. See additionally the proposed ghc-sdl, ghc-sdl-image, ghc-sdl-mixer, and ghc-old-time patches. Perhaps we could patch haskell-build-system to export appropriate CONFIG_SHELL and SHELL variables if it sees a "configure" file in the top-level source directory. WDYT? Would you like to send a patch? `~Eric