diff mbox series

[bug#67921,v2,21/23] gnu: Add hadrian-for-ghc-9.6

Message ID e874d2c0f592e4f92be8c5baaabb3f3f7f8c4db2.1707827100.git.saku@laesvuori.fi
State New
Headers show
Series Update GHC to 9.6.4 | expand

Commit Message

Saku Laesvuori Feb. 15, 2024, 8:50 a.m. UTC
* gnu/packages/haskell.scm (hadrian-for-ghc-9.6): New variable.

Change-Id: I4205c888afa7b03b4b1622a3af7d1d538fa5c9b1
---
 gnu/packages/haskell.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 4127d7d4a7..9e1e659cf1 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -2016,4 +2016,44 @@  (define ghc-primitive-bootstrap-for-9.6
      "This package provides various primitive memory-related operations.")
     (license license:bsd-3)))
 
+(define hadrian-for-ghc-9.6
+  (package
+    (name "hadrian")
+    (version "9.6.4")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://www.haskell.org/ghc/dist/" version
+                                  "/ghc-" version "-src.tar.xz"))
+              (sha256
+               (base32
+                "1h6lpx8kd4xycjwb8iv2rgnz23kwq5b0qp4bhvczsx3in2w2bgqh"))))
+    (build-system haskell-build-system)
+    (inputs
+     (list ghc-base16-bytestring-bootstrap-for-9.6
+           ghc-cryptohash-sha256-bootstrap-for-9.6
+           ghc-extra-bootstrap-for-9.6
+           ghc-shake-bootstrap-for-9.6
+           ghc-unordered-containers-bootstrap-for-9.6
+           bash-minimal))
+    (arguments
+     (list #:configure-flags ''("--flags=-selftest")
+           #:tests? #f
+           #:haskell ghc-bootstrap-for-9.6
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'cd-to-hadrian
+                 (lambda _
+                   (chdir "hadrian")))
+               (add-after 'cd-to-hadrian 'fix-shell-wrappers
+                 (lambda _
+                   (substitute*
+                     "src/Rules/Test.hs"
+                     (("\"#!/bin/sh\"")
+                      (format #f "\"#!~a/bin/sh\"" #$(this-package-input "bash-minimal")))))))))
+    (home-page "https://gitlab.haskell.org/ghc/ghc/-/tree/master/hadrian")
+    (synopsis "Build system for the Glasgow Haskell Compiler (@code{ghc})")
+    (description "Hadrian is the build system for the Glasgow Haskell Compiler.
+It is based on the Shake library and replaces @{make} in building GHC")
+    (license license:expat)))
+
 ;;; haskell.scm ends here