diff --git a/pkgs/development/compilers/ghc/common-hadrian.nix b/pkgs/development/compilers/ghc/common-hadrian.nix index 0fe3796c00b7..675b4298ed90 100644 --- a/pkgs/development/compilers/ghc/common-hadrian.nix +++ b/pkgs/development/compilers/ghc/common-hadrian.nix @@ -311,6 +311,9 @@ ./ghc-define-undefined-elf-st-visibility.patch ] + # Fix docs build with Sphinx >= 9 https://gitlab.haskell.org/ghc/ghc/-/issues/26810 + ++ [ ./ghc-9.6-or-later-docs-sphinx-9.patch ] + ++ (import ./common-llvm-patches.nix { inherit lib version fetchpatch; }); stdenv = stdenvNoCC; diff --git a/pkgs/development/compilers/ghc/common-make-native-bignum.nix b/pkgs/development/compilers/ghc/common-make-native-bignum.nix index 2300e0470ca7..6a900696cc3e 100644 --- a/pkgs/development/compilers/ghc/common-make-native-bignum.nix +++ b/pkgs/development/compilers/ghc/common-make-native-bignum.nix @@ -305,6 +305,9 @@ stdenv.mkDerivation ( # Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129 krank:ignore-line ./docs-sphinx-7.patch + # Fix docs build with Sphinx >= 9 https://gitlab.haskell.org/ghc/ghc/-/issues/26810 + ./ghc-9.4-docs-sphinx-9.patch + # Correctly record libnuma's library and include directories in the # package db. This fixes linking whenever stdenv and propagation won't # quite pass the correct -L flags to the linker, e.g. when using GHC diff --git a/pkgs/development/compilers/ghc/ghc-9.4-docs-sphinx-9.patch b/pkgs/development/compilers/ghc/ghc-9.4-docs-sphinx-9.patch new file mode 100644 index 000000000000..74053b94e9a9 --- /dev/null +++ b/pkgs/development/compilers/ghc/ghc-9.4-docs-sphinx-9.patch @@ -0,0 +1,31 @@ +From db33b15c27e607cd66b85d0a2a6868c7b718a96b Mon Sep 17 00:00:00 2001 +From: sterni +Date: Wed, 28 Jan 2026 00:09:54 +0100 +Subject: [PATCH] users_guide: fix runtime error during build with Sphinx 9.1.0 + +Appears that pathto is stricter about what it accepts now. +Tested Sphinx 8.2.3 and 9.1.0 on the ghc-9.10 branch. + +Resolves #26810. + +Co-authored-by: Martin Weinelt +--- + docs/users_guide/rtd-theme/layout.html | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/docs/users_guide/rtd-theme/layout.html b/docs/users_guide/rtd-theme/layout.html +index 2a61142514..4b3c1befba 100644 +--- a/docs/users_guide/rtd-theme/layout.html ++++ b/docs/users_guide/rtd-theme/layout.html +@@ -70,7 +70,7 @@ + {%- if css|attr("rel") %} + + {%- else %} +- ++ + {%- endif %} + {%- endfor %} + +-- +2.52.0 + diff --git a/pkgs/development/compilers/ghc/ghc-9.6-or-later-docs-sphinx-9.patch b/pkgs/development/compilers/ghc/ghc-9.6-or-later-docs-sphinx-9.patch new file mode 100644 index 000000000000..5e6960f7e96c --- /dev/null +++ b/pkgs/development/compilers/ghc/ghc-9.6-or-later-docs-sphinx-9.patch @@ -0,0 +1,30 @@ +From 9653a2b9a9e3a756b287b0a59204860511e4abce Mon Sep 17 00:00:00 2001 +From: sterni +Date: Wed, 28 Jan 2026 00:09:54 +0100 +Subject: [PATCH] users_guide: fix runtime error during build with Sphinx 9.1.0 + +Appears that pathto is stricter about what it accepts now. +Tested Sphinx 8.2.3 and 9.1.0 on the ghc-9.10 branch. + +Resolves #26810. + +Co-authored-by: Martin Weinelt +--- + docs/users_guide/rtd-theme/layout.html | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/docs/users_guide/rtd-theme/layout.html b/docs/users_guide/rtd-theme/layout.html +index 94a40cc1c3..f2441378a8 100644 +--- a/docs/users_guide/rtd-theme/layout.html ++++ b/docs/users_guide/rtd-theme/layout.html +@@ -32,7 +32,7 @@ + {%- if css|attr("rel") %} + + {%- else %} +- ++ + {%- endif %} + {%- endfor %} + +-- +2.52.0