2015-02-25 19:20:24 +00:00
|
|
|
;;; GNU Guix --- Functional package management for GNU
|
2016-10-16 14:25:26 +00:00
|
|
|
;;; Copyright © 2015, 2016 Federico Beffa <beffa@fbengineering.ch>
|
2015-08-18 14:19:11 +00:00
|
|
|
;;; Copyright © 2015 Siniša Biđin <sinisa@bidin.eu>
|
2015-10-14 16:02:45 +00:00
|
|
|
;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
|
2019-04-12 00:27:29 +00:00
|
|
|
;;; Copyright © 2015, 2019 Eric Bavier <bavier@member.fsf.org>
|
2021-07-16 14:19:35 +00:00
|
|
|
;;; Copyright © 2016, 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
|
mailmap: Update entries for Nikita.
* .mailmap: change email and name for Nikita.
* Makefile.am, doc/guix.texi, etc/completion/fish/guix.fish,
gnu/packages/accessibility.scm, gnu/packages/admin.scm,
gnu/packages/audio.scm, gnu/packages/autotools.scm, gnu/packages/cdrom.scm,
gnu/packages/check.scm, gnu/packages/cinnamon.scm,
gnu/packages/compression.scm, gnu/packages/crypto.scm,
gnu/packages/databases.scm, gnu/packages/django.scm, gnu/packages/dns.scm,
gnu/packages/elixir.scm, gnu/packages/emacs-xyz.scm, gnu/packages/emacs.scm,
gnu/packages/enlightenment.scm, gnu/packages/erlang.scm,
gnu/packages/fonts.scm, gnu/packages/fontutils.scm, gnu/packages/forth.scm,
gnu/packages/fvwm.scm, gnu/packages/games.scm, gnu/packages/gl.scm,
gnu/packages/gnome.scm, gnu/packages/gnunet.scm, gnu/packages/gnupg.scm,
gnu/packages/gtk.scm, gnu/packages/guile-wm.scm, gnu/packages/guile-xyz.scm,
gnu/packages/haskell-apps.scm, gnu/packages/haskell-check.scm,
gnu/packages/haskell-crypto.scm, gnu/packages/haskell-xyz.scm,
gnu/packages/haskell.scm, gnu/packages/image-viewers.scm,
gnu/packages/image.scm, gnu/packages/irc.scm, gnu/packages/language.scm,
gnu/packages/libcanberra.scm, gnu/packages/linux.scm,
gnu/packages/lisp-xyz.scm, gnu/packages/lisp.scm, gnu/packages/lolcode.scm,
gnu/packages/lxde.scm, gnu/packages/lxqt.scm, gnu/packages/mail.scm,
gnu/packages/markup.scm, gnu/packages/mate.scm, gnu/packages/maths.scm,
gnu/packages/mc.scm, gnu/packages/messaging.scm, gnu/packages/music.scm,
gnu/packages/ncurses.scm, gnu/packages/networking.scm,
gnu/packages/nickle.scm, gnu/packages/openbox.scm, gnu/packages/pdf.scm,
gnu/packages/perl-check.scm, gnu/packages/perl.scm,
gnu/packages/python-compression.scm, gnu/packages/python-crypto.scm,
gnu/packages/python-web.scm, gnu/packages/python-xyz.scm,
gnu/packages/python.scm, gnu/packages/qt.scm, gnu/packages/ruby.scm,
gnu/packages/rust.scm, gnu/packages/scheme.scm,
gnu/packages/serialization.scm, gnu/packages/shells.scm,
gnu/packages/ssh.scm, gnu/packages/suckless.scm, gnu/packages/tbb.scm,
gnu/packages/telephony.scm, gnu/packages/text-editors.scm,
gnu/packages/textutils.scm, gnu/packages/time.scm, gnu/packages/tls.scm,
gnu/packages/tor.scm, gnu/packages/version-control.scm,
gnu/packages/video.scm, gnu/packages/vim.scm, gnu/packages/web.scm,
gnu/packages/wm.scm, gnu/packages/xdisorg.scm, gnu/packages/xfce.scm,
gnu/packages/xml.scm, gnu/packages/xorg.scm, gnu/services/certbot.scm,
gnu/services/desktop.scm, gnu/services/version-control.scm,
gnu/services/web.scm, guix/import/hackage.scm, guix/licenses.scm: Likewise.
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2020-05-11 11:05:45 +00:00
|
|
|
;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
|
2022-02-15 09:09:52 +00:00
|
|
|
;;; Copyright © 2016, 2022 Efraim Flashner <efraim@flashner.co.il>
|
2022-01-28 17:34:32 +00:00
|
|
|
;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2022 Ricardo Wurmus <rekado@elephly.net>
|
2016-12-14 13:42:32 +00:00
|
|
|
;;; Copyright © 2016, 2017 David Craven <david@craven.ch>
|
2017-01-04 19:37:23 +00:00
|
|
|
;;; Copyright © 2017 Danny Milosavljevic <dannym@scratchpost.org>
|
2017-03-20 19:17:09 +00:00
|
|
|
;;; Copyright © 2017 Peter Mikkelsen <petermikkelsen10@gmail.com>
|
2018-02-05 14:15:16 +00:00
|
|
|
;;; Copyright © 2017, 2018 Alex Vong <alexvong1995@gmail.com>
|
2017-10-18 03:07:21 +00:00
|
|
|
;;; Copyright © 2017 rsiddharth <s@ricketyspace.net>
|
2019-04-22 16:08:18 +00:00
|
|
|
;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
|
2018-05-11 20:34:04 +00:00
|
|
|
;;; Copyright © 2018 Tonton <tonton@riseup.net>
|
2020-05-03 04:31:03 +00:00
|
|
|
;;; Copyright © 2018, 2019, 2020 Timothy Sample <samplet@ngyro.com>
|
2018-08-23 07:02:46 +00:00
|
|
|
;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
|
2019-01-15 15:16:23 +00:00
|
|
|
;;; Copyright © 2018, 2019 Gabriel Hondet <gabrielhondet@gmail.com>
|
2019-06-01 20:28:41 +00:00
|
|
|
;;; Copyright © 2019 Robert Vollmert <rob@vllmrt.net>
|
2019-06-07 10:36:25 +00:00
|
|
|
;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
|
2020-03-24 16:58:20 +00:00
|
|
|
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
|
2021-07-13 12:09:37 +00:00
|
|
|
;;; Copyright © 2021 Matthew James Kraai <kraai@ftbfs.org>
|
2021-09-14 07:55:15 +00:00
|
|
|
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
|
2021-11-30 11:14:27 +00:00
|
|
|
;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
|
2015-02-25 19:20:24 +00:00
|
|
|
;;;
|
|
|
|
;;; 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 <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
(define-module (gnu packages haskell)
|
2017-01-25 17:21:43 +00:00
|
|
|
#:use-module (gnu packages)
|
2022-01-28 17:34:32 +00:00
|
|
|
#:use-module (gnu packages autotools)
|
|
|
|
#:use-module (gnu packages base)
|
|
|
|
#:use-module (gnu packages bash)
|
|
|
|
#:use-module (gnu packages bison)
|
2017-01-02 13:36:58 +00:00
|
|
|
#:use-module (gnu packages bootstrap)
|
2022-01-28 17:34:32 +00:00
|
|
|
#:use-module (gnu packages compression)
|
2015-02-25 19:20:24 +00:00
|
|
|
#:use-module (gnu packages elf)
|
2022-01-28 17:34:32 +00:00
|
|
|
#:use-module (gnu packages file)
|
|
|
|
#:use-module (gnu packages gawk)
|
2022-02-06 22:42:10 +00:00
|
|
|
#:use-module (gnu packages gcc)
|
2015-02-25 19:20:24 +00:00
|
|
|
#:use-module (gnu packages ghostscript)
|
2017-01-02 13:36:58 +00:00
|
|
|
#:use-module (gnu packages libffi)
|
2022-01-28 17:34:32 +00:00
|
|
|
#:use-module (gnu packages linux)
|
2016-12-24 08:50:29 +00:00
|
|
|
#:use-module (gnu packages lisp)
|
2015-02-25 19:20:24 +00:00
|
|
|
#:use-module (gnu packages multiprecision)
|
|
|
|
#:use-module (gnu packages ncurses)
|
2017-01-02 13:36:58 +00:00
|
|
|
#:use-module (gnu packages perl)
|
|
|
|
#:use-module (gnu packages python)
|
2020-05-03 04:31:03 +00:00
|
|
|
#:use-module (gnu packages version-control)
|
2017-01-02 13:36:58 +00:00
|
|
|
#:use-module (guix build-system gnu)
|
|
|
|
#:use-module (guix download)
|
2017-01-04 19:37:23 +00:00
|
|
|
#:use-module (guix git-download)
|
2022-02-06 22:42:10 +00:00
|
|
|
#:use-module (guix gexp)
|
2017-01-02 13:36:58 +00:00
|
|
|
#:use-module ((guix licenses) #:prefix license:)
|
|
|
|
#:use-module (guix packages)
|
|
|
|
#:use-module (guix utils)
|
2019-07-16 06:45:40 +00:00
|
|
|
#:use-module (ice-9 match)
|
gnu: Move non-compilers out of haskell.scm.
* gnu/packages/haskell.scm (ghc-abstract-deque, ghc-abstract-par,
ghc-adjunctions, ghc-aeson-compat, ghc-alex, ghc-alsa-core,
ghc-annotated-wl-pprint, ghc-ansi-terminal, ghc-ansi-wl-pprint,
ghc-appar, ghc-async, ghc-atomic-write, ghc-attoparsec,
ghc-attoparsec-bootstrap, ghc-attoparsec-iso8601, ghc-auto-update,
ghc-aws, ghc-base16-bytestring, ghc-base64-bytestring, ghc-base-compat,
ghc-basement, ghc-base-orphans, ghc-base-prelude,
ghc-base-unicode-symbols, ghc-bifunctors, ghc-bindings-dsl,
ghc-blaze-builder, ghc-blaze-markup, ghc-bloomfilter, ghc-boxes,
ghc-byteable, ghc-byteorder, ghc-bytes, ghc-bytestring-builder,
ghc-bytestring-handle, ghc-bytestring-lexing, ghc-bzlib-conduit,
ghc-c2hs, ghc-cairo, ghc-call-stack, ghc-call-stack-boot,
ghc-case-insensitive, ghc-cereal, ghc-cereal-conduit, ghc-cgi,
ghc-charset, ghc-chart, ghc-chart-cairo, ghc-chasingbottoms,
ghc-cheapskate, ghc-chell, ghc-chell-quickcheck, ghc-chunked-data,
ghc-clock, ghc-clock-bootstrap, ghc-cmark, ghc-cmark-gfm, ghc-cmdargs,
ghc-code-page, ghc-colour, ghc-comonad, ghc-concatenative,
ghc-concurrent-output, ghc-conduit, ghc-conduit-algorithms,
ghc-conduit-combinators, ghc-conduit-extra, ghc-configurator,
ghc-connection, ghc-constraints, ghc-contravariant,
ghc-contravariant-extras, ghc-convertible, ghc-data-accessor,
ghc-data-accessor-transformers, ghc-data-default,
ghc-data-default-class, ghc-data-default-instances-base,
ghc-data-default-instances-containers, ghc-data-default-instances-dlist,
ghc-data-default-instances-old-locale, ghc-data-hash, ghc-data-ordlist,
ghc-deepseq-generics, ghc-descriptive, ghc-diff, ghc-disk-free-space,
ghc-distributive, ghc-dlist, ghc-doctemplates, ghc-doctest,
ghc-double-conversion, ghc-easy-file, ghc-easyplot, ghc-echo,
ghc-edisonapi, ghc-edisoncore, ghc-edit-distance, ghc-either,
ghc-email-validate, ghc-enclosed-exceptions, ghc-equivalence, ghc-erf,
ghc-errorcall-eq-instance, ghc-errors, ghc-esqueleto, ghc-exactprint,
ghc-exceptions, ghc-executable-path, ghc-extensible-exceptions,
ghc-extra, ghc-fail, ghc-fast-logger, ghc-feed, ghc-fgl,
ghc-fgl-arbitrary, ghc-file-embed, ghc-filemanip, ghc-findbin,
ghc-fingertree, ghc-fixed, ghc-foldl, ghc-foundation, ghc-free,
ghc-fsnotify, ghc-generic-deriving, ghc-generics-sop,
ghc-geniplate-mirror, ghc-genvalidity, ghc-genvalidity-property,
ghc-gitrev, ghc-glob, ghc-gluraw, ghc-glut, ghc-gnuplot, ghc-graphviz,
ghc-gtk2hs-buildtools, ghc-hackage-security, ghc-haddock,
ghc-haddock-api, ghc-haddock-library, ghc-half, ghc-happy, ghc-hashable,
ghc-hashable-bootstrap, ghc-hashable-time, ghc-hashtables,
ghc-haskell-lexer, ghc-haskell-src, ghc-haskell-src-exts,
ghc-haskell-src-exts-util, ghc-haskell-src-meta, ghc-hasktags, ghc-hex,
ghc-highlighting-kate, ghc-hindent, ghc-hinotify, ghc-hmatrix,
ghc-hmatrix-gsl, ghc-hmatrix-gsl-stats, ghc-hmatrix-special,
ghc-hostname, ghc-hourglass, ghc-hpack, ghc-hs-bibutils, ghc-hslogger,
ghc-hslua, ghc-hslua-module-text, ghc-http-api-data, ghc-ieee754,
ghc-ifelse, ghc-indents, ghc-inline-c, ghc-inline-c-cpp,
ghc-integer-logarithms, ghc-integer-logarithms-bootstrap,
ghc-interpolate, ghc-intervalmap, ghc-invariant, ghc-iproute, ghc-iwlib,
ghc-json, ghc-juicypixels, ghc-kan-extensions, ghc-language-c,
ghc-language-haskell-extract, ghc-lens, ghc-libffi, ghc-libmpd,
ghc-libxml, ghc-lifted-async, ghc-lifted-base, ghc-linear,
ghc-logging-facade, ghc-logict, ghc-lzma, ghc-lzma-conduit,
ghc-markdown-unlit, ghc-math-functions, ghc-megaparsec, ghc-memory,
ghc-memotrie, ghc-microlens, ghc-microlens-ghc, ghc-microlens-mtl,
ghc-microlens-platform, ghc-microlens-th, ghc-missingh, ghc-mmap,
ghc-mmorph, ghc-mockery, ghc-monad-control, ghc-monad-logger,
ghc-monad-loops, ghc-monad-par, ghc-monad-par-extras, ghc-monadplus,
ghc-monadrandom, ghc-monads-tf, ghc-mono-traversable, ghc-murmur-hash,
ghc-mwc-random, ghc-nats, ghc-nats-bootstrap, ghc-network,
ghc-network-info, ghc-network-uri, ghc-newtype-generics, ghc-objectname,
ghc-old-locale, ghc-old-time, ghc-opengl, ghc-openglraw,
ghc-operational, ghc-options, ghc-optparse-applicative, ghc-pandoc,
ghc-pandoc-citeproc, ghc-pandoc-types, ghc-parallel, ghc-parsec-numbers,
ghc-parser-combinators, ghc-parsers, ghc-path, ghc-path-io, ghc-paths,
ghc-patience, ghc-pcre-light, ghc-persistent, ghc-persistent-sqlite,
ghc-persistent-template, ghc-polyparse, ghc-pqueue, ghc-prelude-extras,
ghc-pretty-hex, ghc-pretty-show, ghc-primitive, ghc-profunctors,
ghc-psqueues, ghc-random, ghc-raw-strings-qq, ghc-rebase, ghc-reducers,
ghc-refact, ghc-reflection, ghc-regex, ghc-regex-applicative,
ghc-regex-base, ghc-regex-compat, ghc-regex-compat-tdfa,
ghc-regex-pcre-builtin, ghc-regex-posix, ghc-regex-tdfa,
ghc-regex-tdfa-text, ghc-rerebase, ghc-resolv, ghc-resource-pool,
ghc-resourcet, ghc-rfc5051, ghc-rio, ghc-safe, ghc-safe-exceptions,
ghc-safeio, ghc-safesemaphore, ghc-sandi, ghc-scientific,
ghc-scientific-bootstrap, ghc-sdl, ghc-sdl-image, ghc-sdl-mixer,
ghc-securemem, ghc-semigroupoids, ghc-semigroups,
ghc-semigroups-bootstrap, ghc-setenv, ghc-setlocale, ghc-shakespeare,
ghc-shelly, ghc-silently, ghc-simple-reflect, ghc-simple-sendfile,
ghc-skylighting-core, ghc-skylighting, ghc-smallcheck, ghc-socks,
ghc-split, ghc-statevar, ghc-statistics, ghc-stm-chans, ghc-stm-conduit,
ghc-stmonadtrans, ghc-storable-complex, ghc-streaming-commons,
ghc-strict, ghc-stringbuilder, ghc-string-qq, ghc-stringsearch,
ghc-stylish-haskell, ghc-syb, ghc-system-fileio, ghc-system-filepath,
ghc-tagged, ghc-tar, ghc-temporary, ghc-temporary-rc, ghc-terminal-size,
ghc-texmath, ghc-text-binary, ghc-tf-random, ghc-th-abstraction,
ghc-th-expand-syns, ghc-th-lift, ghc-th-lift-instances, ghc-th-orphans,
ghc-th-reify-many, ghc-time-locale-compat, ghc-tldr,
ghc-transformers-base, ghc-transformers-compat, ghc-tree-diff,
ghc-trifecta, ghc-tuple-th, ghc-typed-process, ghc-unbounded-delays,
ghc-unexceptionalio, ghc-union-find, ghc-uniplate, ghc-unix-compat,
ghc-unix-time, ghc-unliftio, ghc-unliftio-core,
ghc-unordered-containers, ghc-unordered-containers-bootstrap,
ghc-uri-bytestring, ghc-utf8-string, ghc-utility-ht, ghc-uuid,
ghc-uuid-types, ghc-validation, ghc-validity, ghc-vault, ghc-vector,
ghc-vector-algorithms, ghc-vector-binary-instances, ghc-vector-builder,
ghc-vector-th-unbox, ghc-void, ghc-wave, ghc-wcwidth,
ghc-wcwidth-bootstrap, ghc-weigh, ghc-wl-pprint,
ghc-wl-pprint-annotated, ghc-wl-pprint-text, ghc-word8, ghc-x11,
ghc-x11-xft, ghc-xdg-basedir, ghc-xml, ghc-xml-conduit, ghc-xml-types,
ghc-yaml, ghc-zip-archive, ghc-zlib): Move variables from here...
* gnu/packages/haskell-xyz.scm: ...to here.
* gnu/packages/agda.scm,
gnu/packages/bioconductor.scm,
gnu/packages/bioinformatics.scm,
gnu/packages/cran.scm,
gnu/packages/emacs-xyz.scm,
gnu/packages/games.scm,
gnu/packages/graphics.scm,
gnu/packages/haskell-apps.scm,
gnu/packages/haskell-check.scm,
gnu/packages/idris.scm,
gnu/packages/statistics.scm,
gnu/packages/wm.scm: Update module references.
Co-authored-by: Timothy Sample <samplet@ngyro.com>
2019-08-30 01:56:35 +00:00
|
|
|
#:use-module (ice-9 regex))
|
2015-02-25 19:20:24 +00:00
|
|
|
|
2016-12-24 08:50:29 +00:00
|
|
|
(define-public cl-yale-haskell
|
|
|
|
(let ((commit "85f94c72a16c5f70301dd8db04cde9de2d7dd270")
|
|
|
|
(revision "1"))
|
|
|
|
(package
|
|
|
|
(name "cl-yale-haskell")
|
|
|
|
(version (string-append "2.0.5-" revision "." (string-take commit 9)))
|
|
|
|
(source (origin
|
|
|
|
(method git-fetch)
|
|
|
|
(uri (git-reference
|
2018-02-05 14:15:16 +00:00
|
|
|
(url "https://git.elephly.net/software/yale-haskell.git")
|
2016-12-24 08:50:29 +00:00
|
|
|
(commit commit)))
|
|
|
|
(file-name (string-append "yale-haskell-" commit "-checkout"))
|
|
|
|
(sha256
|
|
|
|
(base32
|
|
|
|
"0bal3m6ryrjamz5p93bhs9rp5msk8k7lpcqr44wd7xs9b9k8w74g"))))
|
|
|
|
(build-system gnu-build-system)
|
|
|
|
(arguments
|
|
|
|
`(#:tests? #f ; no tests
|
|
|
|
;; Stripping binaries leads to a broken executable lisp system image.
|
|
|
|
#:strip-binaries? #f
|
|
|
|
#:make-flags
|
|
|
|
(list (string-append "PREFIX=" (assoc-ref %outputs "out")))
|
|
|
|
#:phases
|
|
|
|
(modify-phases %standard-phases
|
|
|
|
(replace 'configure
|
|
|
|
(lambda _
|
|
|
|
(setenv "PRELUDE" "./progs/prelude")
|
|
|
|
(setenv "HASKELL_LIBRARY" "./progs/lib")
|
|
|
|
(setenv "PRELUDEBIN" "./progs/prelude/clisp")
|
|
|
|
(setenv "HASKELLPROG" "./bin/clisp-haskell")
|
|
|
|
#t)))))
|
|
|
|
(inputs
|
2021-12-13 16:18:24 +00:00
|
|
|
(list clisp))
|
2018-02-05 14:15:16 +00:00
|
|
|
(home-page "https://git.elephly.net/software/yale-haskell.git")
|
2016-12-24 08:50:29 +00:00
|
|
|
(synopsis "Port of the Yale Haskell system to CLISP")
|
|
|
|
(description "This package provides the Yale Haskell system running on
|
|
|
|
top of CLISP.")
|
|
|
|
(license license:bsd-4))))
|
|
|
|
|
2022-02-06 22:42:10 +00:00
|
|
|
;; This package contains lots of generated .hc files containing C code to
|
|
|
|
;; bootstrap the compiler without a Haskell compiler. The included .hc files
|
|
|
|
;; cover not just the compiler sources but also all Haskell libraries.
|
|
|
|
(define-public nhc98
|
|
|
|
(package
|
|
|
|
(name "nhc98")
|
|
|
|
(version "1.22")
|
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (string-append "https://www.haskell.org/nhc98/nhc98src-"
|
|
|
|
version ".tar.gz"))
|
|
|
|
(sha256
|
|
|
|
(base32
|
2022-02-12 15:40:05 +00:00
|
|
|
"0fkgxgsd2iqxvwcgnad1702kradwlbcal6rxdrgb22vd6dnc3i8l"))
|
|
|
|
(patches (search-patches "nhc98-c-update.patch"))))
|
2022-02-06 22:42:10 +00:00
|
|
|
(build-system gnu-build-system)
|
|
|
|
(supported-systems '("i686-linux" "x86_64-linux"))
|
|
|
|
(arguments
|
|
|
|
(list
|
|
|
|
#:tests? #false ;there is no test target
|
|
|
|
#:system "i686-linux"
|
|
|
|
#:parallel-build? #false ;not supported
|
|
|
|
#:strip-binaries? #false ;doesn't work
|
|
|
|
#:make-flags '(list "all-gcc")
|
|
|
|
#:phases
|
|
|
|
#~(modify-phases %standard-phases
|
|
|
|
(replace 'configure
|
|
|
|
(lambda _
|
|
|
|
(setenv "SHELL" (which "sh"))
|
|
|
|
(setenv "CPATH" (string-append
|
|
|
|
(getcwd) "/src/runtime/Kernel:"
|
|
|
|
(or (getenv "C_INCLUDE_PATH") "")))
|
|
|
|
(substitute* "configure"
|
|
|
|
(("echo '#!/bin/sh'")
|
|
|
|
(string-append "echo '#!" (which "sh") "'")))
|
|
|
|
(with-fluids ((%default-port-encoding #f))
|
|
|
|
(substitute* '("script/greencard.inst"
|
|
|
|
"script/harch.inst"
|
|
|
|
"script/hi.inst"
|
|
|
|
"script/hmake-config.inst"
|
|
|
|
;; TODO: can't fix this with substitute*
|
|
|
|
;"script/hmake.inst"
|
|
|
|
"script/hood.inst"
|
|
|
|
"script/hsc2hs.inst"
|
|
|
|
"script/nhc98-pkg.inst"
|
|
|
|
"script/nhc98.inst")
|
|
|
|
(("^MACHINE=.*") "MACHINE=ix86-Linux\n")))
|
|
|
|
(invoke "sh" "configure"
|
|
|
|
(string-append "--prefix=" #$output)
|
|
|
|
;; Remove -m32 from compiler/linker invocation
|
|
|
|
"--ccoption="
|
|
|
|
"--ldoption=")))
|
|
|
|
(replace 'install
|
|
|
|
(lambda _
|
|
|
|
(invoke "sh" "configure"
|
|
|
|
(string-append "--prefix=" #$output)
|
|
|
|
;; Remove -m32 from compiler/linker invocation
|
|
|
|
"--ccoption="
|
|
|
|
"--ldoption="
|
|
|
|
"--install"))))))
|
|
|
|
(home-page "https://www.haskell.org/nhc98")
|
|
|
|
(synopsis "Nearly a Haskell Compiler")
|
|
|
|
(description
|
|
|
|
"nhc98 is a small, standards-compliant compiler for Haskell 98, the lazy
|
|
|
|
functional programming language. It aims to produce small executables that
|
|
|
|
run in small amounts of memory. It produces medium-fast code, and compilation
|
|
|
|
is itself quite fast.")
|
|
|
|
(license
|
|
|
|
(license:non-copyleft
|
|
|
|
"https://www.haskell.org/nhc98/copyright.html"))))
|
|
|
|
|
2022-01-28 17:34:32 +00:00
|
|
|
(define-public ghc-4
|
|
|
|
(package
|
|
|
|
(name "ghc")
|
|
|
|
(version "4.08.2")
|
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (string-append "https://www.haskell.org/ghc/dist/"
|
|
|
|
version "/" name "-" version "-src.tar.bz2"))
|
|
|
|
(sha256
|
|
|
|
(base32
|
|
|
|
"0ar4nxy4cr5vwvfj71gmc174vx0n3lg9ka05sa1k60c8z0g3xp1q"))
|
2022-02-14 12:46:55 +00:00
|
|
|
(patches (search-patches "ghc-4.patch"))))
|
2022-01-28 17:34:32 +00:00
|
|
|
(build-system gnu-build-system)
|
|
|
|
(supported-systems '("i686-linux" "x86_64-linux"))
|
|
|
|
(arguments
|
|
|
|
`(#:system "i686-linux"
|
|
|
|
#:strip-binaries? #f
|
|
|
|
#:phases
|
|
|
|
(modify-phases %standard-phases
|
|
|
|
(replace 'bootstrap
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
(delete-file "configure")
|
|
|
|
(delete-file "config.sub")
|
2022-02-15 09:09:52 +00:00
|
|
|
(install-file (search-input-file inputs
|
|
|
|
"/bin/config.sub")
|
2022-01-28 17:34:32 +00:00
|
|
|
".")
|
|
|
|
|
|
|
|
;; Avoid dependency on "happy"
|
|
|
|
(substitute* "configure.in"
|
|
|
|
(("FPTOOLS_HAPPY") "echo sure\n"))
|
|
|
|
|
|
|
|
;; Set options suggested in ghc/interpreter/README.BUILDING.HUGS.
|
|
|
|
(with-output-to-file "mk/build.mk"
|
|
|
|
(lambda ()
|
|
|
|
(display "
|
|
|
|
WithGhcHc=ghc-4.06
|
|
|
|
GhcLibWays=u
|
|
|
|
#HsLibsFor=hugs
|
|
|
|
# Setting this leads to building the interpreter.
|
|
|
|
GhcHcOpts=-DDEBUG
|
2022-02-12 21:30:17 +00:00
|
|
|
GhcRtsHcOpts=-optc-DDEBUG -optc-D__HUGS__ -unreg -optc-g -optc-D_GNU_SOURCE=1
|
|
|
|
GhcRtsCcOpts=-optc-DDEBUG -optc-g -optc-D__HUGS__ -optc-D_GNU_SOURCE=1
|
2022-01-28 17:34:32 +00:00
|
|
|
SplitObjs=NO
|
|
|
|
")))
|
|
|
|
|
|
|
|
(substitute* "ghc/interpreter/interface.c"
|
|
|
|
;; interface.c:2702: `stackOverflow' redeclared as different kind of symbol
|
|
|
|
;; ../includes/Stg.h:188: previous declaration of `stackOverflow'
|
|
|
|
((".*Sym\\(stackOverflow\\).*") "")
|
|
|
|
;; interface.c:2713: `stg_error_entry' undeclared here (not in a function)
|
|
|
|
;; interface.c:2713: initializer element is not constant
|
|
|
|
;; interface.c:2713: (near initialization for `rtsTab[11].ad')
|
|
|
|
((".*SymX\\(stg_error_entry\\).*") "")
|
|
|
|
;; interface.c:2713: `Upd_frame_info' undeclared here (not in a function)
|
|
|
|
;; interface.c:2713: initializer element is not constant
|
|
|
|
;; interface.c:2713: (near initialization for `rtsTab[32].ad')
|
|
|
|
((".*SymX\\(Upd_frame_info\\).*") ""))
|
|
|
|
|
|
|
|
;; We need to use the absolute file names here or else the linker
|
|
|
|
;; will complain about missing symbols. Perhaps this could be
|
|
|
|
;; avoided by modifying the library search path in a way that
|
|
|
|
;; this old linker understands.
|
|
|
|
(substitute* "ghc/interpreter/Makefile"
|
|
|
|
(("-lbfd -liberty")
|
2022-02-12 21:30:17 +00:00
|
|
|
(string-append (search-input-file inputs "/lib/libbfd.a") " "
|
|
|
|
(search-input-file inputs "/lib/libiberty.a"))))
|
2022-01-28 17:34:32 +00:00
|
|
|
|
|
|
|
(let ((bash (which "bash")))
|
|
|
|
(substitute* '("configure.in"
|
|
|
|
"ghc/configure.in"
|
|
|
|
"ghc/rts/gmp/mpn/configure.in"
|
|
|
|
"ghc/rts/gmp/mpz/configure.in"
|
|
|
|
"ghc/rts/gmp/configure.in"
|
|
|
|
"distrib/configure-bin.in")
|
|
|
|
(("`/bin/sh") (string-append "`" bash))
|
|
|
|
(("SHELL=/bin/sh") (string-append "SHELL=" bash))
|
|
|
|
(("^#! /bin/sh") (string-append "#! " bash)))
|
|
|
|
|
|
|
|
(substitute* '("mk/config.mk.in"
|
|
|
|
"ghc/rts/gmp/mpz/Makefile.in"
|
|
|
|
"ghc/rts/gmp/Makefile.in")
|
|
|
|
(("^SHELL.*=.*/bin/sh") (string-append "SHELL = " bash)))
|
|
|
|
(substitute* "aclocal.m4"
|
|
|
|
(("SHELL=/bin/sh") (string-append "SHELL=" bash)))
|
|
|
|
|
|
|
|
(setenv "CONFIG_SHELL" bash)
|
|
|
|
(setenv "SHELL" bash))
|
|
|
|
|
2022-02-12 21:30:17 +00:00
|
|
|
;; The 'hscpp' script invokes GCC 2.95's 'cpp' (RAWCPP), which
|
|
|
|
;; segfaults unless passed '-x c'.
|
|
|
|
(substitute* "mk/config.mk.in"
|
|
|
|
(("-traditional")
|
|
|
|
"-traditional -x c"))
|
|
|
|
|
|
|
|
(setenv "CPP" (which "cpp"))
|
2022-01-28 17:34:32 +00:00
|
|
|
(invoke "autoreconf" "--verbose" "--force")))
|
|
|
|
(add-before 'configure 'configure-gmp
|
|
|
|
(lambda* (#:key build inputs outputs #:allow-other-keys)
|
|
|
|
(with-directory-excursion "ghc/rts/gmp"
|
|
|
|
(let ((bash (which "bash"))
|
|
|
|
(out (assoc-ref outputs "out")))
|
|
|
|
(invoke bash "./configure")))))
|
|
|
|
(replace 'configure
|
|
|
|
(lambda* (#:key build inputs outputs #:allow-other-keys)
|
|
|
|
(let ((bash (which "bash"))
|
|
|
|
(out (assoc-ref outputs "out")))
|
2022-02-12 21:30:17 +00:00
|
|
|
(call-with-output-file "config.cache"
|
|
|
|
(lambda (port)
|
|
|
|
;; GCC 2.95 fails to deal with anonymous unions in glibc's
|
|
|
|
;; 'struct_rusage.h', so skip that.
|
|
|
|
(display "ac_cv_func_getrusage=no\n" port)))
|
|
|
|
|
2022-01-28 17:34:32 +00:00
|
|
|
(invoke bash "./configure"
|
|
|
|
"--enable-hc-boot"
|
|
|
|
(string-append "--prefix=" out)
|
|
|
|
(string-append "--build=" build)
|
|
|
|
(string-append "--host=" build)))))
|
|
|
|
(add-before 'build 'make-boot
|
|
|
|
(lambda _
|
2022-02-12 21:30:17 +00:00
|
|
|
;; CLK_TCK has been removed from recent libc.
|
|
|
|
(substitute* "ghc/interpreter/nHandle.c"
|
|
|
|
(("CLK_TCK") "sysconf (_SC_CLK_TCK)"))
|
|
|
|
|
2022-01-28 17:34:32 +00:00
|
|
|
;; Only when building with more recent GCC
|
|
|
|
(when #false
|
|
|
|
;; GCC 2.95 is fine with these comments, but GCC 4.6 is not.
|
|
|
|
(substitute* "ghc/rts/universal_call_c.S"
|
2022-02-12 21:30:17 +00:00
|
|
|
(("^# .*") "")))
|
2022-01-28 17:34:32 +00:00
|
|
|
|
|
|
|
;; Only when using more recent Perl
|
|
|
|
(when #false
|
|
|
|
(substitute* "ghc/driver/ghc-asm.prl"
|
|
|
|
(("local\\(\\$\\*\\) = 1;") "")
|
|
|
|
(("endef\\$/") "endef$/s")))
|
|
|
|
|
|
|
|
(setenv "CPATH"
|
|
|
|
(string-append (getcwd) "/ghc/includes:"
|
|
|
|
(getcwd) "/mk:"
|
|
|
|
(or (getenv "CPATH") "")))
|
|
|
|
(invoke "make" "boot")))
|
|
|
|
(replace 'build
|
|
|
|
(lambda _
|
|
|
|
;; TODO: since we don't have a Haskell compiler we cannot build
|
|
|
|
;; the standard library. And without the standard library we
|
|
|
|
;; cannot build a Haskell compiler.
|
|
|
|
;; make[3]: *** No rule to make target 'Array.o', needed by 'libHSstd.a'. Stop.
|
|
|
|
;; make[2]: *** No rule to make target 'utils/Argv.o', needed by 'hsc'. Stop.
|
|
|
|
(invoke "make" "all")))
|
|
|
|
(add-after 'build 'build-hugs
|
|
|
|
(lambda _
|
|
|
|
(invoke "make" "-C" "ghc/interpreter")
|
|
|
|
(invoke "make" "-C" "ghc/interpreter" "install")))
|
|
|
|
(add-after 'install 'install-sources
|
|
|
|
(lambda* (#:key outputs #:allow-other-keys)
|
|
|
|
(let ((lib (string-append (assoc-ref outputs "out") "/lib")))
|
|
|
|
(copy-recursively "hslibs"
|
|
|
|
(string-append lib "/hslibs"))
|
|
|
|
(copy-recursively "ghc/lib"
|
|
|
|
(string-append lib "/ghc/lib"))
|
|
|
|
(copy-recursively "ghc/compiler"
|
|
|
|
(string-append lib "/ghc/compiler"))
|
|
|
|
(copy-recursively "ghc/interpreter/lib" lib)
|
|
|
|
(install-file "ghc/interpreter/nHandle.so" lib)))))))
|
|
|
|
(native-inputs
|
2022-02-12 21:30:17 +00:00
|
|
|
(list autoconf-2.13
|
|
|
|
bison ;for parser.y
|
2022-02-15 09:09:52 +00:00
|
|
|
config
|
2022-01-28 17:34:32 +00:00
|
|
|
|
2022-02-12 21:30:17 +00:00
|
|
|
;; Needed to support lvalue casts.
|
|
|
|
gcc-2.95
|
2022-01-28 17:34:32 +00:00
|
|
|
|
2022-02-12 21:30:17 +00:00
|
|
|
;; Use an older assembler to work around this error in GMP:
|
|
|
|
;; Error: `%edx' not allowed with `testb'
|
|
|
|
binutils-2.33
|
2022-01-28 17:34:32 +00:00
|
|
|
|
2022-02-12 21:30:17 +00:00
|
|
|
;; TODO: Perl used to allow setting $* to enable multi-line
|
|
|
|
;; matching. If we want to use a more recent Perl we need to patch
|
|
|
|
;; all expressions that require multi-line matching. Hard to tell.
|
|
|
|
perl-5.14))
|
2022-01-28 17:34:32 +00:00
|
|
|
(home-page "https://www.haskell.org/ghc")
|
|
|
|
(synopsis "The Glasgow Haskell Compiler")
|
|
|
|
(description
|
|
|
|
"The Glasgow Haskell Compiler (GHC) is a state-of-the-art compiler and
|
|
|
|
interactive environment for the functional language Haskell. The value of
|
|
|
|
this package lies in the modified build of Hugs that is linked with GHC's STG
|
|
|
|
runtime system, the RTS. \"STG\" stands for \"spineless, tagless,
|
|
|
|
G-machine\"; it is the abstract machine designed to support nonstrict
|
|
|
|
higher-order functional languages. Neither the compiler nor the Haskell
|
|
|
|
libraries are included in this package.")
|
|
|
|
(license license:bsd-3)))
|
|
|
|
|
2015-03-28 19:09:37 +00:00
|
|
|
(define ghc-bootstrap-x86_64-7.8.4
|
2015-02-25 19:20:24 +00:00
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
2015-03-28 19:09:37 +00:00
|
|
|
(uri
|
|
|
|
"https://www.haskell.org/ghc/dist/7.8.4/ghc-7.8.4-x86_64-unknown-linux-deb7.tar.xz")
|
2015-02-25 19:20:24 +00:00
|
|
|
(sha256
|
|
|
|
(base32
|
2015-03-28 19:09:37 +00:00
|
|
|
"13azsl53xgj20mi1hj9x0xb32vvcvs6cpmvwx6znxhas7blh0bpn"))))
|
|
|
|
|
|
|
|
(define ghc-bootstrap-i686-7.8.4
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri
|
|
|
|
"https://www.haskell.org/ghc/dist/7.8.4/ghc-7.8.4-i386-unknown-linux-deb7.tar.xz")
|
|
|
|
(sha256
|
|
|
|
(base32
|
|
|
|
"0wj5s435j0zgww70bj1d3f6wvnnpzlxwvwcyh2qv4qjq5z8j64kg"))))
|
2015-02-25 19:20:24 +00:00
|
|
|
|
|
|
|
;; 43 tests out of 3965 fail.
|
|
|
|
;;
|
|
|
|
;; Most of them do not appear to be serious:
|
|
|
|
;;
|
|
|
|
;; - some tests generate files referring to "/bin/sh" and "/bin/ls". I've not
|
|
|
|
;; figured out how these references are generated.
|
|
|
|
;;
|
|
|
|
;; - Some tests allocate more memory than expected (ca. 3% above upper limit)
|
|
|
|
;;
|
|
|
|
;; - Some tests try to load unavailable libriries: Control.Concurrent.STM,
|
|
|
|
;; Data.Vector, Control.Monad.State.
|
|
|
|
;;
|
|
|
|
;; - Test posix010 tries to check the existence of a user on the system:
|
|
|
|
;; getUserEntryForName: does not exist (no such user)
|
2018-02-12 17:38:52 +00:00
|
|
|
(define-public ghc-7
|
2015-02-25 19:20:24 +00:00
|
|
|
(package
|
|
|
|
(name "ghc")
|
2015-10-14 16:02:45 +00:00
|
|
|
(version "7.10.2")
|
2015-02-25 19:20:24 +00:00
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (string-append "https://www.haskell.org/ghc/dist/"
|
|
|
|
version "/" name "-" version "-src.tar.xz"))
|
|
|
|
(sha256
|
|
|
|
(base32
|
2015-10-14 16:02:45 +00:00
|
|
|
"1x8m4rp2v7ydnrz6z9g8x7z3x3d3pxhv2pixy7i7hkbqbdsp7kal"))))
|
2015-02-25 19:20:24 +00:00
|
|
|
(build-system gnu-build-system)
|
|
|
|
(supported-systems '("i686-linux" "x86_64-linux"))
|
|
|
|
(outputs '("out" "doc"))
|
|
|
|
(inputs
|
|
|
|
`(("gmp" ,gmp)
|
|
|
|
("ncurses" ,ncurses)
|
|
|
|
("libffi" ,libffi)
|
|
|
|
("ghc-testsuite"
|
|
|
|
,(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (string-append
|
|
|
|
"https://www.haskell.org/ghc/dist/"
|
|
|
|
version "/" name "-" version "-testsuite.tar.xz"))
|
|
|
|
(sha256
|
|
|
|
(base32
|
2015-10-14 16:02:45 +00:00
|
|
|
"0qp9da9ar87zbyn6wjgacd2ic1vgzbi3cklxnhsmjqyafv9qaj4b"))))))
|
2015-02-25 19:20:24 +00:00
|
|
|
(native-inputs
|
|
|
|
`(("perl" ,perl)
|
|
|
|
("python" ,python-2) ; for tests (fails with python-3)
|
|
|
|
("ghostscript" ,ghostscript) ; for tests
|
|
|
|
("patchelf" ,patchelf)
|
|
|
|
;; GHC is built with GHC. Therefore we need bootstrap binaries.
|
2015-03-28 19:09:37 +00:00
|
|
|
("ghc-binary"
|
|
|
|
,(if (string-match "x86_64" (or (%current-target-system) (%current-system)))
|
|
|
|
ghc-bootstrap-x86_64-7.8.4
|
|
|
|
ghc-bootstrap-i686-7.8.4))))
|
2015-02-25 19:20:24 +00:00
|
|
|
(arguments
|
|
|
|
`(#:test-target "test"
|
|
|
|
;; We get a smaller number of test failures by disabling parallel test
|
|
|
|
;; execution.
|
|
|
|
#:parallel-tests? #f
|
2015-04-14 07:55:35 +00:00
|
|
|
|
2015-07-16 03:18:30 +00:00
|
|
|
;; Don't pass --build=<triplet>, because the configure script
|
|
|
|
;; auto-detects slightly different triplets for --host and --target and
|
|
|
|
;; then complains that they don't match.
|
|
|
|
#:build #f
|
|
|
|
|
2015-02-25 19:20:24 +00:00
|
|
|
#:modules ((guix build gnu-build-system)
|
|
|
|
(guix build utils)
|
|
|
|
(srfi srfi-26)
|
|
|
|
(srfi srfi-1))
|
|
|
|
#:configure-flags
|
|
|
|
(list
|
|
|
|
(string-append "--with-gmp-libraries="
|
|
|
|
(assoc-ref %build-inputs "gmp") "/lib")
|
|
|
|
(string-append "--with-gmp-includes="
|
|
|
|
(assoc-ref %build-inputs "gmp") "/include")
|
|
|
|
"--with-system-libffi"
|
|
|
|
(string-append "--with-ffi-libraries="
|
|
|
|
(assoc-ref %build-inputs "libffi") "/lib")
|
|
|
|
(string-append "--with-ffi-includes="
|
|
|
|
(assoc-ref %build-inputs "libffi") "/include"))
|
|
|
|
;; FIXME: The user-guide needs dblatex, docbook-xsl and docbook-utils.
|
|
|
|
;; Currently we do not have the last one.
|
|
|
|
;; #:make-flags
|
|
|
|
;; (list "BUILD_DOCBOOK_HTML = YES")
|
|
|
|
#:phases
|
|
|
|
(let* ((ghc-bootstrap-path
|
|
|
|
(string-append (getcwd) "/" ,name "-" ,version "/ghc-bin"))
|
|
|
|
(ghc-bootstrap-prefix
|
|
|
|
(string-append ghc-bootstrap-path "/usr" )))
|
|
|
|
(alist-cons-after
|
2015-06-11 22:51:47 +00:00
|
|
|
'unpack-bin 'unpack-testsuite-and-fix-bins
|
2015-02-25 19:20:24 +00:00
|
|
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
|
|
|
(with-directory-excursion ".."
|
|
|
|
(copy-file (assoc-ref inputs "ghc-testsuite")
|
|
|
|
"ghc-testsuite.tar.xz")
|
2020-04-08 10:21:42 +00:00
|
|
|
(invoke "tar" "xvf" "ghc-testsuite.tar.xz"))
|
2015-02-25 19:20:24 +00:00
|
|
|
(substitute*
|
|
|
|
(list "testsuite/timeout/Makefile"
|
|
|
|
"testsuite/timeout/timeout.py"
|
|
|
|
"testsuite/timeout/timeout.hs"
|
|
|
|
"testsuite/tests/rename/prog006/Setup.lhs"
|
2015-06-11 22:51:47 +00:00
|
|
|
"testsuite/tests/programs/life_space_leak/life.test"
|
|
|
|
"libraries/process/System/Process/Internals.hs"
|
|
|
|
"libraries/unix/cbits/execvpe.c")
|
2015-02-25 19:20:24 +00:00
|
|
|
(("/bin/sh") (which "sh"))
|
|
|
|
(("/bin/rm") "rm"))
|
|
|
|
#t)
|
|
|
|
(alist-cons-after
|
|
|
|
'unpack 'unpack-bin
|
|
|
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
|
|
|
(mkdir-p ghc-bootstrap-prefix)
|
|
|
|
(with-directory-excursion ghc-bootstrap-path
|
|
|
|
(copy-file (assoc-ref inputs "ghc-binary")
|
|
|
|
"ghc-bin.tar.xz")
|
2020-04-08 10:21:42 +00:00
|
|
|
(invoke "tar" "xvf" "ghc-bin.tar.xz")))
|
2015-02-25 19:20:24 +00:00
|
|
|
(alist-cons-before
|
|
|
|
'install-bin 'configure-bin
|
|
|
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
|
|
|
(let* ((binaries
|
|
|
|
(list
|
|
|
|
"./utils/ghc-pwd/dist-install/build/tmp/ghc-pwd"
|
|
|
|
"./utils/hpc/dist-install/build/tmp/hpc"
|
|
|
|
"./utils/haddock/dist/build/tmp/haddock"
|
|
|
|
"./utils/hsc2hs/dist-install/build/tmp/hsc2hs"
|
|
|
|
"./utils/runghc/dist-install/build/tmp/runghc"
|
|
|
|
"./utils/ghc-cabal/dist-install/build/tmp/ghc-cabal"
|
|
|
|
"./utils/hp2ps/dist/build/tmp/hp2ps"
|
|
|
|
"./utils/ghc-pkg/dist-install/build/tmp/ghc-pkg"
|
|
|
|
"./utils/unlit/dist/build/tmp/unlit"
|
|
|
|
"./ghc/stage2/build/tmp/ghc-stage2"))
|
|
|
|
(gmp (assoc-ref inputs "gmp"))
|
|
|
|
(gmp-lib (string-append gmp "/lib"))
|
|
|
|
(gmp-include (string-append gmp "/include"))
|
|
|
|
(ncurses-lib
|
2021-07-16 14:19:35 +00:00
|
|
|
(dirname (search-input-file inputs "/lib/libncurses.so")))
|
|
|
|
(ld-so (search-input-file inputs ,(glibc-dynamic-linker)))
|
2015-02-25 19:20:24 +00:00
|
|
|
(libtinfo-dir
|
|
|
|
(string-append ghc-bootstrap-prefix
|
|
|
|
"/lib/ghc-7.8.4/terminfo-0.4.0.0")))
|
|
|
|
(with-directory-excursion
|
2015-10-14 16:02:45 +00:00
|
|
|
(string-append ghc-bootstrap-path "/ghc-7.8.4")
|
2015-02-25 19:20:24 +00:00
|
|
|
(setenv "CONFIG_SHELL" (which "bash"))
|
|
|
|
(setenv "LD_LIBRARY_PATH" gmp-lib)
|
|
|
|
;; The binaries have "/lib64/ld-linux-x86-64.so.2" hardcoded.
|
|
|
|
(for-each
|
2020-04-08 10:21:42 +00:00
|
|
|
(cut invoke "patchelf" "--set-interpreter" ld-so <>)
|
2015-02-25 19:20:24 +00:00
|
|
|
binaries)
|
|
|
|
;; The binaries include a reference to libtinfo.so.5 which
|
|
|
|
;; is a subset of libncurses.so.5. We create a symlink in a
|
|
|
|
;; directory included in the bootstrap binaries rpath.
|
|
|
|
(mkdir-p libtinfo-dir)
|
|
|
|
(symlink
|
|
|
|
(string-append ncurses-lib "/libncursesw.so."
|
2018-03-14 18:58:32 +00:00
|
|
|
;; Extract "6.0" from "6.0-20170930" if a
|
|
|
|
;; dash-separated version tag exists.
|
2018-01-16 22:11:00 +00:00
|
|
|
,(let* ((v (package-version ncurses))
|
2018-03-14 18:58:32 +00:00
|
|
|
(d (or (string-index v #\-)
|
|
|
|
(string-length v))))
|
2018-01-16 22:11:00 +00:00
|
|
|
(version-major+minor (string-take v d))))
|
2015-02-25 19:20:24 +00:00
|
|
|
(string-append libtinfo-dir "/libtinfo.so.5"))
|
2018-01-16 22:11:00 +00:00
|
|
|
|
2015-02-25 19:20:24 +00:00
|
|
|
(setenv "PATH"
|
|
|
|
(string-append (getenv "PATH") ":"
|
|
|
|
ghc-bootstrap-prefix "/bin"))
|
2020-04-08 10:21:42 +00:00
|
|
|
(invoke
|
2015-02-25 19:20:24 +00:00
|
|
|
(string-append (getcwd) "/configure")
|
|
|
|
(string-append "--prefix=" ghc-bootstrap-prefix)
|
|
|
|
(string-append "--with-gmp-libraries=" gmp-lib)
|
|
|
|
(string-append "--with-gmp-includes=" gmp-include)))))
|
|
|
|
(alist-cons-before
|
|
|
|
'configure 'install-bin
|
|
|
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
|
|
|
(with-directory-excursion
|
2015-10-14 16:02:45 +00:00
|
|
|
(string-append ghc-bootstrap-path "/ghc-7.8.4")
|
2020-04-08 10:21:42 +00:00
|
|
|
(invoke "make" "install")))
|
2015-02-25 19:20:24 +00:00
|
|
|
%standard-phases)))))))
|
2015-10-06 02:49:24 +00:00
|
|
|
(native-search-paths (list (search-path-specification
|
|
|
|
(variable "GHC_PACKAGE_PATH")
|
|
|
|
(files (list
|
|
|
|
(string-append "lib/ghc-" version)))
|
|
|
|
(file-pattern ".*\\.conf\\.d$")
|
|
|
|
(file-type 'directory))))
|
2015-02-25 19:20:24 +00:00
|
|
|
(home-page "https://www.haskell.org/ghc")
|
|
|
|
(synopsis "The Glasgow Haskell Compiler")
|
2016-10-16 15:01:46 +00:00
|
|
|
(description
|
|
|
|
"The Glasgow Haskell Compiler (GHC) is a state-of-the-art compiler and
|
|
|
|
interactive environment for the functional language Haskell.")
|
|
|
|
(license license:bsd-3)))
|
|
|
|
|
2018-08-17 14:55:43 +00:00
|
|
|
(define-public ghc-8.0
|
2016-10-16 15:01:46 +00:00
|
|
|
(package
|
|
|
|
(name "ghc")
|
2017-01-25 17:21:43 +00:00
|
|
|
(version "8.0.2")
|
2016-10-16 15:01:46 +00:00
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (string-append "https://www.haskell.org/ghc/dist/"
|
|
|
|
version "/" name "-" version "-src.tar.xz"))
|
|
|
|
(sha256
|
2017-01-25 17:21:43 +00:00
|
|
|
(base32 "1c8qc4fhkycynk4g1f9hvk53dj6a1vvqi6bklqznns6hw59m8qhi"))
|
|
|
|
(patches
|
2020-03-24 16:59:18 +00:00
|
|
|
(search-patches "ghc-8.0-fall-back-to-madv_dontneed.patch"))))
|
2016-10-16 15:01:46 +00:00
|
|
|
(build-system gnu-build-system)
|
|
|
|
(supported-systems '("i686-linux" "x86_64-linux"))
|
|
|
|
(outputs '("out" "doc"))
|
|
|
|
(inputs
|
|
|
|
`(("gmp" ,gmp)
|
|
|
|
("ncurses" ,ncurses)
|
|
|
|
("libffi" ,libffi)
|
|
|
|
("ghc-testsuite"
|
|
|
|
,(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (string-append
|
|
|
|
"https://www.haskell.org/ghc/dist/"
|
|
|
|
version "/" name "-" version "-testsuite.tar.xz"))
|
|
|
|
(sha256
|
2017-01-25 17:21:43 +00:00
|
|
|
(base32 "1wjc3x68l305bl1h1ijd3yhqp2vqj83lkp3kqbr94qmmkqlms8sj"))))))
|
2016-10-16 15:01:46 +00:00
|
|
|
(native-inputs
|
|
|
|
`(("perl" ,perl)
|
|
|
|
("python" ,python-2) ; for tests
|
|
|
|
("ghostscript" ,ghostscript) ; for tests
|
|
|
|
;; GHC is built with GHC.
|
2018-02-12 17:38:52 +00:00
|
|
|
("ghc-bootstrap" ,ghc-7)))
|
2016-10-16 15:01:46 +00:00
|
|
|
(arguments
|
|
|
|
`(#:test-target "test"
|
|
|
|
;; We get a smaller number of test failures by disabling parallel test
|
|
|
|
;; execution.
|
|
|
|
#:parallel-tests? #f
|
|
|
|
|
|
|
|
;; Don't pass --build=<triplet>, because the configure script
|
|
|
|
;; auto-detects slightly different triplets for --host and --target and
|
|
|
|
;; then complains that they don't match.
|
|
|
|
#:build #f
|
|
|
|
|
|
|
|
#:configure-flags
|
|
|
|
(list
|
|
|
|
(string-append "--with-gmp-libraries="
|
|
|
|
(assoc-ref %build-inputs "gmp") "/lib")
|
|
|
|
(string-append "--with-gmp-includes="
|
|
|
|
(assoc-ref %build-inputs "gmp") "/include")
|
|
|
|
"--with-system-libffi"
|
|
|
|
(string-append "--with-ffi-libraries="
|
|
|
|
(assoc-ref %build-inputs "libffi") "/lib")
|
|
|
|
(string-append "--with-ffi-includes="
|
|
|
|
(assoc-ref %build-inputs "libffi") "/include")
|
|
|
|
(string-append "--with-curses-libraries="
|
|
|
|
(assoc-ref %build-inputs "ncurses") "/lib")
|
|
|
|
(string-append "--with-curses-includes="
|
|
|
|
(assoc-ref %build-inputs "ncurses") "/include"))
|
|
|
|
#:phases
|
|
|
|
(modify-phases %standard-phases
|
|
|
|
(add-after 'unpack 'unpack-testsuite
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
(with-directory-excursion ".."
|
|
|
|
(copy-file (assoc-ref inputs "ghc-testsuite")
|
|
|
|
"ghc-testsuite.tar.xz")
|
|
|
|
(zero? (system* "tar" "xvf" "ghc-testsuite.tar.xz")))))
|
|
|
|
(add-before 'build 'fix-lib-paths
|
|
|
|
(lambda _
|
|
|
|
(substitute*
|
|
|
|
(list "libraries/process/System/Process/Posix.hs"
|
|
|
|
"libraries/process/tests/process001.hs"
|
|
|
|
"libraries/process/tests/process002.hs"
|
|
|
|
"libraries/unix/cbits/execvpe.c")
|
|
|
|
(("/bin/sh") (which "sh"))
|
|
|
|
(("/bin/ls") (which "ls")))
|
|
|
|
#t))
|
|
|
|
(add-before 'build 'fix-environment
|
|
|
|
(lambda _
|
|
|
|
(unsetenv "GHC_PACKAGE_PATH")
|
|
|
|
(setenv "CONFIG_SHELL" (which "bash"))
|
|
|
|
#t))
|
|
|
|
(add-before 'check 'fix-testsuite
|
|
|
|
(lambda _
|
|
|
|
(substitute*
|
|
|
|
(list "testsuite/timeout/Makefile"
|
|
|
|
"testsuite/timeout/timeout.py"
|
|
|
|
"testsuite/timeout/timeout.hs"
|
|
|
|
"testsuite/tests/programs/life_space_leak/life.test")
|
|
|
|
(("/bin/sh") (which "sh"))
|
|
|
|
(("/bin/rm") "rm"))
|
2017-01-25 17:21:43 +00:00
|
|
|
#t)))))
|
2016-10-16 15:01:46 +00:00
|
|
|
(native-search-paths (list (search-path-specification
|
|
|
|
(variable "GHC_PACKAGE_PATH")
|
|
|
|
(files (list
|
|
|
|
(string-append "lib/ghc-" version)))
|
|
|
|
(file-pattern ".*\\.conf\\.d$")
|
|
|
|
(file-type 'directory))))
|
|
|
|
(home-page "https://www.haskell.org/ghc")
|
|
|
|
(synopsis "The Glasgow Haskell Compiler")
|
2015-02-25 19:20:24 +00:00
|
|
|
(description
|
|
|
|
"The Glasgow Haskell Compiler (GHC) is a state-of-the-art compiler and
|
|
|
|
interactive environment for the functional language Haskell.")
|
2015-12-18 23:30:33 +00:00
|
|
|
(license license:bsd-3)))
|
2015-02-25 19:20:24 +00:00
|
|
|
|
2019-08-05 15:03:35 +00:00
|
|
|
(define-public ghc-8.4
|
2018-08-17 14:55:43 +00:00
|
|
|
(package (inherit ghc-8.0)
|
|
|
|
(name "ghc")
|
2020-03-23 15:33:06 +00:00
|
|
|
(version "8.4.4")
|
2018-08-17 14:55:43 +00:00
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (string-append "https://www.haskell.org/ghc/dist/"
|
|
|
|
version "/" name "-" version "-src.tar.xz"))
|
|
|
|
(sha256
|
2020-03-23 15:33:06 +00:00
|
|
|
(base32 "1ch4j2asg7pr52ai1hwzykxyj553wndg7wq93i47ql4fllspf48i"))))
|
2018-08-17 14:55:43 +00:00
|
|
|
(inputs
|
2021-12-13 16:18:24 +00:00
|
|
|
(list gmp ncurses libffi))
|
2018-08-17 14:55:43 +00:00
|
|
|
(native-inputs
|
|
|
|
`(("perl" ,perl)
|
|
|
|
("python" ,python) ; for tests
|
|
|
|
("ghostscript" ,ghostscript) ; for tests
|
|
|
|
;; GHC 8.4.3 is built with GHC 8.
|
|
|
|
("ghc-bootstrap" ,ghc-8.0)
|
|
|
|
("ghc-testsuite"
|
|
|
|
,(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (string-append
|
|
|
|
"https://www.haskell.org/ghc/dist/"
|
|
|
|
version "/" name "-" version "-testsuite.tar.xz"))
|
|
|
|
(sha256
|
|
|
|
(base32
|
2020-03-23 15:33:06 +00:00
|
|
|
"0s8lf9sxj7n89pjagi58b3fahnp34qvmwhnn0j1fbg6955vbrfj6"))))))
|
2018-08-17 14:55:43 +00:00
|
|
|
(arguments
|
|
|
|
`(#:test-target "test"
|
|
|
|
;; We get a smaller number of test failures by disabling parallel test
|
|
|
|
;; execution.
|
|
|
|
#:parallel-tests? #f
|
|
|
|
|
|
|
|
;; Don't pass --build=<triplet>, because the configure script
|
|
|
|
;; auto-detects slightly different triplets for --host and --target and
|
|
|
|
;; then complains that they don't match.
|
|
|
|
#:build #f
|
|
|
|
|
|
|
|
#:configure-flags
|
|
|
|
(list
|
|
|
|
(string-append "--with-gmp-libraries="
|
|
|
|
(assoc-ref %build-inputs "gmp") "/lib")
|
|
|
|
(string-append "--with-gmp-includes="
|
|
|
|
(assoc-ref %build-inputs "gmp") "/include")
|
|
|
|
"--with-system-libffi"
|
|
|
|
(string-append "--with-ffi-libraries="
|
|
|
|
(assoc-ref %build-inputs "libffi") "/lib")
|
|
|
|
(string-append "--with-ffi-includes="
|
|
|
|
(assoc-ref %build-inputs "libffi") "/include")
|
|
|
|
(string-append "--with-curses-libraries="
|
|
|
|
(assoc-ref %build-inputs "ncurses") "/lib")
|
|
|
|
(string-append "--with-curses-includes="
|
|
|
|
(assoc-ref %build-inputs "ncurses") "/include"))
|
|
|
|
#:phases
|
|
|
|
(modify-phases %standard-phases
|
|
|
|
(add-after 'unpack 'unpack-testsuite
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
(invoke "tar" "xvf"
|
|
|
|
(assoc-ref inputs "ghc-testsuite")
|
|
|
|
"--strip-components=1")
|
|
|
|
#t))
|
2019-01-17 08:17:41 +00:00
|
|
|
;; This phase patches the 'ghc-pkg' command so that it sorts the list
|
|
|
|
;; of packages in the binary cache it generates.
|
|
|
|
(add-before 'build 'fix-ghc-pkg-nondeterminism
|
|
|
|
(lambda _
|
|
|
|
(substitute* "utils/ghc-pkg/Main.hs"
|
|
|
|
(("confs = map \\(path </>\\) \\$ filter \\(\".conf\" `isSuffixOf`\\) fs")
|
|
|
|
"confs = map (path </>) $ filter (\".conf\" `isSuffixOf`) (sort fs)"))
|
|
|
|
#t))
|
2018-08-17 14:55:43 +00:00
|
|
|
(add-after 'unpack-testsuite 'fix-shell-wrappers
|
|
|
|
(lambda _
|
|
|
|
(substitute* '("driver/ghci/ghc.mk"
|
|
|
|
"utils/mkdirhier/ghc.mk"
|
|
|
|
"rules/shell-wrapper.mk")
|
|
|
|
(("echo '#!/bin/sh'")
|
|
|
|
(format #f "echo '#!~a'" (which "sh"))))
|
|
|
|
#t))
|
|
|
|
;; This is necessary because the configure system no longer uses
|
|
|
|
;; “AC_PATH_” but “AC_CHECK_”, setting the variables to just the
|
|
|
|
;; plain command names.
|
|
|
|
(add-before 'configure 'set-target-programs
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
2020-03-23 15:32:44 +00:00
|
|
|
(let ((binutils (assoc-ref inputs "binutils"))
|
|
|
|
(gcc (assoc-ref inputs "gcc"))
|
|
|
|
(ld-wrapper (assoc-ref inputs "ld-wrapper")))
|
2018-08-17 14:55:43 +00:00
|
|
|
(setenv "CC" (string-append gcc "/bin/gcc"))
|
|
|
|
(setenv "CXX" (string-append gcc "/bin/g++"))
|
|
|
|
(setenv "LD" (string-append ld-wrapper "/bin/ld"))
|
|
|
|
(setenv "NM" (string-append binutils "/bin/nm"))
|
|
|
|
(setenv "RANLIB" (string-append binutils "/bin/ranlib"))
|
|
|
|
(setenv "STRIP" (string-append binutils "/bin/strip"))
|
|
|
|
;; The 'ar' command does not follow the same pattern.
|
|
|
|
(setenv "fp_prog_ar" (string-append binutils "/bin/ar"))
|
|
|
|
#t)))
|
|
|
|
(add-before 'build 'fix-references
|
|
|
|
(lambda _
|
|
|
|
(substitute* '("testsuite/timeout/Makefile"
|
|
|
|
"testsuite/timeout/timeout.py"
|
|
|
|
"testsuite/timeout/timeout.hs"
|
|
|
|
"testsuite/tests/programs/life_space_leak/life.test"
|
|
|
|
;; libraries
|
|
|
|
"libraries/process/System/Process/Posix.hs"
|
|
|
|
"libraries/process/tests/process001.hs"
|
|
|
|
"libraries/process/tests/process002.hs"
|
|
|
|
"libraries/unix/cbits/execvpe.c")
|
|
|
|
(("/bin/sh") (which "sh"))
|
|
|
|
(("/bin/ls") (which "ls"))
|
|
|
|
(("/bin/rm") "rm"))
|
|
|
|
#t))
|
|
|
|
(add-before 'build 'fix-environment
|
|
|
|
(lambda _
|
|
|
|
(unsetenv "GHC_PACKAGE_PATH")
|
|
|
|
(setenv "CONFIG_SHELL" (which "bash"))
|
|
|
|
#t)))))
|
|
|
|
(native-search-paths (list (search-path-specification
|
|
|
|
(variable "GHC_PACKAGE_PATH")
|
|
|
|
(files (list
|
|
|
|
(string-append "lib/ghc-" version)))
|
|
|
|
(file-pattern ".*\\.conf\\.d$")
|
|
|
|
(file-type 'directory))))))
|
|
|
|
|
2019-07-16 06:45:40 +00:00
|
|
|
(define-public ghc-8.6
|
|
|
|
(package (inherit ghc-8.4)
|
|
|
|
(name "ghc")
|
|
|
|
(version "8.6.5")
|
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (string-append "https://www.haskell.org/ghc/dist/"
|
|
|
|
version "/" name "-" version "-src.tar.xz"))
|
|
|
|
(sha256
|
|
|
|
(base32 "0qg3zsmbk4rkwkc3jpas3zs74qaxmw4sp4v1mhsbj0a0dzls2jjd"))))
|
|
|
|
(native-inputs
|
|
|
|
`(;; GHC 8.6.5 must be built with GHC >= 8.2.
|
|
|
|
("ghc-bootstrap" ,ghc-8.4)
|
|
|
|
("ghc-testsuite"
|
|
|
|
,(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (string-append
|
|
|
|
"https://www.haskell.org/ghc/dist/"
|
|
|
|
version "/" name "-" version "-testsuite.tar.xz"))
|
2020-03-24 16:58:20 +00:00
|
|
|
(patches (search-patches "ghc-testsuite-dlopen-pie.patch"))
|
2019-07-16 06:45:40 +00:00
|
|
|
(sha256
|
|
|
|
(base32
|
|
|
|
"0pw9r91g2np3i806g2f4f8z4jfdd7mx226cmdizk4swa7av1qf91"))))
|
|
|
|
,@(filter (match-lambda
|
|
|
|
(("ghc-bootstrap" . _) #f)
|
|
|
|
(("ghc-testsuite" . _) #f)
|
|
|
|
(_ #t))
|
|
|
|
(package-native-inputs ghc-8.4))))
|
|
|
|
(arguments
|
|
|
|
(substitute-keyword-arguments (package-arguments ghc-8.4)
|
|
|
|
((#:make-flags make-flags ''())
|
|
|
|
`(cons "EXTRA_RUNTEST_OPTS=--skip-perf-tests"
|
|
|
|
,make-flags))
|
|
|
|
((#:phases phases '%standard-phases)
|
|
|
|
`(modify-phases ,phases
|
2020-06-26 13:17:31 +00:00
|
|
|
(add-after 'install 'remove-unnecessary-references
|
|
|
|
(lambda* (#:key outputs #:allow-other-keys)
|
|
|
|
(substitute* (find-files (string-append (assoc-ref outputs "out") "/lib/")
|
|
|
|
"settings")
|
|
|
|
(("/gnu/store/.*/bin/(.*)" m program) program))
|
|
|
|
|
|
|
|
;; Remove references to "doc" output from "out" by rewriting
|
|
|
|
;; the "haddock-interfaces" fields and removing the optional
|
|
|
|
;; "haddock-html" field in the generated .conf files.
|
|
|
|
(let ((doc (assoc-ref outputs "doc"))
|
|
|
|
(out (assoc-ref outputs "out")))
|
|
|
|
(with-fluids ((%default-port-encoding #f))
|
|
|
|
(for-each (lambda (config-file)
|
|
|
|
(substitute* config-file
|
|
|
|
(("^haddock-html: .*") "\n")
|
|
|
|
(((format #f "^haddock-interfaces: ~a" doc))
|
|
|
|
(string-append "haddock-interfaces: " out))))
|
|
|
|
(find-files (string-append out "/lib") ".conf")))
|
|
|
|
;; Move the referenced files to the "out" output.
|
|
|
|
(for-each (lambda (haddock-file)
|
|
|
|
(let* ((subdir (string-drop haddock-file (string-length doc)))
|
|
|
|
(new (string-append out subdir)))
|
|
|
|
(mkdir-p (dirname new))
|
|
|
|
(rename-file haddock-file new)))
|
|
|
|
(find-files doc "\\.haddock$")))
|
|
|
|
#t))
|
2019-07-16 06:45:40 +00:00
|
|
|
(add-after 'unpack-testsuite 'skip-tests
|
|
|
|
(lambda _
|
2020-03-23 18:42:56 +00:00
|
|
|
;; These two tests refer to the root user, which doesn't exist
|
|
|
|
;; (see <https://bugs.gnu.org/36692>).
|
2019-07-16 06:45:40 +00:00
|
|
|
(substitute* "libraries/unix/tests/all.T"
|
|
|
|
(("^test\\('T8108'") "# guix skipped: test('T8108'"))
|
|
|
|
(substitute* "libraries/unix/tests/libposix/all.T"
|
|
|
|
(("^test\\('posix010'") "# guix skipped: test('posix010'"))
|
2019-09-10 01:12:41 +00:00
|
|
|
#t))))))
|
|
|
|
(native-search-paths (list (search-path-specification
|
|
|
|
(variable "GHC_PACKAGE_PATH")
|
|
|
|
(files (list
|
|
|
|
(string-append "lib/ghc-" version)))
|
|
|
|
(file-pattern ".*\\.conf\\.d$")
|
|
|
|
(file-type 'directory))))))
|
2019-07-16 06:45:40 +00:00
|
|
|
|
2020-05-03 04:31:03 +00:00
|
|
|
(define-public ghc-8.8
|
|
|
|
(package (inherit ghc-8.6)
|
2021-09-15 11:26:40 +00:00
|
|
|
(name "ghc")
|
2021-07-13 12:09:37 +00:00
|
|
|
(version "8.8.4")
|
2020-05-03 04:31:03 +00:00
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (string-append "https://www.haskell.org/ghc/dist/"
|
|
|
|
version "/ghc-" version "-src.tar.xz"))
|
|
|
|
(sha256
|
2021-07-13 12:09:37 +00:00
|
|
|
(base32 "0bgwbxxvdn56l91bp9p5d083gzcfdi6z8l8b17qzjpr3n8w5wl7h"))))
|
2020-05-03 04:31:03 +00:00
|
|
|
(native-inputs
|
|
|
|
`(("ghc-bootstrap" ,ghc-8.6)
|
|
|
|
("ghc-testsuite"
|
|
|
|
,(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (string-append
|
|
|
|
"https://www.haskell.org/ghc/dist/"
|
|
|
|
version "/ghc-" version "-testsuite.tar.xz"))
|
|
|
|
(patches (search-patches "ghc-testsuite-dlopen-pie.patch"))
|
|
|
|
(sha256
|
|
|
|
(base32
|
2021-07-13 12:09:37 +00:00
|
|
|
"0c55pj2820q26rikhpf636sn4mjgqsxjrl94vsywrh79dxp3k14z"))))
|
2021-11-21 17:03:22 +00:00
|
|
|
("git" ,git-minimal/fixed) ; invoked during tests
|
2020-05-03 04:31:03 +00:00
|
|
|
,@(filter (match-lambda
|
|
|
|
(("ghc-bootstrap" . _) #f)
|
|
|
|
(("ghc-testsuite" . _) #f)
|
|
|
|
(_ #t))
|
|
|
|
(package-native-inputs ghc-8.6))))
|
|
|
|
(arguments
|
|
|
|
(substitute-keyword-arguments (package-arguments ghc-8.6)
|
|
|
|
((#:phases phases '%standard-phases)
|
|
|
|
`(modify-phases ,phases
|
2021-07-13 12:09:37 +00:00
|
|
|
(add-after 'fix-references 'fix-cc-reference
|
|
|
|
(lambda _
|
|
|
|
(substitute* "utils/hsc2hs/Common.hs"
|
|
|
|
(("\"cc\"") "\"gcc\""))
|
|
|
|
#t))
|
2020-05-03 04:31:03 +00:00
|
|
|
(add-after 'unpack-testsuite 'skip-more-tests
|
|
|
|
(lambda _
|
|
|
|
;; XXX: This test fails because our ld-wrapper script
|
|
|
|
;; mangles the response file passed to the linker.
|
|
|
|
(substitute* "testsuite/tests/hp2ps/all.T"
|
|
|
|
(("^test\\('T15904'") "# guix skipped: test('T15904'"))
|
|
|
|
#t))))))
|
|
|
|
(native-search-paths (list (search-path-specification
|
|
|
|
(variable "GHC_PACKAGE_PATH")
|
|
|
|
(files (list
|
|
|
|
(string-append "lib/ghc-" version)))
|
|
|
|
(file-pattern ".*\\.conf\\.d$")
|
|
|
|
(file-type 'directory))))))
|
|
|
|
|
2021-09-14 07:55:15 +00:00
|
|
|
(define-public ghc-8.10
|
|
|
|
(package
|
|
|
|
(inherit ghc-8.8)
|
2021-09-15 11:26:40 +00:00
|
|
|
(name "ghc")
|
2021-09-14 07:55:15 +00:00
|
|
|
(version "8.10.7")
|
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (string-append "https://www.haskell.org/ghc/dist/"
|
|
|
|
version "/ghc-" version "-src.tar.xz"))
|
|
|
|
(sha256
|
|
|
|
(base32 "179ws2q0dinl1a39wm9j37xzwm84zfz3c5543vz8v479khigdvp3"))))
|
|
|
|
(native-inputs
|
|
|
|
`(("ghc-bootstrap" ,ghc-8.8)
|
|
|
|
("ghc-testsuite"
|
|
|
|
,(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (string-append
|
|
|
|
"https://www.haskell.org/ghc/dist/"
|
|
|
|
version "/ghc-" version "-testsuite.tar.xz"))
|
|
|
|
(patches (search-patches "ghc-testsuite-dlopen-pie.patch"))
|
|
|
|
(sha256
|
|
|
|
(base32
|
|
|
|
"1zl25gg6bpx5601k8h3cqnns1xfc0nqgwnh8jvn2s65ra3f2g1nz"))))
|
2021-11-18 10:37:00 +00:00
|
|
|
("git" ,git-minimal/fixed) ; invoked during tests
|
2021-09-14 07:55:15 +00:00
|
|
|
,@(filter (match-lambda
|
|
|
|
(("ghc-bootstrap" . _) #f)
|
|
|
|
(("ghc-testsuite" . _) #f)
|
|
|
|
(_ #t))
|
|
|
|
(package-native-inputs ghc-8.8))))
|
|
|
|
(arguments
|
|
|
|
(substitute-keyword-arguments (package-arguments ghc-8.8)
|
|
|
|
((#:phases phases '%standard-phases)
|
|
|
|
`(modify-phases ,phases
|
|
|
|
(add-after 'unpack-testsuite 'patch-more-shebangs
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
(let ((bash (assoc-ref inputs "bash")))
|
|
|
|
(substitute* '("testsuite/tests/driver/T8602/T8602.script")
|
|
|
|
(("/bin/sh")
|
|
|
|
(string-append bash "/bin/sh"))))))
|
|
|
|
;; Mark failing tests as broken. Reason for failure is unknown.
|
|
|
|
(add-after 'skip-more-tests 'skip-even-more-tests
|
|
|
|
(lambda _
|
|
|
|
(substitute* '("testsuite/tests/driver/T16521/all.T")
|
|
|
|
(("extra_files" all) (string-append "[" all))
|
|
|
|
(("\\]\\), " all)
|
2021-10-09 13:32:27 +00:00
|
|
|
(string-append all "expect_broken(0)], ")))))
|
|
|
|
;; TODO: Turn this into an undconditional patch on the next rebuild.
|
2021-11-30 11:14:27 +00:00
|
|
|
,@(if (string-prefix? "i686" (or (%current-target-system)
|
|
|
|
(%current-system)))
|
2021-10-09 13:32:27 +00:00
|
|
|
'((add-after 'skip-more-tests 'skip-failing-tests-i686
|
|
|
|
(lambda _
|
|
|
|
(substitute* '("testsuite/tests/codeGen/should_compile/all.T")
|
|
|
|
(("(test\\('T15155l', )when\\(unregisterised\\(\\), skip\\)" all before)
|
2021-11-30 11:14:27 +00:00
|
|
|
(string-append before "when(arch('i386'), skip)")))
|
|
|
|
;; Unexpected failures:
|
|
|
|
;; quasiquotation/T14028.run T14028 [bad stderr] (dyn)
|
|
|
|
(substitute* '("testsuite/tests/quasiquotation/all.T")
|
|
|
|
(("unless\\(config.have_ext_interp, skip\\),")
|
|
|
|
"unless(config.have_ext_interp, skip), when(arch('i386'), skip),")))))
|
2021-10-09 13:32:27 +00:00
|
|
|
'())))))
|
2021-09-14 07:55:15 +00:00
|
|
|
(native-search-paths (list (search-path-specification
|
|
|
|
(variable "GHC_PACKAGE_PATH")
|
|
|
|
(files (list
|
|
|
|
(string-append "lib/ghc-" version)))
|
|
|
|
(file-pattern ".*\\.conf\\.d$")
|
|
|
|
(file-type 'directory))))))
|
|
|
|
|
2021-09-15 11:26:40 +00:00
|
|
|
;; Versions newer than ghc defined below (i.e. the compiler
|
|
|
|
;; haskell-build-system uses) should use ghc-next as their name to
|
|
|
|
;; ensure ghc (without version specification) and ghc-* packages are
|
|
|
|
;; always compatible. See https://issues.guix.gnu.org/issue/47335.
|
|
|
|
|
|
|
|
(define-public ghc-8 ghc-8.10)
|
2019-08-05 15:03:35 +00:00
|
|
|
|
2018-09-01 18:10:20 +00:00
|
|
|
(define-public ghc ghc-8)
|
2018-02-12 17:38:52 +00:00
|
|
|
|
2015-02-25 19:20:24 +00:00
|
|
|
;;; haskell.scm ends here
|