From 59ee0816630b71989d4f4f5ba88ce199456b5349 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sat, 29 Jul 2023 12:35:08 +0200 Subject: haskell.compiler.*: don't unnecessarily include LLVM for GHC >= 9.2 When 9.2.1 was [released], I apparently was confused by the wording. The NCG (-fasm) codegen backend for aarch64 not only works on aarch64-darwin, but also aarch64-linux. `useLLVM` being enabled on aarch64-linux had no adverse effect, as GHC used -fasm anyways, but it did inflate closure size unnecessarily which we can rectify now. [released]: https://www.haskell.org/ghc/blog/20211029-ghc-9.2.1-released.html --- pkgs/development/compilers/ghc/9.4.2.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkgs/development/compilers/ghc/9.4.2.nix') diff --git a/pkgs/development/compilers/ghc/9.4.2.nix b/pkgs/development/compilers/ghc/9.4.2.nix index afe78cbb87c..3c51fb981af 100644 --- a/pkgs/development/compilers/ghc/9.4.2.nix +++ b/pkgs/development/compilers/ghc/9.4.2.nix @@ -17,7 +17,7 @@ , useLLVM ? !(stdenv.targetPlatform.isx86 || stdenv.targetPlatform.isPower || stdenv.targetPlatform.isSparc - || (stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin)) + || stdenv.targetPlatform.isAarch64) , # LLVM is conceptually a run-time-only dependency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a # build-time dependency too. -- cgit 1.4.1 From 176ccbcda8cf5096e3db148b42ee9a1eead9b790 Mon Sep 17 00:00:00 2001 From: Vladimír Čunát Date: Sat, 28 Oct 2023 10:52:31 +0200 Subject: ghc*: patch build of docs after sphinx update The 8.x versions don't seem to need this (and the patch wouldn't apply). --- pkgs/development/compilers/ghc/9.0.2.nix | 1 + pkgs/development/compilers/ghc/9.2.4.nix | 1 + pkgs/development/compilers/ghc/9.2.5.nix | 1 + pkgs/development/compilers/ghc/9.2.6.nix | 1 + pkgs/development/compilers/ghc/9.2.7.nix | 1 + pkgs/development/compilers/ghc/9.2.8.nix | 1 + pkgs/development/compilers/ghc/9.4.2.nix | 1 + pkgs/development/compilers/ghc/9.4.3.nix | 1 + pkgs/development/compilers/ghc/9.4.4.nix | 1 + pkgs/development/compilers/ghc/9.4.5.nix | 1 + pkgs/development/compilers/ghc/9.4.6.nix | 1 + pkgs/development/compilers/ghc/9.4.7.nix | 1 + pkgs/development/compilers/ghc/common-hadrian.nix | 5 +++++ pkgs/development/compilers/ghc/docs-sphinx-7-ghc98.patch | 8 ++++++++ pkgs/development/compilers/ghc/docs-sphinx-7.patch | 8 ++++++++ 15 files changed, 33 insertions(+) create mode 100644 pkgs/development/compilers/ghc/docs-sphinx-7-ghc98.patch create mode 100644 pkgs/development/compilers/ghc/docs-sphinx-7.patch (limited to 'pkgs/development/compilers/ghc/9.4.2.nix') diff --git a/pkgs/development/compilers/ghc/9.0.2.nix b/pkgs/development/compilers/ghc/9.0.2.nix index f5f0c931714..6be098972ee 100644 --- a/pkgs/development/compilers/ghc/9.0.2.nix +++ b/pkgs/development/compilers/ghc/9.0.2.nix @@ -194,6 +194,7 @@ stdenv.mkDerivation (rec { url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch"; sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv"; }) + ./docs-sphinx-7.patch # fix hyperlinked haddock sources: https://github.com/haskell/haddock/pull/1482 (fetchpatch { url = "https://patch-diff.githubusercontent.com/raw/haskell/haddock/pull/1482.patch"; diff --git a/pkgs/development/compilers/ghc/9.2.4.nix b/pkgs/development/compilers/ghc/9.2.4.nix index 6aa87a15201..3ed263a4332 100644 --- a/pkgs/development/compilers/ghc/9.2.4.nix +++ b/pkgs/development/compilers/ghc/9.2.4.nix @@ -194,6 +194,7 @@ stdenv.mkDerivation (rec { url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch"; sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv"; }) + ./docs-sphinx-7.patch # fix hyperlinked haddock sources: https://github.com/haskell/haddock/pull/1482 (fetchpatch { url = "https://patch-diff.githubusercontent.com/raw/haskell/haddock/pull/1482.patch"; diff --git a/pkgs/development/compilers/ghc/9.2.5.nix b/pkgs/development/compilers/ghc/9.2.5.nix index c5aa5897761..6246630f549 100644 --- a/pkgs/development/compilers/ghc/9.2.5.nix +++ b/pkgs/development/compilers/ghc/9.2.5.nix @@ -194,6 +194,7 @@ stdenv.mkDerivation (rec { url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch"; sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv"; }) + ./docs-sphinx-7.patch # fix hyperlinked haddock sources: https://github.com/haskell/haddock/pull/1482 (fetchpatch { url = "https://patch-diff.githubusercontent.com/raw/haskell/haddock/pull/1482.patch"; diff --git a/pkgs/development/compilers/ghc/9.2.6.nix b/pkgs/development/compilers/ghc/9.2.6.nix index 651ff1e7d44..124303c0c81 100644 --- a/pkgs/development/compilers/ghc/9.2.6.nix +++ b/pkgs/development/compilers/ghc/9.2.6.nix @@ -194,6 +194,7 @@ stdenv.mkDerivation (rec { url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch"; sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv"; }) + ./docs-sphinx-7.patch # fix hyperlinked haddock sources: https://github.com/haskell/haddock/pull/1482 (fetchpatch { url = "https://patch-diff.githubusercontent.com/raw/haskell/haddock/pull/1482.patch"; diff --git a/pkgs/development/compilers/ghc/9.2.7.nix b/pkgs/development/compilers/ghc/9.2.7.nix index 74c0088473b..a627f74179b 100644 --- a/pkgs/development/compilers/ghc/9.2.7.nix +++ b/pkgs/development/compilers/ghc/9.2.7.nix @@ -194,6 +194,7 @@ stdenv.mkDerivation (rec { url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch"; sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv"; }) + ./docs-sphinx-7.patch # fix hyperlinked haddock sources: https://github.com/haskell/haddock/pull/1482 (fetchpatch { url = "https://patch-diff.githubusercontent.com/raw/haskell/haddock/pull/1482.patch"; diff --git a/pkgs/development/compilers/ghc/9.2.8.nix b/pkgs/development/compilers/ghc/9.2.8.nix index 973e62f9553..a0451f57c6e 100644 --- a/pkgs/development/compilers/ghc/9.2.8.nix +++ b/pkgs/development/compilers/ghc/9.2.8.nix @@ -194,6 +194,7 @@ stdenv.mkDerivation (rec { url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch"; sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv"; }) + ./docs-sphinx-7.patch # fix hyperlinked haddock sources: https://github.com/haskell/haddock/pull/1482 (fetchpatch { url = "https://patch-diff.githubusercontent.com/raw/haskell/haddock/pull/1482.patch"; diff --git a/pkgs/development/compilers/ghc/9.4.2.nix b/pkgs/development/compilers/ghc/9.4.2.nix index 3c51fb981af..7b921ecc441 100644 --- a/pkgs/development/compilers/ghc/9.4.2.nix +++ b/pkgs/development/compilers/ghc/9.4.2.nix @@ -205,6 +205,7 @@ stdenv.mkDerivation (rec { url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch"; sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv"; }) + ./docs-sphinx-7.patch ] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [ # Prevent the paths module from emitting symbols that we don't use # when building with separate outputs. diff --git a/pkgs/development/compilers/ghc/9.4.3.nix b/pkgs/development/compilers/ghc/9.4.3.nix index 87ce19f6605..2bddbea7bc7 100644 --- a/pkgs/development/compilers/ghc/9.4.3.nix +++ b/pkgs/development/compilers/ghc/9.4.3.nix @@ -205,6 +205,7 @@ stdenv.mkDerivation (rec { url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch"; sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv"; }) + ./docs-sphinx-7.patch ] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [ # Prevent the paths module from emitting symbols that we don't use # when building with separate outputs. diff --git a/pkgs/development/compilers/ghc/9.4.4.nix b/pkgs/development/compilers/ghc/9.4.4.nix index fa184a6fe17..e7465a95004 100644 --- a/pkgs/development/compilers/ghc/9.4.4.nix +++ b/pkgs/development/compilers/ghc/9.4.4.nix @@ -205,6 +205,7 @@ stdenv.mkDerivation (rec { url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch"; sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv"; }) + ./docs-sphinx-7.patch ] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [ # Prevent the paths module from emitting symbols that we don't use # when building with separate outputs. diff --git a/pkgs/development/compilers/ghc/9.4.5.nix b/pkgs/development/compilers/ghc/9.4.5.nix index 91032cb03d6..9442f2bf19b 100644 --- a/pkgs/development/compilers/ghc/9.4.5.nix +++ b/pkgs/development/compilers/ghc/9.4.5.nix @@ -205,6 +205,7 @@ stdenv.mkDerivation (rec { url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch"; sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv"; }) + ./docs-sphinx-7.patch ] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [ # Prevent the paths module from emitting symbols that we don't use # when building with separate outputs. diff --git a/pkgs/development/compilers/ghc/9.4.6.nix b/pkgs/development/compilers/ghc/9.4.6.nix index 3b0bef212a0..b64b3ba5ec6 100644 --- a/pkgs/development/compilers/ghc/9.4.6.nix +++ b/pkgs/development/compilers/ghc/9.4.6.nix @@ -197,6 +197,7 @@ stdenv.mkDerivation (rec { extraPrefix = "libraries/Cabal/"; sha256 = "sha256-yRQ6YmMiwBwiYseC5BsrEtDgFbWvst+maGgDtdD0vAY="; }) + ./docs-sphinx-7.patch # Work around a type not being defined when including Rts.h in bytestring's cbits # due to missing feature macros. See https://gitlab.haskell.org/ghc/ghc/-/issues/23810. diff --git a/pkgs/development/compilers/ghc/9.4.7.nix b/pkgs/development/compilers/ghc/9.4.7.nix index 48cec53e3b1..7ee135a13b4 100644 --- a/pkgs/development/compilers/ghc/9.4.7.nix +++ b/pkgs/development/compilers/ghc/9.4.7.nix @@ -197,6 +197,7 @@ stdenv.mkDerivation (rec { extraPrefix = "libraries/Cabal/"; sha256 = "sha256-yRQ6YmMiwBwiYseC5BsrEtDgFbWvst+maGgDtdD0vAY="; }) + ./docs-sphinx-7.patch ] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [ # Prevent the paths module from emitting symbols that we don't use # when building with separate outputs. diff --git a/pkgs/development/compilers/ghc/common-hadrian.nix b/pkgs/development/compilers/ghc/common-hadrian.nix index e876c4be0af..912e16423c5 100644 --- a/pkgs/development/compilers/ghc/common-hadrian.nix +++ b/pkgs/development/compilers/ghc/common-hadrian.nix @@ -266,6 +266,11 @@ stdenv.mkDerivation ({ enableParallelBuilding = true; + patches = [ + (if lib.versionAtLeast version "9.8" + then ./docs-sphinx-7-ghc98.patch + else ./docs-sphinx-7.patch ) + ]; postPatch = '' patchShebangs --build . ''; diff --git a/pkgs/development/compilers/ghc/docs-sphinx-7-ghc98.patch b/pkgs/development/compilers/ghc/docs-sphinx-7-ghc98.patch new file mode 100644 index 00000000000..3fc1a0f2156 --- /dev/null +++ b/pkgs/development/compilers/ghc/docs-sphinx-7-ghc98.patch @@ -0,0 +1,8 @@ +Fix build of docs after sphinx update. +https://github.com/sphinx-doc/sphinx/pull/11381 +https://gitlab.haskell.org/ghc/ghc/-/issues/24129 +--- a/docs/users_guide/rtd-theme/layout.html ++++ b/docs/users_guide/rtd-theme/layout.html +@@ -28 +28 @@ +- ++ diff --git a/pkgs/development/compilers/ghc/docs-sphinx-7.patch b/pkgs/development/compilers/ghc/docs-sphinx-7.patch new file mode 100644 index 00000000000..49fa45d1b9a --- /dev/null +++ b/pkgs/development/compilers/ghc/docs-sphinx-7.patch @@ -0,0 +1,8 @@ +Fix build of docs after sphinx update. +https://github.com/sphinx-doc/sphinx/pull/11381 +https://gitlab.haskell.org/ghc/ghc/-/issues/24129 +--- a/docs/users_guide/rtd-theme/layout.html ++++ b/docs/users_guide/rtd-theme/layout.html +@@ -67 +67 @@ +- ++ -- cgit 1.4.1