[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] gnu: Add ghc-unix-time.
From: |
ericbavier |
Subject: |
Re: [PATCH] gnu: Add ghc-unix-time. |
Date: |
Thu, 22 Oct 2015 03:47:46 -0500 |
From: Eric Bavier <address@hidden>
> * 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
Re: [PATCH] gnu: Add ghc-xml., ericbavier, 2015/10/22
Re: [PATCH] gnu: Add ghc-uniplate., ericbavier, 2015/10/22
Re: [PATCH] gnu: Add Idris, the dependently-typed language., ericbavier, 2015/10/22