summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorNicolas Graves <ngraves@ngraves.fr>2026-02-24 19:32:55 +0100
committerAndreas Enge <andreas@enge.fr>2026-06-13 08:51:33 +0200
commit4b5d81fa9d4673f4d40799243eebe051a7f95e54 (patch)
treeac7d7fde9d7287b92e7c0f6033fb55c32da165dc /gnu
parenta8ee7bfbb9dcaa16e82d622f716b0cda4496331a (diff)
gnu: ghc-8.6: Drop input labels.
* gnu/packages/haskell.scm (ghc-8.6) [native-inputs]: Drop input labels. [arguments]<#:phases>: Minor indent changes. Change-Id: I5b76508be86179f31b3bcc5c72c5d57908a1f0c5 Signed-off-by: Andreas Enge <andreas@enge.fr>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/haskell.scm174
1 files changed, 93 insertions, 81 deletions
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 5b68896710e..73e86b4680b 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -1265,88 +1265,100 @@ interactive environment for the functional language Haskell.")
1265 (file-type 'directory)))))) 1265 (file-type 'directory))))))
1266 1266
1267(define-public ghc-8.6 1267(define-public ghc-8.6
1268 (package (inherit ghc-8.4) 1268 (let ((ghc-bootstrap ghc-8.4))
1269 (name "ghc") 1269 (package
1270 (version "8.6.5") 1270 (inherit ghc-bootstrap)
1271 (source 1271 (name "ghc")
1272 (origin 1272 (version "8.6.5")
1273 (method url-fetch) 1273 (source
1274 (uri (string-append "https://www.haskell.org/ghc/dist/" 1274 (origin
1275 version "/" name "-" version "-src.tar.xz")) 1275 (method url-fetch)
1276 (sha256 1276 (uri (string-append "https://www.haskell.org/ghc/dist/"
1277 (base32 "0qg3zsmbk4rkwkc3jpas3zs74qaxmw4sp4v1mhsbj0a0dzls2jjd")))) 1277 version "/" name "-" version "-src.tar.xz"))
1278 (native-inputs 1278 (sha256
1279 `(;; GHC 8.6.5 must be built with GHC >= 8.2. 1279 (base32 "0qg3zsmbk4rkwkc3jpas3zs74qaxmw4sp4v1mhsbj0a0dzls2jjd"))))
1280 ("ghc-bootstrap" ,ghc-8.4) 1280 (native-inputs
1281 ("ghc-testsuite" 1281 ;; It's not possible to set this using modify-inputs because it's
1282 ,(origin 1282 ;; necessary to also modify the label for further inheritance issues.
1283 (method url-fetch) 1283 (cons* (list
1284 (uri (string-append 1284 (string-append name "-" version "-testsuite.tar.xz")
1285 "https://www.haskell.org/ghc/dist/" 1285 (origin
1286 version "/" name "-" version "-testsuite.tar.xz")) 1286 (method url-fetch)
1287 (patches (search-patches "ghc-testsuite-dlopen-pie.patch" 1287 (uri (string-append
1288 "ghc-testsuite-grep-compat.patch" 1288 "https://www.haskell.org/ghc/dist/"
1289 "ghc-testsuite-recomp015-execstack.patch")) 1289 version "/" name "-" version "-testsuite.tar.xz"))
1290 (sha256 1290 (patches (search-patches "ghc-testsuite-dlopen-pie.patch"
1291 (base32 1291 "ghc-testsuite-grep-compat.patch"))
1292 "0pw9r91g2np3i806g2f4f8z4jfdd7mx226cmdizk4swa7av1qf91")) 1292 (sha256
1293 (modules '((guix build utils))) 1293 (base32
1294 (snippet 1294 "0pw9r91g2np3i806g2f4f8z4jfdd7mx226cmdizk4swa7av1qf91"))
1295 ;; collections.Iterable was moved to collections.abc in Python 3.10. 1295 (modules '((guix build utils)))
1296 '(substitute* "testsuite/driver/testlib.py" 1296 (snippet
1297 (("collections\\.Iterable") 1297 ;; collections.Iterable was moved to collections.abc in Python 3.10.
1298 "collections.abc.Iterable"))))) 1298 '(substitute* "testsuite/driver/testlib.py"
1299 ,@(filter (match-lambda 1299 (("collections\\.Iterable")
1300 (("ghc-bootstrap" . _) #f) 1300 "collections.abc.Iterable")))))
1301 (("ghc-testsuite" . _) #f) 1301 (modify-inputs (package-native-inputs ghc-bootstrap)
1302 (_ #t)) 1302 ;; GHC 8.6.5 must be built with GHC >= 8.2.
1303 (package-native-inputs ghc-8.4)))) 1303 (replace "ghc" ghc-bootstrap)
1304 (arguments 1304 (delete (string-append name "-" (package-version ghc-bootstrap)
1305 (substitute-keyword-arguments (package-arguments ghc-8.4) 1305 "-testsuite.tar.xz")))))
1306 ((#:make-flags make-flags ''()) 1306 (arguments
1307 #~(cons "EXTRA_RUNTEST_OPTS=--skip-perf-tests" 1307 (substitute-keyword-arguments (package-arguments ghc-8.4)
1308 #$make-flags)) 1308 ((#:make-flags make-flags ''())
1309 ((#:phases phases '%standard-phases) 1309 #~(cons "EXTRA_RUNTEST_OPTS=--skip-perf-tests"
1310 #~(modify-phases #$phases 1310 #$make-flags))
1311 (add-after 'install 'remove-unnecessary-references 1311 ((#:phases phases '%standard-phases)
1312 (lambda* (#:key outputs #:allow-other-keys) 1312 #~(modify-phases #$phases
1313 (substitute* (find-files (string-append (assoc-ref outputs "out") "/lib/") 1313 (add-after 'install 'remove-unnecessary-references
1314 "settings") 1314 (lambda* (#:key outputs #:allow-other-keys)
1315 (("/gnu/store/.*/bin/(.*)" m program) program)) 1315 (substitute* (find-files (string-append #$output "/lib/")
1316 "settings")
1317 (("/gnu/store/.*/bin/(.*)" m program) program))
1316 1318
1317 ;; Remove references to "doc" output from "out" by rewriting 1319 ;; Remove references to "doc" output from "out" by rewriting
1318 ;; the "haddock-interfaces" fields and removing the optional 1320 ;; the "haddock-interfaces" fields and removing the optional
1319 ;; "haddock-html" field in the generated .conf files. 1321 ;; "haddock-html" field in the generated .conf files.
1320 (let ((doc (assoc-ref outputs "doc")) 1322 (let ((doc (assoc-ref outputs "doc"))
1321 (out (assoc-ref outputs "out"))) 1323 (out (assoc-ref outputs "out")))
1322 (with-fluids ((%default-port-encoding #f)) 1324 (with-fluids ((%default-port-encoding #f))
1323 (for-each (lambda (config-file) 1325 (for-each
1324 (substitute* config-file 1326 (lambda (config-file)
1325 (("^haddock-html: .*") "\n") 1327 (substitute* config-file
1326 (((format #f "^haddock-interfaces: ~a" doc)) 1328 (("^haddock-html: .*") "\n")
1327 (string-append "haddock-interfaces: " out)))) 1329 (((format #f "^haddock-interfaces: ~a" doc))
1328 (find-files (string-append out "/lib") ".conf"))) 1330 (string-append "haddock-interfaces: " out))))
1329 ;; Move the referenced files to the "out" output. 1331 (find-files (string-append out "/lib") ".conf")))
1330 (for-each (lambda (haddock-file) 1332 ;; Move the referenced files to the "out" output.
1331 (let* ((subdir (string-drop haddock-file (string-length doc))) 1333 (for-each
1332 (new (string-append out subdir))) 1334 (lambda (haddock-file)
1333 (mkdir-p (dirname new)) 1335 (let* ((subdir (string-drop haddock-file
1334 (rename-file haddock-file new))) 1336 (string-length doc)))
1335 (find-files doc "\\.haddock$"))))) 1337 (new (string-append out subdir)))
1336 (add-after 'unpack-testsuite 'skip-tests 1338 (mkdir-p (dirname new))
1337 (lambda _ 1339 (rename-file haddock-file new)))
1338 ;; These two tests refer to the root user, which doesn't exist 1340 (find-files doc "\\.haddock$")))))
1339 ;; (see <https://bugs.gnu.org/36692>). 1341 (add-after 'unpack-testsuite 'skip-tests
1340 (substitute* "libraries/unix/tests/all.T" 1342 (lambda _
1341 (("^test\\('T8108'") "# guix skipped: test('T8108'")) 1343 ;; These two tests refer to the root user, which doesn't exist
1342 (substitute* "libraries/unix/tests/libposix/all.T" 1344 ;; (see <https://bugs.gnu.org/36692>).
1343 (("^test\\('posix010'") "# guix skipped: test('posix010'")))))))) 1345 (substitute* "libraries/unix/tests/all.T"
1344 (native-search-paths (list (search-path-specification 1346 (("^test\\('T8108'") "# guix skipped: test('T8108'"))
1345 (variable "GHC_PACKAGE_PATH") 1347 (substitute* "libraries/unix/tests/libposix/all.T"
1346 (files (list 1348 (("^test\\('posix010'") "# guix skipped: test('posix010'"))))
1347 (string-append "lib/ghc-" version))) 1349 ;; binutils@2.39 warns for execstack deprecation by default, causing
1348 (file-pattern ".*\\.conf\\.d$") 1350 ;; some tests to fail ; explicitely disable during linking instead.
1349 (file-type 'directory)))))) 1351 (add-after 'unpack-testsuite 'fix-tests-with-binutils@2.39
1352 (lambda _
1353 (substitute* "testsuite/mk/test.mk"
1354 (("^TEST_HC_OPTS = ")
1355 "TEST_HC_OPTS = -optl -Wl,-z,noexecstack "))))))))
1356 (native-search-paths (list (search-path-specification
1357 (variable "GHC_PACKAGE_PATH")
1358 (files (list
1359 (string-append "lib/ghc-" version)))
1360 (file-pattern ".*\\.conf\\.d$")
1361 (file-type 'directory)))))))
1350 1362
1351(define-public ghc-8.8 1363(define-public ghc-8.8
1352 (package (inherit ghc-8.6) 1364 (package (inherit ghc-8.6)