;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Nikita Karetnikov
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see .
(define-module (gnu packages ghc)
#:use-module ((guix licenses) #:select (bsd-style))
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (gnu packages my-coreutils) ; XXX: use 'base.scm'
#:use-module (gnu packages perl))
(define-public ghc-7.0.1-bin
(package
(name "ghc-bin")
;; This package can be used for the following versions: 7.0.2--7.6.3.
(version "7.0.1")
(source
(origin
(method url-fetch)
;; XXX: Support other platforms.
(uri (string-append "http://www.haskell.org/ghc/dist/"
version "/ghc-" version
"-i386-unknown-linux.tar.bz2"))
(sha256
(base32
"1cc9ih3h804gj53vf1xabg4155m6bz5r468mjsv54kckmabgsmav"))))
(build-system gnu-build-system)
(arguments
`(#:modules ((guix build gnu-build-system)
(guix build utils)
(srfi srfi-1))
#:phases (alist-cons-before
'configure 'pre-configure
(lambda _
(begin (substitute* '("configure"
"mk/config.mk.in"
"inplace/bin/mkdirhier"
"utils/ghc-pkg/ghc.mk")
(("/bin/sh") (which "sh"))
(("/usr/local/bin/bash") (which "sh")))
(copy-file (which "pwd") "utils/ghc-pwd/ghc-pwd")))
(alist-delete 'build %standard-phases))
#:tests? #f))
(inputs
`(("coreutils" ,my-coreutils)
("perl" ,perl)))
(home-page "http://www.haskell.org/ghc/")
(synopsis "Haskell compiler and interactive environment")
(description
"This is a binary distribution of GHC, a compiler and interactive
environment for the Haskell functional programming language.")
(license (bsd-style "file://LICENSE"
"See LICENSE in the distribution."))))