summary refs log tree commit diff
diff options
context:
space:
mode:
authorJade Lovelace <jadel@mercury.com>2022-06-16 15:27:37 -0700
committerJade Lovelace <jadel@mercury.com>2022-06-16 16:39:42 -0700
commit2cf08210fd98a99dbe0ac59eb58ecbda3d5d7795 (patch)
treea83f5324eea0c337afa9a18a21e59ecce78a8b1d
parent2a95e0e86cd5bd04d0afa41ddbcf69b1385d956a (diff)
downloadnixpkgs-2cf08210fd98a99dbe0ac59eb58ecbda3d5d7795.tar
nixpkgs-2cf08210fd98a99dbe0ac59eb58ecbda3d5d7795.tar.gz
nixpkgs-2cf08210fd98a99dbe0ac59eb58ecbda3d5d7795.tar.bz2
nixpkgs-2cf08210fd98a99dbe0ac59eb58ecbda3d5d7795.tar.lz
nixpkgs-2cf08210fd98a99dbe0ac59eb58ecbda3d5d7795.tar.xz
nixpkgs-2cf08210fd98a99dbe0ac59eb58ecbda3d5d7795.tar.zst
nixpkgs-2cf08210fd98a99dbe0ac59eb58ecbda3d5d7795.zip
ghc8107-ghc923: patch haddock to generate correct source links
Previously links to external modules were jacked because haddock was
doing them wrong. I fixed this upstream in early May 2022 but it's not
out yet.
-rw-r--r--pkgs/development/compilers/ghc/8.10.7.nix8
-rw-r--r--pkgs/development/compilers/ghc/9.0.2.nix8
-rw-r--r--pkgs/development/compilers/ghc/9.2.3.nix10
3 files changed, 26 insertions, 0 deletions
diff --git a/pkgs/development/compilers/ghc/8.10.7.nix b/pkgs/development/compilers/ghc/8.10.7.nix
index 981dfee88b8..eb9f08ef820 100644
--- a/pkgs/development/compilers/ghc/8.10.7.nix
+++ b/pkgs/development/compilers/ghc/8.10.7.nix
@@ -191,6 +191,14 @@ stdenv.mkDerivation (rec {
     # when adding new GHC releases in nixpkgs.
     ./respect-ar-path.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";
+      sha256 = "sha256-8w8QUCsODaTvknCDGgTfFNZa8ZmvIKaKS+2ZJZ9foYk=";
+      extraPrefix = "utils/haddock/";
+      stripLen = 1;
+    })
+
     # cabal passes incorrect --host= when cross-compiling
     # https://github.com/haskell/cabal/issues/5887
     (fetchpatch {
diff --git a/pkgs/development/compilers/ghc/9.0.2.nix b/pkgs/development/compilers/ghc/9.0.2.nix
index 7b3f213ed33..96688f104e6 100644
--- a/pkgs/development/compilers/ghc/9.0.2.nix
+++ b/pkgs/development/compilers/ghc/9.0.2.nix
@@ -184,6 +184,14 @@ stdenv.mkDerivation (rec {
   outputs = [ "out" "doc" ];
 
   patches = [
+    # fix hyperlinked haddock sources: https://github.com/haskell/haddock/pull/1482
+    (fetchpatch {
+      url = "https://patch-diff.githubusercontent.com/raw/haskell/haddock/pull/1482.patch";
+      sha256 = "sha256-8w8QUCsODaTvknCDGgTfFNZa8ZmvIKaKS+2ZJZ9foYk=";
+      extraPrefix = "utils/haddock/";
+      stripLen = 1;
+    })
+
     # Add flag that fixes C++ exception handling; opt-in. Merged in 9.4 and 9.2.2.
     # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7423
     (fetchpatch {
diff --git a/pkgs/development/compilers/ghc/9.2.3.nix b/pkgs/development/compilers/ghc/9.2.3.nix
index 016b7df90ce..43db5beb694 100644
--- a/pkgs/development/compilers/ghc/9.2.3.nix
+++ b/pkgs/development/compilers/ghc/9.2.3.nix
@@ -185,6 +185,16 @@ stdenv.mkDerivation (rec {
 
   outputs = [ "out" "doc" ];
 
+  patches = [
+    # fix hyperlinked haddock sources: https://github.com/haskell/haddock/pull/1482
+    (fetchpatch {
+      url = "https://patch-diff.githubusercontent.com/raw/haskell/haddock/pull/1482.patch";
+      sha256 = "sha256-8w8QUCsODaTvknCDGgTfFNZa8ZmvIKaKS+2ZJZ9foYk=";
+      extraPrefix = "utils/haddock/";
+      stripLen = 1;
+    })
+  ];
+
   postPatch = "patchShebangs .";
 
   # GHC needs the locale configured during the Haddock phase.