diff --git a/maintainers/scripts/haskell/update-stackage.sh b/maintainers/scripts/haskell/update-stackage.sh index fdb1cd184f69..2430edbdd420 100755 --- a/maintainers/scripts/haskell/update-stackage.sh +++ b/maintainers/scripts/haskell/update-stackage.sh @@ -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' \ diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 93b0f8f80557..beb3f411d8a1 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -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 diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml index 25acdf1e4a46..9022f854f307 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml @@ -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 diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/stackage.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/stackage.yaml index 0bdd16ed7698..40c5f7fc8cf0 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/stackage.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/stackage.yaml @@ -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 diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 9634ee6bb4ce..7dee3c13ffa6 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -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 diff --git a/pkgs/top-level/release-haskell.nix b/pkgs/top-level/release-haskell.nix index 2b5e27bd5460..7774800660e6 100644 --- a/pkgs/top-level/release-haskell.nix +++ b/pkgs/top-level/release-haskell.nix @@ -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;