haskell.compiler.ghc92*: 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:
6c796218c9

It was fixed in Cabal-3.8.*
Backport the fix to the Cabal library that ships with ghc-9.2.4

Co-authored-by: sternenseemann <sternenseemann@systemli.org>

Closes #200063.
This commit is contained in:
Kyle Butt 2022-11-07 10:36:50 -07:00 committed by sternenseemann
parent 1a14b05aa3
commit 3d851b64b8
2 changed files with 16 additions and 0 deletions

View file

@ -194,6 +194,14 @@ stdenv.mkDerivation (rec {
extraPrefix = "utils/haddock/";
stripLen = 1;
})
# 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 .";

View file

@ -194,6 +194,14 @@ stdenv.mkDerivation (rec {
extraPrefix = "utils/haddock/";
stripLen = 1;
})
# 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 .";