haskell.packages.ghc{981-983,9101}.cabal-install: ignore unix bound

We apply a patch for the issue this bound is trying to prevent.

Changed files
+33 -1
pkgs
+22 -1
pkgs/development/haskell-modules/configuration-common.nix
···
in
# Some dead code is not properly eliminated on aarch64-darwin, leading
# to bogus references to some dependencies.
-
overrideCabal (old: lib.optionalAttrs (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) {
postInstall = ''
${old.postInstall or ""}
remove-references-to -t ${scope.HTTP} "$out/bin/.cabal-wrapped"
···
in
# Some dead code is not properly eliminated on aarch64-darwin, leading
# to bogus references to some dependencies.
+
overrideCabal (old: {
+
# Prevent DOS line endings from Hackage from breaking a patch
+
prePatch = old.prePatch or "" + ''
+
${pkgs.buildPackages.dos2unix}/bin/dos2unix *.cabal
+
'';
+
# Ignore unix bound intended to prevent an unix bug on 32bit systems.
+
# We apply a patch for this issue to the GHC core packages directly.
+
# See unix-fix-ctimeval-size-32-bit.patch in ../compilers/ghc/common-*.nix
+
patches =
+
old.patches or [ ]
+
++ lib.optionals (
+
scope.unix == null
+
&& lib.elem self.ghc.version [
+
"9.8.1"
+
"9.8.2"
+
"9.8.3"
+
"9.10.1"
+
]
+
) [
+
./patches/cabal-install-3.14.1.1-lift-unix-bound.patch
+
];
+
} // lib.optionalAttrs (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) {
postInstall = ''
${old.postInstall or ""}
remove-references-to -t ${scope.HTTP} "$out/bin/.cabal-wrapped"
+11
pkgs/development/haskell-modules/patches/cabal-install-3.14.1.1-lift-unix-bound.patch
···
···
+
--- a/cabal-install.cabal
+
+++ b/cabal-install.cabal
+
@@ -261,7 +261,7 @@
+
-- newer directory for symlinks
+
build-depends: Win32 >= 2.8 && < 3, directory >=1.3.1.0
+
else
+
- build-depends: unix >= 2.5 && < 2.8 || >= 2.8.6.0 && < 2.9
+
+ build-depends: unix >= 2.5 && < 2.9
+
+
if flag(lukko)
+
build-depends: lukko >= 0.1 && <0.2