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>
|
2023-04-15 01:13:05 +00:00
|
|
|
|
;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@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)
|
2022-10-26 22:13:43 +00:00
|
|
|
|
#:use-module (gnu packages flex)
|
2022-01-28 17:34:32 +00:00
|
|
|
|
#: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)
|
2022-10-28 11:53:27 +00:00
|
|
|
|
#:use-module (gnu packages m4)
|
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)
|
2022-12-31 10:23:20 +00:00
|
|
|
|
#:use-module (guix build-system haskell)
|
2017-01-02 13:36:58 +00:00
|
|
|
|
#: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
|
2022-10-21 12:50:36 +00:00
|
|
|
|
"0ar4nxy4cr5vwvfj71gmc174vx0n3lg9ka05sa1k60c8z0g3xp1q"))))
|
2022-01-28 17:34:32 +00:00
|
|
|
|
(build-system gnu-build-system)
|
|
|
|
|
(supported-systems '("i686-linux" "x86_64-linux"))
|
|
|
|
|
(arguments
|
2022-10-21 12:50:36 +00:00
|
|
|
|
(list
|
|
|
|
|
#:system "i686-linux"
|
|
|
|
|
#:strip-binaries? #f
|
|
|
|
|
#:parallel-build? #f
|
|
|
|
|
#:implicit-inputs? #f
|
|
|
|
|
#:modules '((guix build gnu-build-system)
|
|
|
|
|
(guix build utils)
|
|
|
|
|
(srfi srfi-1)
|
|
|
|
|
(ice-9 match))
|
|
|
|
|
#:phases
|
|
|
|
|
#~(modify-phases %standard-phases
|
|
|
|
|
(add-after 'unpack 'unpack-generated-c-code
|
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
|
(let ((tarball
|
|
|
|
|
(match inputs
|
|
|
|
|
(((_ . locations) ...)
|
|
|
|
|
(let ((suffix (string-append "ghc-"
|
|
|
|
|
#$(package-version this-package)
|
|
|
|
|
"-x86-hc.tar.bz2")))
|
|
|
|
|
(find (lambda (location)
|
|
|
|
|
(string-suffix? suffix location))
|
|
|
|
|
locations))))))
|
|
|
|
|
(invoke "tar" "-xvf" tarball
|
|
|
|
|
"--strip-components=1"))))
|
|
|
|
|
(replace 'bootstrap
|
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
|
(delete-file "configure")
|
|
|
|
|
(delete-file "config.sub")
|
|
|
|
|
(install-file (search-input-file inputs
|
|
|
|
|
"/bin/config.sub")
|
|
|
|
|
".")
|
2022-01-28 17:34:32 +00:00
|
|
|
|
|
2022-10-21 12:50:36 +00:00
|
|
|
|
;; Avoid dependency on "happy"
|
|
|
|
|
(substitute* "configure.in"
|
|
|
|
|
(("FPTOOLS_HAPPY") "echo sure\n"))
|
2022-01-28 17:34:32 +00:00
|
|
|
|
|
2022-10-21 12:50:36 +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)))
|
2022-01-28 17:34:32 +00:00
|
|
|
|
|
2022-10-21 12:50:36 +00:00
|
|
|
|
(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)))
|
|
|
|
|
(substitute* '("ghc/lib/std/cbits/system.c"
|
|
|
|
|
"hslibs/posix/cbits/execvpe.c")
|
|
|
|
|
(("/bin/sh") bash)
|
|
|
|
|
(("\"sh\"") (string-append "\"" bash "\"")))
|
2022-01-28 17:34:32 +00:00
|
|
|
|
|
2022-10-21 12:50:36 +00:00
|
|
|
|
(setenv "CONFIG_SHELL" bash)
|
|
|
|
|
(setenv "SHELL" bash))
|
2022-02-12 21:30:17 +00:00
|
|
|
|
|
2022-10-21 12:50:36 +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"))
|
2022-02-12 21:30:17 +00:00
|
|
|
|
|
2022-10-21 12:50:36 +00:00
|
|
|
|
(setenv "CPP" (which "cpp"))
|
|
|
|
|
(invoke "autoreconf" "--verbose" "--force")))
|
|
|
|
|
(add-before 'configure 'configure-gmp
|
|
|
|
|
(lambda _
|
|
|
|
|
(with-directory-excursion "ghc/rts/gmp"
|
|
|
|
|
(invoke "./configure"))))
|
|
|
|
|
(replace 'configure
|
|
|
|
|
(lambda* (#:key build #:allow-other-keys)
|
|
|
|
|
(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-02-12 21:30:17 +00:00
|
|
|
|
|
2022-10-21 12:50:36 +00:00
|
|
|
|
;; CLK_TCK has been removed from recent libc.
|
|
|
|
|
(substitute* "ghc/interpreter/nHandle.c"
|
|
|
|
|
(("CLK_TCK") "sysconf (_SC_CLK_TCK)"))
|
|
|
|
|
;; Avoid duplicate definitions of execvpe
|
|
|
|
|
(substitute* "ghc/lib/std/cbits/stgio.h"
|
|
|
|
|
(("^int.*execvpe.*") ""))
|
|
|
|
|
;; gid_t is an undefined type
|
|
|
|
|
(substitute* "hslibs/posix/PosixProcEnv.lhs"
|
|
|
|
|
(("gid_t") "int"))
|
2022-01-28 17:34:32 +00:00
|
|
|
|
|
2022-10-21 12:50:36 +00:00
|
|
|
|
;; This is needed so that ghc/includes/Stg.h can see config.h,
|
|
|
|
|
;; which defines values that are important for
|
|
|
|
|
;; ghc/includes/StgTypes.h and others.
|
|
|
|
|
(setenv "CPATH"
|
|
|
|
|
(string-append (getcwd) "/ghc/includes:"
|
|
|
|
|
(getcwd) "/ghc/rts/gmp:"
|
|
|
|
|
(getcwd) "/mk:"
|
|
|
|
|
(or (getenv "CPATH") "")))
|
2022-01-28 17:34:32 +00:00
|
|
|
|
|
2022-10-21 12:50:36 +00:00
|
|
|
|
(with-output-to-file "mk/build.mk"
|
|
|
|
|
(lambda ()
|
|
|
|
|
(display "
|
|
|
|
|
ProjectsToBuild = glafp-utils hslibs ghc
|
|
|
|
|
GhcLibWays=
|
2022-01-28 17:34:32 +00:00
|
|
|
|
GhcHcOpts=-DDEBUG
|
2022-10-21 12:50:36 +00:00
|
|
|
|
GhcLibHcOpts= -O
|
|
|
|
|
GhcRtsHcOpts=-optc-D_GNU_SOURCE=1 -optc-DDEBUG
|
|
|
|
|
GhcRtsCcOpts=-optc-D_GNU_SOURCE=1 -optc-DDEBUG
|
|
|
|
|
SplitObjs=YES
|
|
|
|
|
GhcWithHscBuiltViaC=YES
|
2022-01-28 17:34:32 +00:00
|
|
|
|
")))
|
2022-10-21 12:50:36 +00:00
|
|
|
|
(invoke "./configure"
|
|
|
|
|
"--enable-hc-boot" ; boot from C "source" files
|
2022-10-28 11:12:49 +00:00
|
|
|
|
;; Embed the absolute file name of GCC 2.95 in the GHC
|
|
|
|
|
;; driver script.
|
|
|
|
|
(string-append "--with-gcc=" (which "gcc"))
|
2022-10-21 12:50:36 +00:00
|
|
|
|
(string-append "--prefix=" #$output)
|
|
|
|
|
(string-append "--build=" build)
|
|
|
|
|
(string-append "--host=" build))))
|
|
|
|
|
;; Build hsc
|
|
|
|
|
(add-before 'build 'make-boot
|
|
|
|
|
(lambda _
|
|
|
|
|
;; Avoid calling happy
|
|
|
|
|
(invoke "touch" "ghc/compiler/rename/ParseIface.hs")
|
|
|
|
|
(invoke "touch" "ghc/compiler/parser/Parser.hs")
|
|
|
|
|
(invoke "make" "boot" "all")))
|
|
|
|
|
;; Build libraries
|
|
|
|
|
(replace 'build
|
|
|
|
|
(lambda _
|
|
|
|
|
;; Build these from their Haskell sources.
|
|
|
|
|
(invoke "sh" "-c" "echo GhcWithHscBuiltViaC=NO >>mk/build.mk")
|
|
|
|
|
(with-directory-excursion "ghc/lib"
|
|
|
|
|
(invoke "make" "clean" "boot" "all"))
|
|
|
|
|
(with-directory-excursion "hslibs"
|
|
|
|
|
(invoke "make" "clean" "boot" "all"))))
|
|
|
|
|
(add-before 'install 'do-not-strip
|
|
|
|
|
(lambda _
|
|
|
|
|
(substitute* '("install-sh"
|
|
|
|
|
"ghc/rts/gmp/install.sh")
|
|
|
|
|
(("^stripprog=.*") "stripprog=echo\n"))
|
|
|
|
|
(substitute* "mk/opts.mk"
|
|
|
|
|
(("^SRC_INSTALL_BIN_OPTS.*") "")))))))
|
2022-01-28 17:34:32 +00:00
|
|
|
|
(native-inputs
|
2022-10-21 12:50:36 +00:00
|
|
|
|
(modify-inputs (%final-inputs)
|
|
|
|
|
(delete "binutils" "gcc")
|
|
|
|
|
(prepend
|
|
|
|
|
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
|
|
|
|
;; 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-10-21 12:50:36 +00:00
|
|
|
|
;; Needed to support lvalue casts.
|
|
|
|
|
gcc-2.95
|
|
|
|
|
|
|
|
|
|
;; 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.6
|
|
|
|
|
|
|
|
|
|
;; This is the secret sauce. These files are macro-heavy C
|
|
|
|
|
;; "source" files that are used to build hsc from C. They are
|
|
|
|
|
;; presumably the output of previous versions of GHC. Note that
|
|
|
|
|
;; this is the "registerized" variant for x86. An "unreg" variant
|
|
|
|
|
;; of the *.hc files also exists for building GHC for other
|
|
|
|
|
;; architectures. The default "way" (see GhcLibWays above) to
|
|
|
|
|
;; build and link the GHC binaries, however, is not the
|
|
|
|
|
;; unregisterized variant. Using the unregisterized *.hc files
|
|
|
|
|
;; with a standard build will result in segfaults.
|
|
|
|
|
(origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (string-append "http://downloads.haskell.org/~ghc/"
|
|
|
|
|
version "/ghc-" version "-x86-hc.tar.bz2"))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
|
|
|
|
"0fi60bj0ak391x31cq5wp1ffwavl5w9jffyf62yv9rhxa915596b"))))))
|
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
|
2022-10-21 12:50:36 +00:00
|
|
|
|
interactive environment for the functional language Haskell.")
|
2022-01-28 17:34:32 +00:00
|
|
|
|
(license license:bsd-3)))
|
|
|
|
|
|
2022-10-26 22:13:43 +00:00
|
|
|
|
(define-public ghc-6.0
|
|
|
|
|
(package
|
|
|
|
|
(name "ghc")
|
|
|
|
|
(version "6.0")
|
|
|
|
|
(source
|
|
|
|
|
(origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (string-append "https://downloads.haskell.org/~ghc/"
|
|
|
|
|
version "/" name "-" version "-src.tar.bz2"))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
|
|
|
|
"06hpl8wyhhs1vz9dcdf0vbybwyzb5ifh27d59rx42q1vjs0m8zdv"))))
|
|
|
|
|
(build-system gnu-build-system)
|
|
|
|
|
(supported-systems '("i686-linux" "x86_64-linux"))
|
|
|
|
|
(arguments
|
|
|
|
|
(list
|
|
|
|
|
#:system "i686-linux"
|
|
|
|
|
#:tests? #false ;no check target
|
|
|
|
|
#:implicit-inputs? #false
|
|
|
|
|
#:parallel-build? #false ;not supported
|
|
|
|
|
#:modules '((guix build gnu-build-system)
|
|
|
|
|
(guix build utils)
|
|
|
|
|
(srfi srfi-26)
|
|
|
|
|
(srfi srfi-1))
|
|
|
|
|
#:phases
|
|
|
|
|
#~(modify-phases %standard-phases
|
|
|
|
|
(replace 'bootstrap
|
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
|
(delete-file "configure")
|
|
|
|
|
(delete-file "config.sub")
|
|
|
|
|
(install-file (search-input-file inputs
|
|
|
|
|
"/bin/config.sub")
|
|
|
|
|
".")
|
|
|
|
|
(let ((bash (which "bash")))
|
|
|
|
|
(substitute* '("configure.in"
|
|
|
|
|
"ghc/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* "glafp-utils/runstdtest/runstdtest.prl"
|
|
|
|
|
(("^#! /bin/sh") (string-append "#! " bash))
|
|
|
|
|
(("TimeCmd /bin/sh")
|
|
|
|
|
(string-append "TimeCmd " bash)))
|
|
|
|
|
(substitute* '("mk/config.mk.in"
|
|
|
|
|
"ghc/rts/gmp/Makefile.in")
|
|
|
|
|
(("^SHELL.*=.*/bin/sh") (string-append "SHELL = " bash)))
|
|
|
|
|
(substitute* "aclocal.m4"
|
|
|
|
|
(("SHELL=/bin/sh") (string-append "SHELL=" bash)))
|
|
|
|
|
(substitute* '"ghc/compiler/Makefile"
|
|
|
|
|
(("#!/bin/sh") (string-append "#!" bash)))
|
|
|
|
|
(substitute* '("libraries/base/cbits/system.c"
|
|
|
|
|
"libraries/unix/cbits/execvpe.c")
|
|
|
|
|
(("/bin/sh") bash)
|
|
|
|
|
(("\"sh\"") (string-append "\"" bash "\"")))
|
|
|
|
|
|
|
|
|
|
(setenv "CONFIG_SHELL" bash)
|
|
|
|
|
(setenv "SHELL" bash))
|
|
|
|
|
(invoke "autoreconf" "--verbose" "--force")))
|
|
|
|
|
(replace 'configure
|
|
|
|
|
(lambda* (#:key build #:allow-other-keys)
|
|
|
|
|
(setenv "CPATH"
|
|
|
|
|
(string-append (getcwd) "/ghc/includes:"
|
|
|
|
|
(getcwd) "/ghc/rts/gmp:"
|
|
|
|
|
(getcwd) "/mk:"
|
|
|
|
|
(or (getenv "CPATH") "")))
|
|
|
|
|
(call-with-output-file "config.cache"
|
|
|
|
|
(lambda (port)
|
|
|
|
|
;; GCC 2.95 fails to deal with anonymous unions in glibc's
|
|
|
|
|
;; 'struct_rusage.h':
|
|
|
|
|
;; Stats.c: In function `pageFaults':
|
|
|
|
|
;; Stats.c:270: structure has no member named `ru_majflt'
|
|
|
|
|
;; Stats.c:272: warning: control reaches end of non-void function
|
|
|
|
|
(display "ac_cv_func_getrusage=no\n" port)))
|
|
|
|
|
|
|
|
|
|
;; Socket.hsc:887: sizeof applied to an incomplete type
|
|
|
|
|
;; Socket.hsc:893: dereferencing pointer to incomplete type
|
|
|
|
|
(substitute* "libraries/network/Network/Socket.hsc"
|
|
|
|
|
(("ifdef SO_PEERCRED")
|
|
|
|
|
"ifdef SO_PEERCRED_NEVER"))
|
|
|
|
|
(invoke "./configure"
|
2022-10-28 11:51:40 +00:00
|
|
|
|
"--enable-src-tree-happy"
|
|
|
|
|
(string-append "--with-gcc=" (which "gcc"))
|
2022-10-26 22:13:43 +00:00
|
|
|
|
(string-append "--prefix=" #$output)
|
|
|
|
|
(string-append "--build=" build)
|
|
|
|
|
(string-append "--host=" build)))))))
|
|
|
|
|
(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))))
|
|
|
|
|
(native-inputs
|
|
|
|
|
(modify-inputs (%final-inputs)
|
|
|
|
|
(delete "gcc")
|
|
|
|
|
(prepend autoconf-2.13
|
|
|
|
|
config
|
|
|
|
|
flex
|
|
|
|
|
;; 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.6
|
|
|
|
|
ghc-4
|
|
|
|
|
gcc-2.95)))
|
|
|
|
|
(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.")
|
|
|
|
|
(license license:bsd-3)))
|
|
|
|
|
|
2022-10-28 11:53:27 +00:00
|
|
|
|
(define-public ghc-6.6
|
|
|
|
|
(package
|
|
|
|
|
(name "ghc")
|
|
|
|
|
(version "6.6")
|
|
|
|
|
(source
|
|
|
|
|
(origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (string-append "https://downloads.haskell.org/~ghc/"
|
|
|
|
|
version "/" name "-" version "-src.tar.bz2"))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
|
|
|
|
"0znc9myxyfg9zmvdlg09sf0dq11kc2bq4616llh82v6m6s8s5ckr"))))
|
|
|
|
|
(build-system gnu-build-system)
|
|
|
|
|
(supported-systems '("i686-linux" "x86_64-linux"))
|
|
|
|
|
(arguments
|
|
|
|
|
(list
|
|
|
|
|
#:system "i686-linux"
|
|
|
|
|
#:tests? #false ;no check target
|
|
|
|
|
#:modules '((guix build gnu-build-system)
|
|
|
|
|
(guix build utils)
|
|
|
|
|
(srfi srfi-26)
|
|
|
|
|
(srfi srfi-1))
|
|
|
|
|
#:phases
|
|
|
|
|
#~(modify-phases %standard-phases
|
|
|
|
|
(replace 'bootstrap
|
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
|
(let ((bash (which "bash")))
|
|
|
|
|
(substitute* '("configure"
|
|
|
|
|
"rts/gmp/configure"
|
|
|
|
|
"distrib/configure-bin.ac")
|
|
|
|
|
(("`/bin/sh") (string-append "`" bash))
|
|
|
|
|
(("SHELL=/bin/sh") (string-append "SHELL=" bash))
|
|
|
|
|
(("^#! /bin/sh") (string-append "#! " bash)))
|
|
|
|
|
(substitute* "utils/runstdtest/runstdtest.prl"
|
|
|
|
|
(("^#! /bin/sh") (string-append "#! " bash))
|
|
|
|
|
(("TimeCmd /bin/sh")
|
|
|
|
|
(string-append "TimeCmd " bash)))
|
|
|
|
|
(substitute* '("mk/config.mk.in"
|
|
|
|
|
"rts/gmp/Makefile.in")
|
|
|
|
|
(("^SHELL.*=.*/bin/sh") (string-append "SHELL = " bash)))
|
|
|
|
|
(substitute* "aclocal.m4"
|
|
|
|
|
(("SHELL=/bin/sh") (string-append "SHELL=" bash)))
|
2022-10-30 09:30:20 +00:00
|
|
|
|
(substitute* "compiler/Makefile"
|
2022-10-28 11:53:27 +00:00
|
|
|
|
(("#!/bin/sh") (string-append "#!" bash)))
|
2022-10-30 09:30:20 +00:00
|
|
|
|
(substitute* '("libraries/base/cbits/execvpe.c"
|
|
|
|
|
"libraries/Cabal/Distribution/attic"
|
|
|
|
|
"libraries/Cabal/Distribution/Simple/Register.hs"
|
|
|
|
|
"libraries/base/System/Process/Internals.hs")
|
2022-10-28 11:53:27 +00:00
|
|
|
|
(("/bin/sh") bash)
|
|
|
|
|
(("\"sh\"") (string-append "\"" bash "\"")))
|
|
|
|
|
|
|
|
|
|
(setenv "CONFIG_SHELL" bash)
|
|
|
|
|
(setenv "SHELL" bash))))
|
|
|
|
|
(replace 'configure
|
|
|
|
|
(lambda* (#:key build #:allow-other-keys)
|
|
|
|
|
(setenv "CPATH"
|
|
|
|
|
(string-append (getcwd) "/includes:"
|
|
|
|
|
(getcwd) "/rts/gmp:"
|
|
|
|
|
(getcwd) "/mk:"
|
|
|
|
|
(or (getenv "CPATH") "")))
|
|
|
|
|
(invoke "./configure"
|
|
|
|
|
(string-append "--with-hc=" (which "ghc"))
|
|
|
|
|
(string-append "--with-gcc=" (which "gcc"))
|
|
|
|
|
(string-append "--prefix=" #$output)
|
|
|
|
|
(string-append "--build=" build)
|
|
|
|
|
(string-append "--host=" build)))))))
|
|
|
|
|
(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))))
|
|
|
|
|
(native-inputs
|
|
|
|
|
(modify-inputs (%final-inputs)
|
|
|
|
|
(delete "gcc")
|
|
|
|
|
(prepend m4
|
|
|
|
|
;; 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.6
|
|
|
|
|
ghc-6.0
|
|
|
|
|
gcc-4.9)))
|
|
|
|
|
(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.")
|
|
|
|
|
(license license:bsd-3)))
|
|
|
|
|
|
2022-10-30 09:31:27 +00:00
|
|
|
|
(define-public ghc-6.10
|
|
|
|
|
(package
|
|
|
|
|
(name "ghc")
|
|
|
|
|
(version "6.10.4")
|
|
|
|
|
(source
|
|
|
|
|
(origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (string-append "https://downloads.haskell.org/~ghc/"
|
|
|
|
|
version "/" name "-" version "-src.tar.bz2"))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
|
|
|
|
"0kakv05kqi92qbfgmhr57rvag10yvp338kjwzqczhkrgax98wsnn"))
|
|
|
|
|
(modules '((guix build utils)))
|
|
|
|
|
(snippet
|
|
|
|
|
'(delete-file-recursively "libffi"))))
|
|
|
|
|
(build-system gnu-build-system)
|
|
|
|
|
(supported-systems '("i686-linux" "x86_64-linux"))
|
|
|
|
|
(arguments
|
|
|
|
|
(list
|
|
|
|
|
#:system "i686-linux"
|
|
|
|
|
#:tests? #false ;no check target
|
|
|
|
|
#:parallel-build? #false ;fails when building libraries/*
|
|
|
|
|
#: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"))
|
|
|
|
|
#:phases
|
|
|
|
|
#~(modify-phases %standard-phases
|
|
|
|
|
(replace 'bootstrap
|
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
|
(let ((bash (which "bash")))
|
|
|
|
|
;; Use our libffi package
|
|
|
|
|
(substitute* "rts/Makefile"
|
|
|
|
|
(("-I../libffi/build/include")
|
|
|
|
|
(string-append "-I"#$(this-package-input "libffi") "/include"))
|
|
|
|
|
(("-L../libffi/build/include")
|
|
|
|
|
(string-append "-L"#$(this-package-input "libffi") "/lib")))
|
|
|
|
|
(substitute* '("Makefile"
|
|
|
|
|
"distrib/Makefile")
|
|
|
|
|
(("SUBDIRS = gmp libffi")
|
|
|
|
|
"SUBDIRS = gmp")
|
|
|
|
|
(("\\$\\(MAKE\\) -C libffi.*") ""))
|
|
|
|
|
(substitute* "compiler/ghc.cabal.in"
|
|
|
|
|
(("../libffi/build/include")
|
|
|
|
|
(string-append #$(this-package-input "libffi") "/include")))
|
|
|
|
|
|
|
|
|
|
;; Do not use libbfd, because it complicates the build and
|
|
|
|
|
;; requires more patching. Disable all debug and profiling
|
|
|
|
|
;; builds.
|
|
|
|
|
(substitute* "mk/config.mk.in"
|
|
|
|
|
(("GhcRTSWays \\+= debug") "")
|
|
|
|
|
(("GhcRTSWays \\+= debug_dyn thr_dyn thr_debug_dyn")
|
|
|
|
|
"GhcRTSWays += thr_dyn")
|
|
|
|
|
(("thr thr_p thr_debug") "thr")
|
|
|
|
|
(("GhcLibWays=p") "GhcLibWays="))
|
|
|
|
|
|
|
|
|
|
;; Replace /bin/sh.
|
|
|
|
|
(substitute* '("configure"
|
|
|
|
|
"distrib/configure-bin.ac")
|
|
|
|
|
(("`/bin/sh") (string-append "`" bash))
|
|
|
|
|
(("SHELL=/bin/sh") (string-append "SHELL=" bash))
|
|
|
|
|
(("#! /bin/sh") (string-append "#! " bash)))
|
|
|
|
|
(substitute* '("mk/config.mk.in")
|
|
|
|
|
(("^SHELL.*=.*/bin/sh") (string-append "SHELL = " bash)))
|
|
|
|
|
(substitute* "aclocal.m4"
|
|
|
|
|
(("SHELL=/bin/sh") (string-append "SHELL=" bash)))
|
|
|
|
|
(substitute* '("libraries/unix/cbits/execvpe.c"
|
|
|
|
|
"libraries/Cabal/Distribution/Simple/Register.hs"
|
|
|
|
|
"libraries/process/System/Process/Internals.hs")
|
|
|
|
|
(("/bin/sh") bash)
|
|
|
|
|
(("\"sh\"") (string-append "\"" bash "\"")))))))))
|
|
|
|
|
(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))))
|
|
|
|
|
(inputs
|
|
|
|
|
(list gmp libffi))
|
|
|
|
|
(native-inputs
|
|
|
|
|
(list perl ghc-6.6))
|
|
|
|
|
(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.")
|
2022-01-28 17:34:32 +00:00
|
|
|
|
(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")
|
2022-08-21 13:00:05 +00:00
|
|
|
|
(version "7.10.3")
|
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
|
2022-08-21 13:00:05 +00:00
|
|
|
|
"1vsgmic8csczl62ciz51iv8nhrkm72lyhbz7p7id13y2w7fcx46g"))))
|
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)
|
2022-08-11 17:02:53 +00:00
|
|
|
|
|
|
|
|
|
;; Use a LibFFI variant without static trampolines to work around
|
|
|
|
|
;; <https://gitlab.haskell.org/ghc/ghc/-/issues/20051>.
|
|
|
|
|
("libffi" ,libffi-sans-static-trampolines)
|
|
|
|
|
|
2015-02-25 19:20:24 +00:00
|
|
|
|
("ghc-testsuite"
|
|
|
|
|
,(origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (string-append
|
|
|
|
|
"https://www.haskell.org/ghc/dist/"
|
|
|
|
|
version "/" name "-" version "-testsuite.tar.xz"))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2022-08-21 13:00:05 +00:00
|
|
|
|
"0fk4xjw1x5lk2ifvgqij06lrbf1vxq9qfix86h9r16c0bilm3hah"))))))
|
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
|
2022-08-21 09:17:06 +00:00
|
|
|
|
(list
|
|
|
|
|
#:test-target "test"
|
2015-02-25 19:20:24 +00:00
|
|
|
|
;; 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
|
|
|
|
|
|
2022-08-21 09:17:06 +00:00
|
|
|
|
#:modules '((guix build gnu-build-system)
|
|
|
|
|
(guix build utils)
|
|
|
|
|
(srfi srfi-26)
|
|
|
|
|
(srfi srfi-1))
|
2015-02-25 19:20:24 +00:00
|
|
|
|
#:configure-flags
|
2022-08-21 09:17:06 +00:00
|
|
|
|
#~(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"))
|
2015-02-25 19:20:24 +00:00
|
|
|
|
;; 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
|
2022-08-21 09:17:06 +00:00
|
|
|
|
#~(let* ((ghc-bootstrap-path
|
|
|
|
|
(string-append (getcwd) "/" #$name "-" #$version "/ghc-bin"))
|
|
|
|
|
(ghc-bootstrap-prefix
|
|
|
|
|
(string-append ghc-bootstrap-path "/usr" )))
|
|
|
|
|
(modify-phases %standard-phases
|
|
|
|
|
(add-after 'unpack 'unpack-bin
|
|
|
|
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
|
|
|
|
(mkdir-p ghc-bootstrap-prefix)
|
|
|
|
|
(with-directory-excursion ghc-bootstrap-path
|
2022-08-21 09:49:34 +00:00
|
|
|
|
(invoke "tar" "xvf" (assoc-ref inputs "ghc-binary")))))
|
2022-08-21 09:17:06 +00:00
|
|
|
|
(add-after 'unpack-bin 'unpack-testsuite-and-fix-bins
|
|
|
|
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
|
|
|
|
(with-directory-excursion ".."
|
2022-08-21 09:49:34 +00:00
|
|
|
|
(invoke "tar" "xvf" (assoc-ref inputs "ghc-testsuite")))
|
2022-08-21 09:17:06 +00:00
|
|
|
|
(substitute*
|
|
|
|
|
(list "testsuite/timeout/Makefile"
|
|
|
|
|
"testsuite/timeout/timeout.py"
|
|
|
|
|
"testsuite/timeout/timeout.hs"
|
|
|
|
|
"testsuite/tests/rename/prog006/Setup.lhs"
|
|
|
|
|
"testsuite/tests/programs/life_space_leak/life.test"
|
|
|
|
|
"libraries/process/System/Process/Internals.hs"
|
|
|
|
|
"libraries/unix/cbits/execvpe.c")
|
|
|
|
|
(("/bin/sh") (search-input-file inputs "/bin/sh"))
|
|
|
|
|
(("/bin/rm") "rm"))))
|
|
|
|
|
(add-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")
|
2022-08-21 09:17:06 +00:00
|
|
|
|
(invoke "make" "install"))))
|
|
|
|
|
(add-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
|
|
|
|
|
(dirname (search-input-file inputs "/lib/libncurses.so")))
|
|
|
|
|
(ld-so (search-input-file inputs #$(glibc-dynamic-linker)))
|
|
|
|
|
(libtinfo-dir
|
|
|
|
|
(string-append ghc-bootstrap-prefix
|
|
|
|
|
"/lib/ghc-7.8.4/terminfo-0.4.0.0")))
|
|
|
|
|
(with-directory-excursion
|
|
|
|
|
(string-append ghc-bootstrap-path "/ghc-7.8.4")
|
|
|
|
|
(setenv "CONFIG_SHELL" (which "bash"))
|
|
|
|
|
(setenv "LD_LIBRARY_PATH" gmp-lib)
|
|
|
|
|
;; The binaries have "/lib64/ld-linux-x86-64.so.2" hardcoded.
|
|
|
|
|
(for-each
|
|
|
|
|
(cut invoke "patchelf" "--set-interpreter" ld-so <>)
|
|
|
|
|
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."
|
|
|
|
|
;; Extract "6.0" from "6.0-20170930" if a
|
|
|
|
|
;; dash-separated version tag exists.
|
|
|
|
|
#$(let* ((v (package-version ncurses))
|
|
|
|
|
(d (or (string-index v #\-)
|
|
|
|
|
(string-length v))))
|
|
|
|
|
(version-major+minor (string-take v d))))
|
|
|
|
|
(string-append libtinfo-dir "/libtinfo.so.5"))
|
|
|
|
|
|
|
|
|
|
(setenv "PATH"
|
|
|
|
|
(string-append (getenv "PATH") ":"
|
|
|
|
|
ghc-bootstrap-prefix "/bin"))
|
|
|
|
|
(invoke
|
|
|
|
|
(string-append (getcwd) "/configure")
|
|
|
|
|
(string-append "--prefix=" ghc-bootstrap-prefix)
|
|
|
|
|
(string-append "--with-gmp-libraries=" gmp-lib)
|
|
|
|
|
(string-append "--with-gmp-includes=" gmp-include))))))))))
|
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
|
2022-08-27 15:10:55 +00:00
|
|
|
|
;; Use a LibFFI variant without static trampolines to work around
|
|
|
|
|
;; <https://gitlab.haskell.org/ghc/ghc/-/issues/20051>.
|
|
|
|
|
(list gmp ncurses libffi-sans-static-trampolines))
|
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.
|
2022-08-21 12:29:41 +00:00
|
|
|
|
("ghc-bootstrap" ,ghc-7)
|
|
|
|
|
("ghc-testsuite"
|
|
|
|
|
,(origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (string-append
|
|
|
|
|
"https://www.haskell.org/ghc/dist/"
|
|
|
|
|
version "/" name "-" version "-testsuite.tar.xz"))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32 "1wjc3x68l305bl1h1ijd3yhqp2vqj83lkp3kqbr94qmmkqlms8sj")))) ))
|
2016-10-16 15:01:46 +00:00
|
|
|
|
(arguments
|
2022-08-21 12:29:41 +00:00
|
|
|
|
(list
|
|
|
|
|
#:test-target "test"
|
2016-10-16 15:01:46 +00:00
|
|
|
|
;; 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
|
2022-08-21 12:29:41 +00:00
|
|
|
|
#~(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"))
|
2016-10-16 15:01:46 +00:00
|
|
|
|
#:phases
|
2022-08-21 12:29:41 +00:00
|
|
|
|
#~(modify-phases %standard-phases
|
|
|
|
|
(add-after 'unpack 'unpack-testsuite
|
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
|
(with-directory-excursion ".."
|
|
|
|
|
(invoke "tar" "xvf" (assoc-ref inputs "ghc-testsuite")))))
|
|
|
|
|
(add-before 'build 'fix-lib-paths
|
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
|
(substitute*
|
2016-10-16 15:01:46 +00:00
|
|
|
|
(list "libraries/process/System/Process/Posix.hs"
|
|
|
|
|
"libraries/process/tests/process001.hs"
|
|
|
|
|
"libraries/process/tests/process002.hs"
|
|
|
|
|
"libraries/unix/cbits/execvpe.c")
|
2022-08-21 12:29:41 +00:00
|
|
|
|
(("/bin/sh") (search-input-file inputs "/bin/sh"))
|
|
|
|
|
(("/bin/ls") (search-input-file inputs "/bin/ls")))))
|
|
|
|
|
(add-before 'build 'fix-environment
|
|
|
|
|
(lambda _
|
|
|
|
|
(unsetenv "GHC_PACKAGE_PATH")
|
|
|
|
|
(setenv "CONFIG_SHELL" (which "bash"))))
|
|
|
|
|
(add-before 'check 'fix-testsuite
|
|
|
|
|
(lambda _
|
|
|
|
|
(substitute*
|
2016-10-16 15:01:46 +00:00
|
|
|
|
(list "testsuite/timeout/Makefile"
|
|
|
|
|
"testsuite/timeout/timeout.py"
|
|
|
|
|
"testsuite/timeout/timeout.hs"
|
|
|
|
|
"testsuite/tests/programs/life_space_leak/life.test")
|
2022-08-21 12:29:41 +00:00
|
|
|
|
(("/bin/sh") (which "sh"))
|
|
|
|
|
(("/bin/rm") "rm")))))))
|
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
|
|
|
|
(native-inputs
|
|
|
|
|
`(("perl" ,perl)
|
|
|
|
|
("python" ,python) ; for tests
|
|
|
|
|
("ghostscript" ,ghostscript) ; for tests
|
2022-08-22 06:49:06 +00:00
|
|
|
|
;; GHC 8.4.4 is built with GHC >= 8.0.
|
2018-08-17 14:55:43 +00:00
|
|
|
|
("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
|
2022-09-17 16:39:45 +00:00
|
|
|
|
"0s8lf9sxj7n89pjagi58b3fahnp34qvmwhnn0j1fbg6955vbrfj6"))
|
|
|
|
|
(modules '((guix build utils)))
|
|
|
|
|
(snippet
|
|
|
|
|
;; collections.Iterable was moved to collections.abc in Python 3.10.
|
|
|
|
|
'(substitute* "testsuite/driver/testlib.py"
|
|
|
|
|
(("collections\\.Iterable")
|
|
|
|
|
"collections.abc.Iterable")))))))
|
2018-08-17 14:55:43 +00:00
|
|
|
|
(arguments
|
2022-08-22 06:49:06 +00:00
|
|
|
|
(substitute-keyword-arguments (package-arguments ghc-8.0)
|
|
|
|
|
((#:phases phases)
|
|
|
|
|
#~(modify-phases #$phases
|
|
|
|
|
;; 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)"))))
|
|
|
|
|
(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"))))))
|
|
|
|
|
;; 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)
|
|
|
|
|
(let ((binutils (assoc-ref inputs "binutils"))
|
|
|
|
|
(gcc (assoc-ref inputs "gcc"))
|
|
|
|
|
(ld-wrapper (assoc-ref inputs "ld-wrapper")))
|
|
|
|
|
(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")))))))))
|
2018-08-17 14:55:43 +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))))))
|
|
|
|
|
|
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"))
|
2022-09-09 18:49:55 +00:00
|
|
|
|
(patches (search-patches "ghc-testsuite-dlopen-pie.patch"
|
|
|
|
|
"ghc-testsuite-grep-compat.patch"))
|
2019-07-16 06:45:40 +00:00
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2022-08-12 11:46:41 +00:00
|
|
|
|
"0pw9r91g2np3i806g2f4f8z4jfdd7mx226cmdizk4swa7av1qf91"))
|
|
|
|
|
(modules '((guix build utils)))
|
|
|
|
|
(snippet
|
|
|
|
|
;; collections.Iterable was moved to collections.abc in Python 3.10.
|
|
|
|
|
'(substitute* "testsuite/driver/testlib.py"
|
|
|
|
|
(("collections\\.Iterable")
|
|
|
|
|
"collections.abc.Iterable")))))
|
2019-07-16 06:45:40 +00:00
|
|
|
|
,@(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 ''())
|
2022-08-22 07:32:34 +00:00
|
|
|
|
#~(cons "EXTRA_RUNTEST_OPTS=--skip-perf-tests"
|
|
|
|
|
#$make-flags))
|
2019-07-16 06:45:40 +00:00
|
|
|
|
((#:phases phases '%standard-phases)
|
2022-08-22 07:32:34 +00:00
|
|
|
|
#~(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)))
|
2022-08-22 07:32:34 +00:00
|
|
|
|
(find-files doc "\\.haddock$")))))
|
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"
|
2022-08-22 07:32:34 +00:00
|
|
|
|
(("^test\\('posix010'") "# guix skipped: test('posix010'"))))))))
|
2019-09-10 01:12:41 +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))))))
|
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"))
|
2022-09-09 18:49:55 +00:00
|
|
|
|
(patches (search-patches "ghc-testsuite-dlopen-pie.patch"
|
|
|
|
|
"ghc-testsuite-grep-compat.patch"))
|
2020-05-03 04:31:03 +00:00
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2022-08-12 11:46:41 +00:00
|
|
|
|
"0c55pj2820q26rikhpf636sn4mjgqsxjrl94vsywrh79dxp3k14z"))
|
|
|
|
|
(modules '((guix build utils)))
|
|
|
|
|
(snippet
|
|
|
|
|
;; collections.Iterable was moved to collections.abc in Python 3.10.
|
|
|
|
|
'(substitute* "testsuite/driver/testlib.py"
|
|
|
|
|
(("collections\\.Iterable")
|
|
|
|
|
"collections.abc.Iterable")))))
|
2023-02-01 09:36:00 +00:00
|
|
|
|
("git" ,git-minimal/pinned) ; 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)
|
2022-08-22 07:34:24 +00:00
|
|
|
|
#~(modify-phases #$phases
|
2022-08-22 06:49:06 +00:00
|
|
|
|
(add-before 'build 'fix-cc-reference
|
2021-07-13 12:09:37 +00:00
|
|
|
|
(lambda _
|
|
|
|
|
(substitute* "utils/hsc2hs/Common.hs"
|
2022-08-22 07:34:24 +00:00
|
|
|
|
(("\"cc\"") "\"gcc\""))))
|
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"
|
2022-08-22 07:34:24 +00:00
|
|
|
|
(("^test\\('T15904'") "# guix skipped: test('T15904'"))))))))
|
2020-05-03 04:31:03 +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-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
|
2022-08-22 07:39:44 +00:00
|
|
|
|
`(;; GHC 8.10.7 must be built with GHC >= 8.6.
|
|
|
|
|
("ghc-bootstrap" ,ghc-8.6)
|
2021-09-14 07:55:15 +00:00
|
|
|
|
("ghc-testsuite"
|
|
|
|
|
,(origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (string-append
|
|
|
|
|
"https://www.haskell.org/ghc/dist/"
|
|
|
|
|
version "/ghc-" version "-testsuite.tar.xz"))
|
2022-09-09 18:49:55 +00:00
|
|
|
|
(patches (search-patches "ghc-testsuite-dlopen-pie.patch"
|
|
|
|
|
"ghc-testsuite-grep-compat.patch"))
|
2021-09-14 07:55:15 +00:00
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2022-08-12 11:46:41 +00:00
|
|
|
|
"1zl25gg6bpx5601k8h3cqnns1xfc0nqgwnh8jvn2s65ra3f2g1nz"))
|
|
|
|
|
(modules '((guix build utils)))
|
|
|
|
|
(snippet
|
|
|
|
|
;; collections.Iterable was moved to collections.abc in Python 3.10.
|
|
|
|
|
'(substitute* "testsuite/driver/testlib.py"
|
|
|
|
|
(("collections\\.Iterable")
|
|
|
|
|
"collections.abc.Iterable")))))
|
2023-02-01 09:36:00 +00:00
|
|
|
|
("git" ,git-minimal/pinned) ; 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)
|
2022-08-22 07:38:25 +00:00
|
|
|
|
#~(modify-phases #$phases
|
2021-09-14 07:55:15 +00:00
|
|
|
|
(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)], ")))))
|
2022-08-22 07:37:00 +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)
|
|
|
|
|
(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\\),")
|
2023-04-25 14:40:44 +00:00
|
|
|
|
"unless(config.have_ext_interp, skip), when(arch('i386'), skip),"))))
|
|
|
|
|
;; i686 fails on CI, but (sometimes and with generous timeouts) completes
|
|
|
|
|
;; locally. The issue seems to be that the testsuite tries to run some very
|
|
|
|
|
;; broad regular expressions on output files of several megabytes in size,
|
|
|
|
|
;; which takes a long time. Since the expressions never match anything on
|
|
|
|
|
;; our builds anyways, remove them.
|
|
|
|
|
;; TODO: Merge with 'skip-failing-tests-i686 or move into snippets on
|
|
|
|
|
;; next rebuild. Note that they are required for GHC 8.10 and 9.2.
|
|
|
|
|
#$@(if (string-prefix? "i686" (or (%current-target-system)
|
|
|
|
|
(%current-system)))
|
2023-07-15 09:39:30 +00:00
|
|
|
|
#~((add-after 'skip-failing-tests-i686 'skip-more-failing-tests-i686
|
2023-04-25 14:40:44 +00:00
|
|
|
|
(lambda _
|
2023-07-15 09:39:30 +00:00
|
|
|
|
(substitute* '("testsuite/tests/profiling/should_run/all.T")
|
|
|
|
|
(("test\\('T11627a', \\[ ")
|
|
|
|
|
"test('T11627a', [ when(arch('i386'), skip), "))
|
2023-04-25 14:40:44 +00:00
|
|
|
|
(substitute* '("testsuite/driver/testlib.py")
|
|
|
|
|
((".*changes being made to the file will invalidate the code signature.*")
|
|
|
|
|
"")
|
|
|
|
|
((".*warning: argument unused during compilation:.*")
|
|
|
|
|
"")))))
|
|
|
|
|
#~())))))
|
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
|
|
|
|
(define-public ghc-8 ghc-8.10)
|
2019-08-05 15:03:35 +00:00
|
|
|
|
|
2022-09-22 06:21:58 +00:00
|
|
|
|
(define-public ghc-9.0
|
|
|
|
|
(package
|
|
|
|
|
(inherit ghc-8.10)
|
2022-12-31 11:25:49 +00:00
|
|
|
|
(name "ghc")
|
2022-09-22 06:21:58 +00:00
|
|
|
|
(version "9.0.2")
|
|
|
|
|
(source (origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (string-append "https://www.haskell.org/ghc/dist/" version
|
|
|
|
|
"/ghc-" version "-src.tar.xz"))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
|
|
|
|
"15wii8can2r3dcl6jjmd50h2jvn7rlmn05zb74d2scj6cfwl43hl"))))
|
|
|
|
|
(native-inputs
|
|
|
|
|
`(;; GHC 9.0.2 must be built with GHC >= 8.8
|
|
|
|
|
("ghc-bootstrap" ,ghc-8.10)
|
|
|
|
|
("ghc-testsuite"
|
|
|
|
|
,(origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (string-append
|
|
|
|
|
"https://www.haskell.org/ghc/dist/"
|
|
|
|
|
version "/ghc-" version "-testsuite.tar.xz"))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2023-04-21 18:25:33 +00:00
|
|
|
|
"1m5fzhr4gjn9ni8gxx7ag3fkbw1rspjzgv39mnfb0nkm5mw70v3s"))
|
|
|
|
|
(patches (search-patches "ghc-9.2-grep-warnings.patch"))
|
|
|
|
|
(modules '((guix build utils)))
|
|
|
|
|
(snippet
|
|
|
|
|
;; collections.Iterable was moved to collections.abc in Python 3.10.
|
|
|
|
|
'(substitute* "testsuite/driver/testlib.py"
|
|
|
|
|
(("collections\\.Iterable")
|
|
|
|
|
"collections.abc.Iterable")))))
|
2022-09-22 06:21:58 +00:00
|
|
|
|
,@(filter (match-lambda
|
|
|
|
|
(("ghc-bootstrap" . _) #f)
|
|
|
|
|
(("ghc-testsuite" . _) #f)
|
|
|
|
|
(_ #t))
|
|
|
|
|
(package-native-inputs ghc-8.10))))
|
|
|
|
|
(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))))))
|
|
|
|
|
|
2022-12-31 10:20:41 +00:00
|
|
|
|
(define-public ghc-9.2
|
|
|
|
|
;; Use 8.10 to shorten the build chain.
|
|
|
|
|
(let ((base ghc-8.10))
|
|
|
|
|
(package
|
|
|
|
|
(inherit base)
|
2022-12-31 11:25:49 +00:00
|
|
|
|
(name "ghc")
|
2022-12-31 10:20:41 +00:00
|
|
|
|
(version "9.2.5")
|
|
|
|
|
(source (origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (string-append "https://www.haskell.org/ghc/dist/" version
|
|
|
|
|
"/ghc-" version "-src.tar.xz"))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2023-01-29 17:45:45 +00:00
|
|
|
|
"07028i0hm74svvq9b3jpkczaj6lsdgn3hgr4wa7diqiq3dypj1h6"))
|
|
|
|
|
(patches (search-patches "ghc-9.2-glibc-2.33-link-order.patch"))))
|
2022-12-31 10:20:41 +00:00
|
|
|
|
(arguments
|
|
|
|
|
(substitute-keyword-arguments (package-arguments base)
|
|
|
|
|
((#:phases phases '%standard-phases)
|
|
|
|
|
#~(modify-phases #$phases
|
2023-04-15 01:13:05 +00:00
|
|
|
|
;; File Common.hs has been moved to src/ in this release.
|
|
|
|
|
(replace 'fix-cc-reference
|
|
|
|
|
(lambda _
|
|
|
|
|
(substitute* "utils/hsc2hs/src/Common.hs"
|
|
|
|
|
(("\"cc\"") "\"gcc\""))))
|
|
|
|
|
(add-after 'skip-more-tests 'skip-T21694-i686
|
|
|
|
|
(lambda _
|
|
|
|
|
(substitute* '("testsuite/tests/simplCore/should_compile/all.T")
|
|
|
|
|
(("^test\\('T21694', \\[ " all)
|
|
|
|
|
(string-append all "when(arch('i386'), skip), ")))))))
|
2023-01-24 11:27:21 +00:00
|
|
|
|
;; Increase verbosity, so running the test suite does not time out on CI.
|
|
|
|
|
((#:make-flags make-flags ''())
|
|
|
|
|
#~(cons "VERBOSE=4" #$make-flags))))
|
2023-02-28 08:28:58 +00:00
|
|
|
|
(properties '((max-silent-time . 36000))) ; 10 hours, for i686.
|
2022-12-31 10:20:41 +00:00
|
|
|
|
(native-inputs
|
|
|
|
|
`(;; GHC 9.2 must be built with GHC >= 8.6.
|
|
|
|
|
("ghc-bootstrap" ,base)
|
|
|
|
|
("ghc-testsuite"
|
|
|
|
|
,(origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (string-append
|
2023-04-15 01:13:05 +00:00
|
|
|
|
"https://www.haskell.org/ghc/dist/"
|
|
|
|
|
version "/ghc-" version "-testsuite.tar.xz"))
|
2022-12-31 10:20:41 +00:00
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2023-03-12 16:24:27 +00:00
|
|
|
|
"19ha0hidrijawy53vm2r0sgml5zkl8126mqy7p0pyacmw3k7913l"))
|
|
|
|
|
(patches (search-patches "ghc-9.2-grep-warnings.patch"))))
|
2022-12-31 10:20:41 +00:00
|
|
|
|
,@(filter (match-lambda
|
|
|
|
|
(("ghc-bootstrap" . _) #f)
|
|
|
|
|
(("ghc-testsuite" . _) #f)
|
|
|
|
|
(_ #t))
|
|
|
|
|
(package-native-inputs base))))
|
|
|
|
|
(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)))))))
|
2018-02-12 17:38:52 +00:00
|
|
|
|
|
2022-12-31 11:25:49 +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 ghc-9.2)
|
|
|
|
|
|
2022-12-31 10:23:20 +00:00
|
|
|
|
;; 9.4 is the last version to support the make-based build system,
|
|
|
|
|
;; but it boot with 9.2, only 9.0 is supported.
|
|
|
|
|
(define ghc-bootstrap-for-9.4 ghc-9.0)
|
|
|
|
|
|
|
|
|
|
;; We need two extra dependencies built with ghc-bootstrap-for-9.4,
|
|
|
|
|
;; which are duplicated here from haskell-xyz to make sure the
|
|
|
|
|
;; bootstraping process always works.
|
|
|
|
|
(define ghc-alex-bootstrap-for-9.4
|
|
|
|
|
(hidden-package
|
|
|
|
|
(package
|
|
|
|
|
(name "ghc-alex")
|
|
|
|
|
(version "3.2.6")
|
|
|
|
|
(source
|
|
|
|
|
(origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (hackage-uri "alex" version))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
|
|
|
|
"042lrkn0dbpjn5ivj6j26jzb1fwrj8c1aj18ykxja89isg0hiali"))))
|
|
|
|
|
(build-system haskell-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
(list #:tests? #f
|
|
|
|
|
#:haskell ghc-bootstrap-for-9.4))
|
|
|
|
|
(native-inputs
|
|
|
|
|
(list which))
|
|
|
|
|
(home-page "https://www.haskell.org/alex/")
|
|
|
|
|
(synopsis
|
|
|
|
|
"Tool for generating lexical analysers in Haskell")
|
|
|
|
|
(description
|
|
|
|
|
"Alex is a tool for generating lexical analysers in Haskell. It takes a
|
|
|
|
|
description of tokens based on regular expressions and generates a Haskell
|
|
|
|
|
module containing code for scanning text efficiently. It is similar to the
|
|
|
|
|
tool lex or flex for C/C++.")
|
|
|
|
|
(license license:bsd-3))))
|
|
|
|
|
|
|
|
|
|
(define ghc-happy-bootstrap-for-9.4
|
|
|
|
|
(hidden-package
|
|
|
|
|
(package
|
|
|
|
|
(name "ghc-happy")
|
|
|
|
|
(version "1.20.0")
|
|
|
|
|
(source
|
|
|
|
|
(origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (hackage-uri "happy" version))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
|
|
|
|
"1346r2x5ravs5fqma65bzjragqbb2g6v41wz9maknwm2jf7kl79v"))))
|
|
|
|
|
(build-system haskell-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
(list #:haskell ghc-bootstrap-for-9.4
|
|
|
|
|
#:tests? #f))
|
|
|
|
|
(home-page "https://hackage.haskell.org/package/happy")
|
|
|
|
|
(synopsis "Parser generator for Haskell")
|
|
|
|
|
(description "Happy is a parser generator for Haskell. Given a grammar
|
|
|
|
|
specification in BNF, Happy generates Haskell code to parse the grammar.
|
|
|
|
|
Happy works in a similar way to the yacc tool for C.")
|
|
|
|
|
(license license:bsd-3))))
|
|
|
|
|
|
|
|
|
|
(define-public ghc-9.4
|
|
|
|
|
;; Inherit from 9.2, which added a few fixes, but boot from 9.0 (see above).
|
|
|
|
|
(let ((base ghc-9.2))
|
|
|
|
|
(package
|
|
|
|
|
(inherit base)
|
|
|
|
|
(name "ghc-next")
|
|
|
|
|
(version "9.4.4")
|
|
|
|
|
(source (origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (string-append "https://www.haskell.org/ghc/dist/" version
|
|
|
|
|
"/ghc-" version "-src.tar.xz"))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
|
|
|
|
"1qk7rlqf02s3b6m6sqqngmjq1mxnrz88h159lz6k25gddmdg5kp8"))))
|
|
|
|
|
(arguments
|
|
|
|
|
(substitute-keyword-arguments (package-arguments base)
|
|
|
|
|
((#:phases phases '%standard-phases)
|
|
|
|
|
#~(modify-phases #$phases
|
|
|
|
|
;; Files don’t exist any more.
|
|
|
|
|
(delete 'skip-tests)))))
|
|
|
|
|
(native-inputs
|
|
|
|
|
`(;; GHC 9.4 must be built with GHC >= 9.0.
|
|
|
|
|
("ghc-bootstrap" ,ghc-bootstrap-for-9.4)
|
|
|
|
|
("ghc-testsuite"
|
|
|
|
|
,(origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (string-append
|
|
|
|
|
"https://www.haskell.org/ghc/dist/"
|
|
|
|
|
version "/ghc-" version "-testsuite.tar.xz"))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
|
|
|
|
"04p2lawxxg3nyv6frzhyjyh3arhqqyh5ka3alxa2pxhcd2hdcja3"))))
|
|
|
|
|
("ghc-alex" ,ghc-alex-bootstrap-for-9.4)
|
|
|
|
|
("ghc-happy" ,ghc-happy-bootstrap-for-9.4)
|
|
|
|
|
,@(filter (match-lambda
|
|
|
|
|
(("ghc-bootstrap" . _) #f)
|
|
|
|
|
(("ghc-testsuite" . _) #f)
|
|
|
|
|
(_ #t))
|
|
|
|
|
(package-native-inputs base))))
|
|
|
|
|
(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
|
|
|
|
;;; haskell.scm ends here
|