From da5233bbc0044e2bb4f193a1d7a6b8be610c8f8a Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sat, 18 Feb 2023 19:34:27 +0100 Subject: [PATCH] haskell.packages.*.[cC]abal*: use core process where possible Annoyingly weird match since 9.2.4's process version is too old, but that should go away soon-ish anyways. Prevents mismatches in overrides. --- pkgs/development/haskell-modules/configuration-common.nix | 2 ++ pkgs/development/haskell-modules/configuration-nix.nix | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index bd6a31ae24b2..fd3ed967c0d0 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -29,6 +29,8 @@ self: super: { lib.optionalAttrs (lib.versionOlder self.ghc.version "9.4") { Cabal = cself.Cabal_3_8_1_0; Cabal-syntax = cself.Cabal-syntax_3_8_1_0; + } // lib.optionalAttrs (lib.versionOlder self.ghc.version "9.2.5") { + # GHC 9.2.5 starts shipping 1.6.16.0 process = cself.process_1_6_16_0; } // lib.optionalAttrs (lib.versions.majorMinor self.ghc.version == "8.10") { # Prevent dependency on doctest which causes an inconsistent dependency diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 37996aa3a5fe..50210cdccb3d 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -1053,10 +1053,12 @@ self: super: builtins.intersectAttrs super { hint = dontCheck super.hint; # Make sure that Cabal 3.8.* can be built as-is - Cabal_3_8_1_0 = doDistribute (super.Cabal_3_8_1_0.override { + Cabal_3_8_1_0 = doDistribute (super.Cabal_3_8_1_0.override ({ Cabal-syntax = self.Cabal-syntax_3_8_1_0; + } // lib.optionalAttrs (lib.versionOlder self.ghc.version "9.2.5") { + # Use process core package when possible process = self.process_1_6_16_0; - }); + })); # cabal-install switched to build type simple in 3.2.0.0 # as a result, the cabal(1) man page is no longer installed