From 4e15d40d2dbc44a9d34e63406a180c1b44f0c971 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Thu, 8 Jun 2023 14:35:21 +0200 Subject: [PATCH] haskellPackages.aeson: fix test suite for QuickCheck-2.14.3 --- .../haskell-modules/configuration-common.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index bc0e4da4308f..ba82e57ed366 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -161,7 +161,7 @@ self: super: { # Workaround almost guaranteed floating point errors in test suite with quickcheck 2.14.3 # https://github.com/haskell/vector/issues/460 (pkgs.fetchpatch { - name = "quickcheck-2.14.3-float-workaround.patch"; + name = "vector-quickcheck-2.14.3-float-workaround.patch"; url = "https://github.com/haskell/vector/commit/df8dd8e8e84005aa6b187b03cd502f3c6e18cf3c.patch"; sha256 = "040wg8mqlkdnrl5axy9wk0mlpn8rpc4vc4afpxignj9i7yc4pfjj"; stripLen = 1; @@ -175,6 +175,15 @@ self: super: { testFlags = drv.testFlags or [] ++ [ "-p" "! /Kahan.t_sum_shifted/" ]; }) super.math-functions; + # Deal with infinite and NaN values generated by QuickCheck-2.14.3 + aeson = appendPatches [ + (pkgs.fetchpatch { + name = "aeson-quickcheck-2.14.3-double-workaround.patch"; + url = "https://github.com/haskell/aeson/commit/58766a1916b4980792763bab74f0c86e2a7ebf20.patch"; + sha256 = "1jk2xyi9g6dfjsi6hvpvkpmag3ivimipwy1izpbidf3wvc9cixs3"; + }) + ] super.aeson; + # There are numerical tests on random data, that may fail occasionally lapack = dontCheck super.lapack;