diff options
author | maralorn <mail@maralorn.de> | 2024-02-26 12:50:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-26 12:50:27 +0100 |
commit | a95aa9cb4438a1bbbfc5f0e9a28393480f16f106 (patch) | |
tree | 58ffea603460b286c48793a61f176a5e8ceade43 /pkgs/development/haskell-modules/configuration-common.nix | |
parent | 4ca70ee28f699077afd5cf156f60f08aba75092d (diff) | |
parent | 72e03b91eaa7b2e631e6f642efdb538a5bcb29fa (diff) | |
download | nixlib-a95aa9cb4438a1bbbfc5f0e9a28393480f16f106.tar nixlib-a95aa9cb4438a1bbbfc5f0e9a28393480f16f106.tar.gz nixlib-a95aa9cb4438a1bbbfc5f0e9a28393480f16f106.tar.bz2 nixlib-a95aa9cb4438a1bbbfc5f0e9a28393480f16f106.tar.lz nixlib-a95aa9cb4438a1bbbfc5f0e9a28393480f16f106.tar.xz nixlib-a95aa9cb4438a1bbbfc5f0e9a28393480f16f106.tar.zst nixlib-a95aa9cb4438a1bbbfc5f0e9a28393480f16f106.zip |
Merge pull request #287794 from wolfgangwalther/dont-check-if
haskellPackages: Avoid re-enabling previously disabled tests
Diffstat (limited to 'pkgs/development/haskell-modules/configuration-common.nix')
-rw-r--r-- | pkgs/development/haskell-modules/configuration-common.nix | 86 |
1 files changed, 42 insertions, 44 deletions
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index ff12ce41febf..ccee658a8cc6 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -144,18 +144,18 @@ self: super: { # https://github.com/lspitzner/czipwith/issues/5 czipwith = doJailbreak super.czipwith; - # Deal with infinite and NaN values generated by QuickCheck-2.14.3 - aeson = overrideCabal { + aeson = # aeson's test suite includes some tests with big numbers that fail on 32bit # https://github.com/haskell/aeson/issues/1060 - doCheck = !pkgs.stdenv.hostPlatform.is32bit; - } (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); + dontCheckIf pkgs.stdenv.hostPlatform.is32bit + # Deal with infinite and NaN values generated by QuickCheck-2.14.3 + (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); # Lifts bounds on hoauth2, skylighting, and json adds compat with mtl >= 2.3 gitit = appendPatches [ @@ -1330,12 +1330,12 @@ self: super: { # https://github.com/mgajda/json-autotype/issues/25 json-autotype = dontCheck super.json-autotype; - # Requires pg_ctl command during tests - beam-postgres = overrideCabal (drv: { + beam-postgres = lib.pipe super.beam-postgres [ + # Requires pg_ctl command during tests + (addTestToolDepends [pkgs.postgresql]) # https://github.com/NixOS/nixpkgs/issues/198495 - doCheck = pkgs.postgresql.doCheck; - testToolDepends = (drv.testToolDepends or []) ++ [pkgs.postgresql]; - }) super.beam-postgres; + (dontCheckIf (!pkgs.postgresql.doCheck)) + ]; # PortMidi needs an environment variable to have ALSA find its plugins: # https://github.com/NixOS/nixpkgs/issues/6860 @@ -1376,8 +1376,6 @@ self: super: { sed -i test/PostgreSQL/Test.hs \ -e s^host=localhost^^ ''; - # https://github.com/NixOS/nixpkgs/issues/198495 - doCheck = pkgs.postgresql.doCheck; # Match the test suite defaults (or hardcoded values?) preCheck = drv.preCheck or "" + '' PGUSER=esqutest @@ -1392,7 +1390,8 @@ self: super: { pkgs.postgresqlTestHook ]; }) - super.esqueleto; + # https://github.com/NixOS/nixpkgs/issues/198495 + (dontCheckIf (!pkgs.postgresql.doCheck) super.esqueleto); # Requires API keys to run tests algolia = dontCheck super.algolia; @@ -1494,14 +1493,11 @@ self: super: { sed -i test/PgInit.hs \ -e s^'host=" <> host <> "'^^ ''; - doCheck = - # https://github.com/commercialhaskell/stackage/issues/6884 - # persistent-postgresql-2.13.5.1 needs persistent-test >= 2.13.1.3 which - # is incompatible with the stackage version of persistent, so the tests - # are disabled temporarily. - false - # https://github.com/NixOS/nixpkgs/issues/198495 - && pkgs.postgresql.doCheck; + # https://github.com/commercialhaskell/stackage/issues/6884 + # persistent-postgresql-2.13.5.1 needs persistent-test >= 2.13.1.3 which + # is incompatible with the stackage version of persistent, so the tests + # are disabled temporarily. + doCheck = false; preCheck = drv.preCheck or "" + '' PGDATABASE=test PGUSER=test @@ -1511,7 +1507,8 @@ self: super: { pkgs.postgresqlTestHook ]; }) - super.persistent-postgresql; + # https://github.com/NixOS/nixpkgs/issues/198495 + (dontCheckIf (!pkgs.postgresql.doCheck) super.persistent-postgresql); # Test suite requires a later version of persistent-test which depends on persistent 2.14 # https://github.com/commercialhaskell/stackage/issues/6884 @@ -1672,21 +1669,24 @@ self: super: { hasura-ekg-json = super.hasura-ekg-json.override { ekg-core = self.hasura-ekg-core; }; - pg-client = overrideCabal (drv: { - librarySystemDepends = with pkgs; [ postgresql krb5.dev openssl.dev ]; - testToolDepends = drv.testToolDepends or [] ++ [ - pkgs.postgresql pkgs.postgresqlTestHook + pg-client = lib.pipe + (super.pg-client.override { + resource-pool = self.hasura-resource-pool; + ekg-core = self.hasura-ekg-core; + }) [ + (overrideCabal (drv: { + librarySystemDepends = with pkgs; [ postgresql krb5.dev openssl.dev ]; + testToolDepends = drv.testToolDepends or [] ++ [ + pkgs.postgresql pkgs.postgresqlTestHook + ]; + preCheck = drv.preCheck or "" + '' + # empty string means use default connection + export DATABASE_URL="" + ''; + })) + # https://github.com/NixOS/nixpkgs/issues/198495 + (dontCheckIf (!pkgs.postgresql.doCheck)) ]; - # https://github.com/NixOS/nixpkgs/issues/198495 - doCheck = pkgs.postgresql.doCheck; - preCheck = drv.preCheck or "" + '' - # empty string means use default connection - export DATABASE_URL="" - ''; - }) (super.pg-client.override { - resource-pool = self.hasura-resource-pool; - ekg-core = self.hasura-ekg-core; - }); hcoord = overrideCabal (drv: { # Remove when https://github.com/danfran/hcoord/pull/8 is merged. @@ -2145,9 +2145,7 @@ self: super: { # Tests need to lookup target triple x86_64-unknown-linux # https://github.com/llvm-hs/llvm-hs/issues/334 - llvm-hs = overrideCabal { - doCheck = pkgs.stdenv.targetPlatform.system == "x86_64-linux"; - } super.llvm-hs; + llvm-hs = dontCheckIf (pkgs.stdenv.targetPlatform.system != "x86_64-linux") super.llvm-hs; # Fix build with bytestring >= 0.11 (GHC 9.2) # https://github.com/llvm-hs/llvm-hs/pull/389 |