summary refs log tree commit diff
diff options
context:
space:
mode:
authorsternenseemann <sternenseemann@systemli.org>2023-02-26 16:39:42 +0100
committerMartin Weinelt <hexa@darmstadt.ccc.de>2023-03-03 23:56:30 +0100
commit2278f9ebe2cc2595f20fb756b7a499699c4fe9c1 (patch)
treeee6e89234d2e49849eaf1080f61fb191c6bac8d2
parent07ff0b59009c59e65695c0cdc4d0197910534391 (diff)
downloadnixpkgs-2278f9ebe2cc2595f20fb756b7a499699c4fe9c1.tar
nixpkgs-2278f9ebe2cc2595f20fb756b7a499699c4fe9c1.tar.gz
nixpkgs-2278f9ebe2cc2595f20fb756b7a499699c4fe9c1.tar.bz2
nixpkgs-2278f9ebe2cc2595f20fb756b7a499699c4fe9c1.tar.lz
nixpkgs-2278f9ebe2cc2595f20fb756b7a499699c4fe9c1.tar.xz
nixpkgs-2278f9ebe2cc2595f20fb756b7a499699c4fe9c1.tar.zst
nixpkgs-2278f9ebe2cc2595f20fb756b7a499699c4fe9c1.zip
haskell.compiler: fix GHCs' user guide build with sphinx >= 6.0
This requires backporting upstream's fix to all GHCs we are currently
shipping, since only GHC 9.4.5 and 9.6.1 will receive a backport.

GHC HEAD will be taken care of in #217168.

