diff options
author | Kyle Butt <kyle@iteratee.net> | 2023-02-23 09:58:41 -0700 |
---|---|---|
committer | sternenseemann <sternenseemann@systemli.org> | 2023-02-24 12:48:37 +0100 |
commit | 9ace1d895c246d5a6fa9a405897d40f64b5167cd (patch) | |
tree | 8cf3f97487ff5ab6fd02b61f4ff63572821a6a7a /pkgs/development/compilers/ghc | |
parent | 6a4dc401ab436980352ba08c6a08ee1a3c50349e (diff) | |
download | nixlib-9ace1d895c246d5a6fa9a405897d40f64b5167cd.tar nixlib-9ace1d895c246d5a6fa9a405897d40f64b5167cd.tar.gz nixlib-9ace1d895c246d5a6fa9a405897d40f64b5167cd.tar.bz2 nixlib-9ace1d895c246d5a6fa9a405897d40f64b5167cd.tar.lz nixlib-9ace1d895c246d5a6fa9a405897d40f64b5167cd.tar.xz nixlib-9ace1d895c246d5a6fa9a405897d40f64b5167cd.tar.zst nixlib-9ace1d895c246d5a6fa9a405897d40f64b5167cd.zip |
haskell.compiler.ghc94*: backport Cabal bugfix for Paths_ modules
There is a code generation bug in Cabal-3.6.3.0. For packages configured with --enable-relocatable, Cabal would generate code that doesn't compile. There isn't an upstream issue, but the issue is described in the commit that fixed it: https://github.com/haskell/cabal/commit/6c796218c92f93c95e94d5ec2d077f6956f68e98 It was fixed in Cabal-3.8.* Backport the fix to the Cabal library that ships with ghc-9.4.4 Cabal 3.8 ships with ghc-9.6, so when 9.6 is released this fix shouldn't be necessary.
Diffstat (limited to 'pkgs/development/compilers/ghc')
-rw-r--r-- | pkgs/development/compilers/ghc/9.4.4.nix | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/development/compilers/ghc/9.4.4.nix b/pkgs/development/compilers/ghc/9.4.4.nix index b9897b0f4d82..508316fc5e72 100644 --- a/pkgs/development/compilers/ghc/9.4.4.nix +++ b/pkgs/development/compilers/ghc/9.4.4.nix @@ -189,6 +189,16 @@ 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="; + }) + ]; postPatch = "patchShebangs ."; |