From 26896ed13ac93969fc8e0b24bb344f8ba8a61ba5 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sat, 21 Dec 2024 03:43:37 +0100 Subject: [PATCH] jacinda: fix build by providing happy >= 2.1 This requires a few adjustments for happy's test suite due to https://github.com/haskell/happy/commit/10a0fe5ca52d76b1e592978c95d19f899e62bee7#diff-36b847ebf9c22d0651fe4856d7a8acb47ee2c483c79f1ccf0ed8c84889c9a394 --- pkgs/development/haskell-modules/configuration-common.nix | 3 ++- pkgs/development/haskell-modules/configuration-nix.nix | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 3fa77f28ef28..133aa01f0c2e 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -166,9 +166,10 @@ self: super: { # https://github.com/lspitzner/czipwith/issues/5 czipwith = doJailbreak super.czipwith; - # jacinda needs latest version of alex + # jacinda needs latest version of alex and happy jacinda = super.jacinda.override { alex = self.alex_3_5_1_0; + happy = self.happy_2_1_2; }; # 2024-07-09: rhine 1.4.* needs newer monad-schedule than stackage (and is only consumer) diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 4e140b2c5bb7..a677d36820ad 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -1327,6 +1327,14 @@ self: super: builtins.intersectAttrs super { ] ++ drv.testFlags or []; }) super.http-api-data-qq; + # Test have become more fussy in >= 2.0. We need to have which available for + # tests to succeed and the makefile no longer finds happy by itself. + happy_2_1_2 = overrideCabal (drv: { + buildTools = drv.buildTools or [ ] ++ [ pkgs.buildPackages.which ]; + preCheck = drv.preCheck or "" + '' + export PATH="$PWD/dist/build/happy:$PATH" + ''; + }) super.happy_2_1_2; # Additionally install documentation jacinda = overrideCabal (drv: { enableSeparateDocOutput = true;