https://gitlab.haskell.org/ghc/ghc/-/merge_requests/9625
https://gitlab.haskell.org/ghc/ghc/-/issues/22690
-rw-r--r--pkgs/development/compilers/ghc/8.10.7.nix8
-rw-r--r--pkgs/development/compilers/ghc/8.8.4.nix4
-rw-r--r--pkgs/development/compilers/ghc/9.0.2.nix7
-rw-r--r--pkgs/development/compilers/ghc/9.2.4.nix7
-rw-r--r--pkgs/development/compilers/ghc/9.2.5.nix7
-rw-r--r--pkgs/development/compilers/ghc/9.2.6.nix7
-rw-r--r--pkgs/development/compilers/ghc/9.4.2.nix9
-rw-r--r--pkgs/development/compilers/ghc/9.4.3.nix9
-rw-r--r--pkgs/development/compilers/ghc/9.4.4.nix8
-rw-r--r--pkgs/development/compilers/ghc/ghc-8.8.4-sphinx-6.0.patch13
10 files changed, 79 insertions, 0 deletions
diff --git a/pkgs/development/compilers/ghc/8.10.7.nix b/pkgs/development/compilers/ghc/8.10.7.nix
index afc06e09edb..a582da03243 100644
--- a/pkgs/development/compilers/ghc/8.10.7.nix
+++ b/pkgs/development/compilers/ghc/8.10.7.nix
@@ -188,6 +188,14 @@ stdenv.mkDerivation (rec {
   outputs = [ "out" "doc" ];
 
   patches = [
+    # Fix docs build with sphinx >= 6.0
+    # https://gitlab.haskell.org/ghc/ghc/-/issues/22766
+    (fetchpatch {
+      name = "ghc-docs-sphinx-6.0.patch";
+      url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
+      sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
+    })
+
     # See upstream patch at
     # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4885. Since we build
     # from source distributions, the auto-generated configure script needs to be
diff --git a/pkgs/development/compilers/ghc/8.8.4.nix b/pkgs/development/compilers/ghc/8.8.4.nix
index be4ca5edb82..21e8c5b13aa 100644
--- a/pkgs/development/compilers/ghc/8.8.4.nix
+++ b/pkgs/development/compilers/ghc/8.8.4.nix
@@ -175,6 +175,10 @@ stdenv.mkDerivation (rec {
   outputs = [ "out" "doc" ];
 
   patches = [
+    # Fix docs build with sphinx >= 6.0
+    # https://gitlab.haskell.org/ghc/ghc/-/issues/22766
+    ./ghc-8.8.4-sphinx-6.0.patch
+
     # See upstream patch at
     # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4885. Since we build
     # from source distributions, the auto-generated configure script needs to be
diff --git a/pkgs/development/compilers/ghc/9.0.2.nix b/pkgs/development/compilers/ghc/9.0.2.nix
index f69e52701a9..7cd6171bb34 100644
--- a/pkgs/development/compilers/ghc/9.0.2.nix
+++ b/pkgs/development/compilers/ghc/9.0.2.nix
@@ -188,6 +188,13 @@ stdenv.mkDerivation (rec {
   outputs = [ "out" "doc" ];
 
   patches = [
+    # Fix docs build with sphinx >= 6.0
+    # https://gitlab.haskell.org/ghc/ghc/-/issues/22766
+    (fetchpatch {
+      name = "ghc-docs-sphinx-6.0.patch";
+      url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
+      sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
+    })
     # 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 6b8efae06e5..78227eb5c9f 100644
--- a/pkgs/development/compilers/ghc/9.2.4.nix
+++ b/pkgs/development/compilers/ghc/9.2.4.nix
@@ -188,6 +188,13 @@ stdenv.mkDerivation (rec {
   outputs = [ "out" "doc" ];
 
   patches = [
+    # Fix docs build with sphinx >= 6.0
+    # https://gitlab.haskell.org/ghc/ghc/-/issues/22766
+    (fetchpatch {
+      name = "ghc-docs-sphinx-6.0.patch";
+      url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
+      sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
+    })
     # 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 e7c75fcaccf..80b2e099e3a 100644
--- a/pkgs/development/compilers/ghc/9.2.5.nix
+++ b/pkgs/development/compilers/ghc/9.2.5.nix
@@ -188,6 +188,13 @@ stdenv.mkDerivation (rec {
   outputs = [ "out" "doc" ];
 
   patches = [
+    # Fix docs build with sphinx >= 6.0
+    # https://gitlab.haskell.org/ghc/ghc/-/issues/22766
+    (fetchpatch {
+      name = "ghc-docs-sphinx-6.0.patch";
+      url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
+      sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
+    })
     # 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 a573e8855f5..4bcef66af45 100644
--- a/pkgs/development/compilers/ghc/9.2.6.nix
+++ b/pkgs/development/compilers/ghc/9.2.6.nix
@@ -188,6 +188,13 @@ stdenv.mkDerivation (rec {
   outputs = [ "out" "doc" ];
 
   patches = [
+    # Fix docs build with sphinx >= 6.0
+    # https://gitlab.haskell.org/ghc/ghc/-/issues/22766
+    (fetchpatch {
+      name = "ghc-docs-sphinx-6.0.patch";
+      url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
+      sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
+    })
     # 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 d3702f4e849..702128406d8 100644
--- a/pkgs/development/compilers/ghc/9.4.2.nix
+++ b/pkgs/development/compilers/ghc/9.4.2.nix
@@ -189,6 +189,15 @@ stdenv.mkDerivation (rec {
 
   outputs = [ "out" "doc" ];
 
+  patches = [
+    # Fix docs build with sphinx >= 6.0
+    # https://gitlab.haskell.org/ghc/ghc/-/issues/22766
+    (fetchpatch {
+      name = "ghc-docs-sphinx-6.0.patch";
+      url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
+      sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
+    })
+  ];
 
   postPatch = "patchShebangs .";
 
diff --git a/pkgs/development/compilers/ghc/9.4.3.nix b/pkgs/development/compilers/ghc/9.4.3.nix
index fea2d4c4c8c..bb747ea910a 100644
--- a/pkgs/development/compilers/ghc/9.4.3.nix
+++ b/pkgs/development/compilers/ghc/9.4.3.nix
@@ -189,6 +189,15 @@ stdenv.mkDerivation (rec {
 
   outputs = [ "out" "doc" ];
 
+  patches = [
+    # Fix docs build with sphinx >= 6.0
+    # https://gitlab.haskell.org/ghc/ghc/-/issues/22766
+    (fetchpatch {
+      name = "ghc-docs-sphinx-6.0.patch";
+      url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
+      sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
+    })
+  ];
 
   postPatch = "patchShebangs .";
 
diff --git a/pkgs/development/compilers/ghc/9.4.4.nix b/pkgs/development/compilers/ghc/9.4.4.nix
index 508316fc5e7..1800bb635aa 100644
--- a/pkgs/development/compilers/ghc/9.4.4.nix
+++ b/pkgs/development/compilers/ghc/9.4.4.nix
@@ -198,6 +198,14 @@ stdenv.mkDerivation (rec {
       extraPrefix = "libraries/Cabal/";
       sha256 = "sha256-yRQ6YmMiwBwiYseC5BsrEtDgFbWvst+maGgDtdD0vAY=";
     })
+
+    # Fix docs build with sphinx >= 6.0
+    # https://gitlab.haskell.org/ghc/ghc/-/issues/22766
+    (fetchpatch {
+      name = "ghc-docs-sphinx-6.0.patch";
+      url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
+      sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
+    })
   ];
 
   postPatch = "patchShebangs .";
diff --git a/pkgs/development/compilers/ghc/ghc-8.8.4-sphinx-6.0.patch b/pkgs/development/compilers/ghc/ghc-8.8.4-sphinx-6.0.patch
new file mode 100644
index 00000000000..c20c62f9cf6
--- /dev/null
+++ b/pkgs/development/compilers/ghc/ghc-8.8.4-sphinx-6.0.patch
@@ -0,0 +1,13 @@
+diff --git a/docs/users_guide/ghc_config.py.in b/docs/users_guide/ghc_config.py.in
+index 2670ad3cf1..d2f9d85c31 100644
+--- a/docs/users_guide/ghc_config.py.in
++++ b/docs/users_guide/ghc_config.py.in
+@@ -1,6 +1,6 @@
+ extlinks = {
+-    'ghc-ticket': ('https://gitlab.haskell.org/ghc/ghc/issues/%s', 'Issue #'),
+-    'ghc-wiki': ('https://gitlab.haskell.org/ghc/ghc/wikis/%s', 'GHC Wiki'),
++    'ghc-ticket': ('https://gitlab.haskell.org/ghc/ghc/issues/%s', 'Issue %s'),
++    'ghc-wiki': ('https://gitlab.haskell.org/ghc/ghc/wikis/%s', 'GHC Wiki %s'),
+ }
+ 
+ libs_base_uri = '../libraries'