From 799b5efeef84ec2eecaae0b4b4c778fb15c5f67f Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sun, 7 Jan 2024 01:40:34 +0100 Subject: haskellPackages.fourmolu*: enable tests for all versions Clean up override for removed version. --- .../haskell-modules/configuration-ghc-9.4.x.nix | 4 +-- .../haskell-modules/configuration-ghc-9.6.x.nix | 4 +-- .../haskell-modules/configuration-nix.nix | 30 ++++++++++++++-------- 3 files changed, 21 insertions(+), 17 deletions(-) (limited to 'pkgs/development') diff --git a/pkgs/development/haskell-modules/configuration-ghc-9.4.x.nix b/pkgs/development/haskell-modules/configuration-ghc-9.4.x.nix index 66b9dba53ac5..f4daa4648d83 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.4.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.4.x.nix @@ -116,9 +116,7 @@ in { in lib.mapAttrs (_: pkg: doDistribute (pkg.overrideScope hls_overlay)) { haskell-language-server = allowInconsistentDependencies super.haskell-language-server; - # Tests fail due to the newly-build fourmolu not being in PATH - # https://github.com/fourmolu/fourmolu/issues/231 - fourmolu = dontCheck super.fourmolu_0_14_0_0; + fourmolu = self.fourmolu_0_14_0_0; ormolu = self.generateOptparseApplicativeCompletions [ "ormolu" ] (enableSeparateBinOutput super.ormolu_0_7_2_0); hlint = super.hlint_3_6_1; stylish-haskell = super.stylish-haskell; diff --git a/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix b/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix index 18923ac9a310..63029222cde4 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix @@ -95,9 +95,7 @@ self: super: { ghc-lib-parser = doDistribute self.ghc-lib-parser_9_6_3_20231121; ghc-lib-parser-ex = doDistribute self.ghc-lib-parser-ex_9_6_0_2; - # Tests fail due to the newly-build fourmolu not being in PATH - # https://github.com/fourmolu/fourmolu/issues/231 - fourmolu = dontCheck super.fourmolu_0_14_0_0; + fourmolu = doDistribute self.fourmolu_0_14_0_0; ormolu = self.generateOptparseApplicativeCompletions [ "ormolu" ] (enableSeparateBinOutput super.ormolu_0_7_2_0); hlint = super.hlint_3_6_1; diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index c37093e7020f..aee56bed3ece 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -1216,18 +1216,26 @@ self: super: builtins.intersectAttrs super { }) super.procex; # Test suite wants to run main executable - fourmolu = overrideCabal (drv: { - preCheck = drv.preCheck or "" + '' - export PATH="$PWD/dist/build/fourmolu:$PATH" - ''; - }) super.fourmolu; + # https://github.com/fourmolu/fourmolu/issues/231 + inherit ( + let + fourmoluTestFix = overrideCabal (drv: { + preCheck = drv.preCheck or "" + '' + export PATH="$PWD/dist/build/fourmolu:$PATH" + ''; + hydraPlatforms = lib.platforms.all; # also test versioned attributes + }); + in - # Test suite wants to run main executable - fourmolu_0_10_1_0 = overrideCabal (drv: { - preCheck = drv.preCheck or "" + '' - export PATH="$PWD/dist/build/fourmolu:$PATH" - ''; - }) super.fourmolu_0_10_1_0; + { + fourmolu = fourmoluTestFix super.fourmolu; + fourmolu_0_14_0_0 = fourmoluTestFix super.fourmolu_0_14_0_0; + fourmolu_0_14_1_0 = fourmoluTestFix super.fourmolu_0_14_1_0; + }) + fourmolu + fourmolu_0_14_0_0 + fourmolu_0_14_1_0 + ; # Test suite needs to execute 'disco' binary disco = overrideCabal (drv: { -- cgit 1.4.1