haskell.packages.ghc{96,98}.cabal-install: fix build of 3.12
With cabal-install >= 3.12, we need to adjust our cabal-install overlay once again. - Due to the new dependency semaphore-compat, which appears to require unix >= 2.8 it is very difficult to get to work for GHC < 9.6 (but probably possible). Technically, using pkgs.cabal-install should always be fine, so there's no strict need for cabal-install to work with every GHC. Let's drop support for GHC < 9.6 for now. - Make sure that cabal-install-solver also uses the latest version always. - Due to Cabal 3.12, we need to deviate from Stackage for hackage-security. cabal-install does support the standard version of resolv now, though.
This commit is contained in:
parent
fb94b2b435
commit
9919b666ab
@ -63,6 +63,7 @@ sed -r \
|
||||
-e '/ language-nix /d' \
|
||||
-e '/ hackage-db /d' \
|
||||
-e '/ cabal-install /d' \
|
||||
-e '/ cabal-install-solver /d' \
|
||||
-e '/ lsp /d' \
|
||||
-e '/ lsp-types /d' \
|
||||
-e '/ lsp-test /d' \
|
||||
|
@ -34,6 +34,13 @@ self: super: {
|
||||
process = self.process_1_6_20_0;
|
||||
}));
|
||||
|
||||
# hackage-security == 0.6.2.6 has a wider support range in theory, but it only
|
||||
# makes sense to use the non Stackage version if we want to use Cabal* >= 3.12
|
||||
hackage-security_0_6_2_6 = super.hackage-security_0_6_2_6.override {
|
||||
Cabal = self.Cabal_3_12_1_0;
|
||||
Cabal-syntax = self.Cabal-syntax_3_12_1_0;
|
||||
};
|
||||
|
||||
# cabal-install needs most recent versions of Cabal and Cabal-syntax,
|
||||
# so we need to put some extra work for non-latest GHCs
|
||||
inherit (
|
||||
@ -41,25 +48,10 @@ self: super: {
|
||||
# !!! Use cself/csuper inside for the actual overrides
|
||||
cabalInstallOverlay = cself: csuper:
|
||||
{
|
||||
# Needs to be downgraded compared to Stackage LTS 21
|
||||
resolv = cself.resolv_0_1_2_0;
|
||||
hackage-security = self.hackage-security_0_6_2_6;
|
||||
} // lib.optionalAttrs (lib.versionOlder self.ghc.version "9.10") {
|
||||
Cabal = cself.Cabal_3_10_3_0;
|
||||
Cabal-syntax = cself.Cabal-syntax_3_10_3_0;
|
||||
} // lib.optionalAttrs (lib.versionOlder self.ghc.version "9.4") {
|
||||
# We need at least directory >= 1.3.7.0. Using the latest version
|
||||
# 1.3.8.* is not an option since it causes very annoying dependencies
|
||||
# on newer versions of unix and filepath than GHC 9.2 ships
|
||||
directory = cself.directory_1_3_7_1;
|
||||
# GHC 9.2.5 starts shipping 1.6.16.0 which is required by
|
||||
# cabal-install, but we need to recompile process even if the correct
|
||||
# version is available to prevent inconsistent dependencies:
|
||||
# process depends on directory.
|
||||
process = cself.process_1_6_20_0;
|
||||
|
||||
# Prevent dependency on doctest which causes an inconsistent dependency
|
||||
# due to depending on ghc which depends on directory etc.
|
||||
vector = dontCheck csuper.vector;
|
||||
Cabal = cself.Cabal_3_12_1_0;
|
||||
Cabal-syntax = cself.Cabal-syntax_3_12_1_0;
|
||||
};
|
||||
in
|
||||
{
|
||||
@ -497,7 +489,6 @@ self: super: {
|
||||
|
||||
# Tests require older versions of tasty.
|
||||
hzk = dontCheck super.hzk;
|
||||
resolv_0_1_2_0 = doJailbreak super.resolv_0_1_2_0;
|
||||
|
||||
# Test suite doesn't compile with 9.6, 9.8
|
||||
# https://github.com/sebastiaanvisser/fclabels/issues/45
|
||||
|
@ -104,7 +104,6 @@ extra-packages:
|
||||
- ormolu == 0.7.4.0 # 2024-07-07: for ghc 9.8 compat
|
||||
- primitive-unlifted == 0.1.3.1 # 2024-03-16: Needed for hls on ghc 9.2
|
||||
- path == 0.9.0 # 2021-12-03: path version building with stackage genvalidity and GHC 9.0.2
|
||||
- resolv < 0.2 # required to build cabal-install-3.10.1.0 with Stackage LTS 21
|
||||
- sbv == 7.13 # required for pkgs.petrinizer
|
||||
- stylish-haskell == 0.14.4.0 # 2022-09-19: needed for hls on ghc 9.2
|
||||
- tasty-hspec == 1.1.6 # 2022-04-07: Needed for elm-format
|
||||
|
@ -580,7 +580,6 @@ default-package-overrides:
|
||||
- cabal-debian ==5.2.3
|
||||
- cabal-doctest ==1.0.10
|
||||
- cabal-file ==0.1.1
|
||||
- cabal-install-solver ==3.10.2.1
|
||||
- cabal-plan ==0.7.3.0
|
||||
- cabal-rpm ==2.1.5
|
||||
- cabal-sort ==0.1.2
|
||||
|
@ -58852,26 +58852,6 @@ self: {
|
||||
}) {};
|
||||
|
||||
"cabal-install-solver" = callPackage
|
||||
({ mkDerivation, array, base, bytestring, Cabal, Cabal-syntax
|
||||
, containers, edit-distance, filepath, mtl, pretty, tasty
|
||||
, tasty-hunit, tasty-quickcheck, transformers
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "cabal-install-solver";
|
||||
version = "3.10.2.1";
|
||||
sha256 = "02nllpg35i44chs5hi3kmv2kisxqlh27l5vs9aips2abphl0gl4i";
|
||||
libraryHaskellDepends = [
|
||||
array base bytestring Cabal Cabal-syntax containers edit-distance
|
||||
filepath mtl pretty transformers
|
||||
];
|
||||
testHaskellDepends = [
|
||||
base Cabal Cabal-syntax tasty tasty-hunit tasty-quickcheck
|
||||
];
|
||||
description = "The command-line interface for Cabal and Hackage";
|
||||
license = lib.licenses.bsd3;
|
||||
}) {};
|
||||
|
||||
"cabal-install-solver_3_12_1_0" = callPackage
|
||||
({ mkDerivation, array, base, bytestring, Cabal, Cabal-syntax
|
||||
, containers, directory, edit-distance, filepath, mtl, network-uri
|
||||
, pretty, tasty, tasty-hunit, tasty-quickcheck, text, transformers
|
||||
@ -58889,7 +58869,6 @@ self: {
|
||||
];
|
||||
description = "The command-line interface for Cabal and Hackage";
|
||||
license = lib.licenses.bsd3;
|
||||
hydraPlatforms = lib.platforms.none;
|
||||
}) {};
|
||||
|
||||
"cabal-lenses" = callPackage
|
||||
@ -261192,27 +261171,6 @@ self: {
|
||||
maintainers = [ lib.maintainers.thielema ];
|
||||
}) {};
|
||||
|
||||
"resolv_0_1_2_0" = callPackage
|
||||
({ mkDerivation, base, base16-bytestring, binary, bytestring
|
||||
, containers, directory, filepath, tasty, tasty-hunit
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "resolv";
|
||||
version = "0.1.2.0";
|
||||
sha256 = "0wa6wsh6i52q4ah2z0hgzlks325kigch4yniz0y15nw4skxbm8l1";
|
||||
revision = "6";
|
||||
editedCabalFile = "1qhl69hrvdby2wmk1ip0mr3ghq57zqk1n06qp768bbpdanrfvxx1";
|
||||
libraryHaskellDepends = [
|
||||
base base16-bytestring binary bytestring containers
|
||||
];
|
||||
testHaskellDepends = [
|
||||
base bytestring directory filepath tasty tasty-hunit
|
||||
];
|
||||
description = "Domain Name Service (DNS) lookup via the libresolv standard library routines";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
hydraPlatforms = lib.platforms.none;
|
||||
}) {};
|
||||
|
||||
"resolv" = callPackage
|
||||
({ mkDerivation, base, base16-bytestring, binary, bytestring
|
||||
, containers, directory, filepath, tasty, tasty-hunit
|
||||
|
@ -512,6 +512,20 @@ let
|
||||
# package sets (like Cabal, jailbreak-cabal) are
|
||||
# working as expected.
|
||||
cabal-install = lib.subtractLists [
|
||||
# It is recommended to use pkgs.cabal-install instead of cabal-install
|
||||
# from the package sets. Due to (transitively) requiring recent versions
|
||||
# of core packages, it is not always reasonable to get cabal-install to
|
||||
# work with older compilers.
|
||||
compilerNames.ghc8107
|
||||
compilerNames.ghc902
|
||||
compilerNames.ghc925
|
||||
compilerNames.ghc926
|
||||
compilerNames.ghc927
|
||||
compilerNames.ghc928
|
||||
compilerNames.ghc945
|
||||
compilerNames.ghc946
|
||||
compilerNames.ghc947
|
||||
compilerNames.ghc948
|
||||
compilerNames.ghc9101
|
||||
] released;
|
||||
Cabal_3_10_3_0 = released;
|
||||
|
Loading…
Reference in New Issue
Block a user