gnu: hugs: Build with GCC 4.9.
[jackhill/guix/guix.git] / gnu / packages / hugs.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
5 ;;;
6 ;;; This file is part of GNU Guix.
7 ;;;
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
12 ;;;
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
17 ;;;
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21 (define-module (gnu packages hugs)
22 #:use-module (guix licenses)
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix build-system gnu)
26 #:use-module (gnu packages gcc))
27
28 (define-public hugs
29 (package
30 (name "hugs")
31 (version "Sep2006")
32 (source
33 (origin
34 (method url-fetch)
35 (uri (string-append "https://www.haskell.org/hugs/downloads/2006-09/"
36 name "98-plus-" version ".tar.gz"))
37 (sha256
38 (base32
39 "1mdy4aq4campgmnpc2qwq7bsbfhaxfsqdghbyyz2wms4lnfcmyma"))))
40 (build-system gnu-build-system)
41 (arguments
42 `(#:phases (alist-cons-before
43 'configure 'fix-sh-n-cp
44 (lambda _
45 (substitute*
46 '("configure"
47 "libraries/configure"
48 "packages/time/configure"
49 "packages/base/configure"
50 "packages/X11/configure"
51 "packages/HGL/configure"
52 "packages/OpenAL/configure"
53 "packages/OpenGL/configure"
54 "packages/network/configure"
55 "packages/unix/configure"
56 "packages/Cabal/tests/HSQL/configure"
57 "packages/ALUT/configure"
58 "packages/GLUT/configure"
59 "packages/base/cbits/execvpe.c"
60 "packages/base/System/Process/Internals.hs"
61 "packages/Cabal/Distribution/attic"
62 "packages/Cabal/Distribution/Simple/Register.hs"
63 "packages/Cabal/Distribution/Simple/Hugs.hs"
64 "tools/hugs-hc"
65 "src/machdep.c"
66 "libraries/Makefile.in")
67 (("/bin/sh") (which "sh")))
68 (substitute* '("demos/Makefile.in"
69 "libraries/Makefile.in")
70 (("/bin/cp") (which "cp"))))
71 %standard-phases)
72 #:tests? #f)) ; no test target
73 ;; FIXME: Fails to build with GCC 5.
74 (native-inputs `(("gcc" ,gcc-4.9)))
75 (home-page "https://www.haskell.org/hugs/")
76 (synopsis "Functional programming system based on Haskell 98")
77 (description
78 "Hugs 98 is an interpreter and programming environment for developing
79 Haskell programs. It provides an almost complete implementation of Haskell
80 98, which includes expression and pattern syntax, primitives for monadic I/O,
81 with support for simple interactive programs, handle-based I/O, and exception
82 handling. Hugs has a nearly complete implementation of the Haskell module
83 system and supports a number of advanced extensions.")
84 (license (non-copyleft "file://License"
85 "See License in the distribution."))))