Skip to content

Commit

Permalink
haskell.compiler: fix GHCs' user guide build with sphinx >= 6.0
Browse files Browse the repository at this point in the history
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
  • Loading branch information
sternenseemann authored and mweinelt committed Mar 3, 2023
1 parent 07ff0b5 commit 2278f9e
Show file tree
Hide file tree
Showing 10 changed files with 79 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkgs/development/compilers/ghc/8.10.7.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions pkgs/development/compilers/ghc/8.8.4.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions pkgs/development/compilers/ghc/9.0.2.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
7 changes: 7 additions & 0 deletions pkgs/development/compilers/ghc/9.2.4.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
7 changes: 7 additions & 0 deletions pkgs/development/compilers/ghc/9.2.5.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
7 changes: 7 additions & 0 deletions pkgs/development/compilers/ghc/9.2.6.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
9 changes: 9 additions & 0 deletions pkgs/development/compilers/ghc/9.4.2.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 .";

Expand Down
9 changes: 9 additions & 0 deletions pkgs/development/compilers/ghc/9.4.3.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 .";

Expand Down
8 changes: 8 additions & 0 deletions pkgs/development/compilers/ghc/9.4.4.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 .";
Expand Down
13 changes: 13 additions & 0 deletions pkgs/development/compilers/ghc/ghc-8.8.4-sphinx-6.0.patch
Original file line number Diff line number Diff line change
@@ -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'

0 comments on commit 2278f9e

Please sign in to comment.