ghc*: patch build of docs after sphinx update

The 8.x versions don't seem to need this (and the patch wouldn't apply).

+1
pkgs/development/compilers/ghc/9.0.2.nix
···
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";
+1
pkgs/development/compilers/ghc/9.2.4.nix
···
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";
+1
pkgs/development/compilers/ghc/9.2.5.nix
···
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";
+1
pkgs/development/compilers/ghc/9.2.6.nix
···
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";
+1
pkgs/development/compilers/ghc/9.2.7.nix
···
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";
+1
pkgs/development/compilers/ghc/9.2.8.nix
···
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";
+1
pkgs/development/compilers/ghc/9.4.2.nix
···
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.
+1
pkgs/development/compilers/ghc/9.4.3.nix
···
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.
+1
pkgs/development/compilers/ghc/9.4.4.nix
···
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.
+1
pkgs/development/compilers/ghc/9.4.5.nix
···
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.
+1
pkgs/development/compilers/ghc/9.4.6.nix
···
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.
+1
pkgs/development/compilers/ghc/9.4.7.nix
···
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.
+5
pkgs/development/compilers/ghc/common-hadrian.nix
···
enableParallelBuilding = true;
+
patches = [
+
(if lib.versionAtLeast version "9.8"
+
then ./docs-sphinx-7-ghc98.patch
+
else ./docs-sphinx-7.patch )
+
];
postPatch = ''
patchShebangs --build .
'';
+8
pkgs/development/compilers/ghc/docs-sphinx-7-ghc98.patch
···
+
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 @@
+
- <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
+
+ <link rel="stylesheet" href="{{ pathto('_static/' + styles[-1], 1) }}" type="text/css" />
+8
pkgs/development/compilers/ghc/docs-sphinx-7.patch
···
+
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 @@
+
- <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
+
+ <link rel="stylesheet" href="{{ pathto('_static/' + styles[-1], 1) }}" type="text/css" />