about summary refs log tree commit diff
path: root/pkgs/development/compilers/ghc
diff options
context:
space:
mode:
authorSamir Talwar <samir@functional.computer>2023-08-09 23:34:30 +0200
committersternenseemann <sternenseemann@systemli.org>2023-08-10 01:17:27 +0200
commit32db1fb6e0ac37da546a4b7e6f984760e8061547 (patch)
tree0bbefb7e8b783c969eca5536bc876d9ea9d61f03 /pkgs/development/compilers/ghc
parentcba189dc2f1b3ceba0206c8a4eb7e9970fbf61f4 (diff)
ghc942 + ghc943: Apply the Cabal patch for --enable-relocatable
This patch was already applied to GHC 9.4.4 and up.

It should also fix the build, as the aarch64/darwin separate output fix depends upon it.
Diffstat (limited to 'pkgs/development/compilers/ghc')
-rw-r--r--pkgs/development/compilers/ghc/9.4.2.nix9
-rw-r--r--pkgs/development/compilers/ghc/9.4.3.nix9
2 files changed, 18 insertions, 0 deletions
diff --git a/pkgs/development/compilers/ghc/9.4.2.nix b/pkgs/development/compilers/ghc/9.4.2.nix
index 072aeb99f7bf7..afe78cbb87c06 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 = [
+    # Don't generate code that doesn't compile when --enable-relocatable is passed to Setup.hs
+    # Can be removed if the Cabal library included with ghc backports the linked fix
+    (fetchpatch {
+      url = "https://github.com/haskell/cabal/commit/6c796218c92f93c95e94d5ec2d077f6956f68e98.patch";
+      stripLen = 1;
+      extraPrefix = "libraries/Cabal/";
+      sha256 = "sha256-yRQ6YmMiwBwiYseC5BsrEtDgFbWvst+maGgDtdD0vAY=";
+    })
+
     # Fix docs build with sphinx >= 6.0
     # https://gitlab.haskell.org/ghc/ghc/-/issues/22766
     (fetchpatch {
diff --git a/pkgs/development/compilers/ghc/9.4.3.nix b/pkgs/development/compilers/ghc/9.4.3.nix
index c1fd079696702..a2ae0cf400c7a 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 = [
+    # Don't generate code that doesn't compile when --enable-relocatable is passed to Setup.hs
+    # Can be removed if the Cabal library included with ghc backports the linked fix
+    (fetchpatch {
+      url = "https://github.com/haskell/cabal/commit/6c796218c92f93c95e94d5ec2d077f6956f68e98.patch";
+      stripLen = 1;
+      extraPrefix = "libraries/Cabal/";
+      sha256 = "sha256-yRQ6YmMiwBwiYseC5BsrEtDgFbWvst+maGgDtdD0vAY=";
+    })
+
     # Fix docs build with sphinx >= 6.0
     # https://gitlab.haskell.org/ghc/ghc/-/issues/22766
     (fetchpatch {