From 54c9b5bfd721fa6eff2138612a919539cfd18855 Mon Sep 17 00:00:00 2001 From: Timothy Sample Date: Sun, 3 May 2020 00:31:03 -0400 Subject: gnu: Add ghc-8.8. * gnu/packages/haskell.scm (ghc-8.8): New variable. --- gnu/packages/haskell.scm | 50 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) (limited to 'gnu/packages/haskell.scm') diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm index 94671ee54d..78cb895ac9 100644 --- a/gnu/packages/haskell.scm +++ b/gnu/packages/haskell.scm @@ -14,7 +14,7 @@ ;;; Copyright © 2017 rsiddharth ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice ;;; Copyright © 2018 Tonton -;;; Copyright © 2018, 2019 Timothy Sample +;;; Copyright © 2018, 2019, 2020 Timothy Sample ;;; Copyright © 2018 Arun Isaac ;;; Copyright © 2018, 2019 Gabriel Hondet ;;; Copyright © 2019 Robert Vollmert @@ -47,6 +47,7 @@ #:use-module (gnu packages ncurses) #:use-module (gnu packages perl) #:use-module (gnu packages python) + #:use-module (gnu packages version-control) #:use-module (guix build-system gnu) #:use-module (guix download) #:use-module (guix git-download) @@ -583,6 +584,53 @@ interactive environment for the functional language Haskell.") (file-pattern ".*\\.conf\\.d$") (file-type 'directory)))))) +(define-public ghc-8.8 + (package (inherit ghc-8.6) + (name "ghc") + (version "8.8.3") + (source + (origin + (method url-fetch) + (uri (string-append "https://www.haskell.org/ghc/dist/" + version "/ghc-" version "-src.tar.xz")) + (sha256 + (base32 "128g932i3wix6ic03v04nh5755vyjiidzri9iybwad72yfmc1p70")))) + (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 + "1l32mp94ll72skfsq1g2fqax4bkiw8b85gr3wd0bbqsqyi9a9jpr")))) + ("git" ,git) ; invoked during tests + ,@(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 + (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)))))) + (define-public ghc-8 ghc-8.6) (define-public ghc ghc-8) -- cgit v1.2.3 From f737d3ddd8018f89b0fa9f80aee4490cd726903a Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 26 Jun 2020 15:17:31 +0200 Subject: gnu: ghc-8.6: Remove unnecessary references. * gnu/packages/haskell.scm (ghc-8.6)[arguments]: Add phase "remove-unnecessary-references" to remove references to build tools and inter-output references. --- gnu/packages/haskell.scm | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'gnu/packages/haskell.scm') diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm index 78cb895ac9..09732fc594 100644 --- a/gnu/packages/haskell.scm +++ b/gnu/packages/haskell.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2016, 2018, 2019 Ludovic Courtès ;;; Copyright © 2016, 2017 Nikita ;;; Copyright © 2016 Efraim Flashner -;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus +;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus ;;; Copyright © 2016, 2017 David Craven ;;; Copyright © 2017 Danny Milosavljevic ;;; Copyright © 2017 Peter Mikkelsen @@ -568,6 +568,32 @@ interactive environment for the functional language Haskell.") ,make-flags)) ((#:phases phases '%standard-phases) `(modify-phases ,phases + (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)) (add-after 'unpack-testsuite 'skip-tests (lambda _ ;; These two tests refer to the root user, which doesn't exist -- cgit v1.2.3