From 0b5334887f1aad2ddd47dc3378c58e85f53b7204 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sat, 29 Jul 2023 22:40:54 +0200 Subject: [PATCH] haskellPackages.hercules-ci-cnix-store: don't use overrideAttrs overrideAttrs can have counter intuitive effects when used in conjunction with the tools offered by haskell.lib. --- .../haskell-modules/configuration-nix.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index db35bc84c9cb..0379794a85e8 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -1089,9 +1089,15 @@ self: super: builtins.intersectAttrs super { hercules-ci-agent = super.hercules-ci-agent.override { nix = self.hercules-ci-cnix-store.passthru.nixPackage; }; hercules-ci-cnix-expr = addTestToolDepend pkgs.git (super.hercules-ci-cnix-expr.override { nix = self.hercules-ci-cnix-store.passthru.nixPackage; }); - hercules-ci-cnix-store = (super.hercules-ci-cnix-store.override { nix = self.hercules-ci-cnix-store.passthru.nixPackage; }).overrideAttrs (_: { - passthru.nixPackage = pkgs.nixVersions.nix_2_16; - }); + hercules-ci-cnix-store = overrideCabal + (old: { + passthru = old.passthru or { } // { + nixPackage = pkgs.nixVersions.nix_2_16; + }; + }) + (super.hercules-ci-cnix-store.override { + nix = self.hercules-ci-cnix-store.passthru.nixPackage; + }); # the testsuite fails because of not finding tsc without some help aeson-typescript = overrideCabal (drv: {