From 1d1668a995abb6ea578c8f3c70f8e5d3618fc94d Mon Sep 17 00:00:00 2001 From: Sander Date: Tue, 21 Oct 2025 13:17:25 +0200 Subject: [PATCH 1/2] cachix: refactor overrides --- .../haskell-modules/configuration-common.nix | 77 ++++++++++--------- 1 file changed, 40 insertions(+), 37 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index d6bd8bc4302a..0587161a6a68 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -747,43 +747,6 @@ with haskellLib; # https://github.com/illia-shkroba/pfile/issues/2 pfile = doJailbreak super.pfile; - # Manually maintained - cachix-api = overrideCabal (drv: { - # FIXME: should use overrideSrc - version = "1.7.9"; - src = pkgs.fetchFromGitHub { - owner = "cachix"; - repo = "cachix"; - tag = "v1.7.9"; - hash = "sha256-R0W7uAg+BLoHjMRMQ8+oiSbTq8nkGz5RDpQ+ZfxxP3A="; - }; - postUnpack = "sourceRoot=$sourceRoot/cachix-api"; - }) super.cachix-api; - cachix = ( - overrideCabal - (drv: { - # FIXME: should use overrideSrc - version = "1.7.9"; - src = pkgs.fetchFromGitHub { - owner = "cachix"; - repo = "cachix"; - tag = "v1.7.9"; - hash = "sha256-R0W7uAg+BLoHjMRMQ8+oiSbTq8nkGz5RDpQ+ZfxxP3A="; - }; - postUnpack = "sourceRoot=$sourceRoot/cachix"; - # Fix ambiguous 'show' reference: https://github.com/cachix/cachix/pull/704 - postPatch = '' - sed -i 's/<> show i/<> Protolude.show i/' src/Cachix/Client/NixVersion.hs - ''; - }) - ( - super.cachix.override { - nix = self.hercules-ci-cnix-store.nixPackage; - hnix-store-core = self.hnix-store-core_0_8_0_0; - } - ) - ); - # Overly strict bounds on postgresql-simple (< 0.7), tasty (< 1.5) and tasty-quickcheck (< 0.11) # https://github.com/tdammers/migrant/pull/5 migrant-core = doJailbreak super.migrant-core; @@ -4070,3 +4033,43 @@ with haskellLib; ); } ) + +# cachix: manually maintained +// ( + let + version = "1.7.9"; + + src = pkgs.fetchFromGitHub { + owner = "cachix"; + repo = "cachix"; + tag = "v${version}"; + hash = "sha256-R0W7uAg+BLoHjMRMQ8+oiSbTq8nkGz5RDpQ+ZfxxP3A="; + }; + in + { + cachix-api = overrideSrc { + inherit version; + src = src + "/cachix-api"; + } super.cachix-api; + + cachix = lib.pipe super.cachix [ + (overrideSrc { + inherit version; + src = src + "/cachix"; + }) + # Fix ambiguous 'show' reference: https://github.com/cachix/cachix/pull/704 + (overrideCabal (_: { + postPatch = '' + sed -i 's/<> show i/<> Protolude.show i/' src/Cachix/Client/NixVersion.hs + ''; + })) + ( + drv: + drv.override { + nix = self.hercules-ci-cnix-store.nixPackage; + hnix-store-core = self.hnix-store-core_0_8_0_0; + } + ) + ]; + } +) From dd7d99efa9cbc19260910a288708f683385c9f86 Mon Sep 17 00:00:00 2001 From: Sander Date: Tue, 21 Oct 2025 13:25:33 +0200 Subject: [PATCH 2/2] cachix: 1.7.9 -> 1.9.1 --- .../haskell-modules/configuration-common.nix | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 0587161a6a68..b42dbb5a4b33 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -4034,16 +4034,17 @@ with haskellLib; } ) -# cachix: manually maintained +# Cachix packages +# Manually maintained // ( let - version = "1.7.9"; + version = "1.9.1"; src = pkgs.fetchFromGitHub { owner = "cachix"; repo = "cachix"; tag = "v${version}"; - hash = "sha256-R0W7uAg+BLoHjMRMQ8+oiSbTq8nkGz5RDpQ+ZfxxP3A="; + hash = "sha256-IwnNtbNVrlZIHh7h4Wz6VP0Furxg9Hh0ycighvL5cZc="; }; in { @@ -4057,12 +4058,9 @@ with haskellLib; inherit version; src = src + "/cachix"; }) - # Fix ambiguous 'show' reference: https://github.com/cachix/cachix/pull/704 - (overrideCabal (_: { - postPatch = '' - sed -i 's/<> show i/<> Protolude.show i/' src/Cachix/Client/NixVersion.hs - ''; - })) + (addBuildDepends [ + self.pqueue + ]) ( drv: drv.override {