diff --git a/pkgs/applications/science/math/gap/default.nix b/pkgs/applications/science/math/gap/default.nix index 87f4fa12038..2c3e4d9917c 100644 --- a/pkgs/applications/science/math/gap/default.nix +++ b/pkgs/applications/science/math/gap/default.nix @@ -91,14 +91,31 @@ stdenv.mkDerivation rec { url = "https://github.com/gap-system/gap/commit/3361c172e6c5ff3bb3f01ba9d6f1dd4ad42cea80.patch"; sha256 = "1kwp9qnfvmlbpf1c3rs6j5m2jz22rj7a4hb5x1gj9vkpiyn5pdyj"; }) + + # Fix for locale specific tests causing issues. Already upstream. + # Backport of https://github.com/gap-system/gap/pull/4022 + # WHEN REMOVING: also remove the`rm tst/testinstall/strings.tst` line in + # `postPatch` below. That line is necessary since the patch is not intended + # for gap 4.10. + (fetchpatch { + name = "remove-locale-specific-tests.patch"; + url = "https://github.com/gap-system/gap/commit/c18b0c4215b5212a2cc4f305e2d5b94ba716bee8.patch"; + excludes = ["tst/testinstall/stringobj.tst"]; + sha256 = "1mz5b4mbw2jdd1ypp5s0dy6pp0jsvwsxr2dm4kbkls20r1r192sc"; + }) ]; + postPatch = '' + # File not covered by the remove-locale-specific-tests.patch patch above. + rm tst/testinstall/strings.tst + ''; + # "teststandard" is a superset of testinstall. It takes ~1h instead of ~1min. # tests are run twice, once with all packages loaded and once without # checkTarget = "teststandard"; doInstallCheck = true; - installCheckTarget = "testinstall"; + installCheckTarget = "check"; preInstallCheck = '' # gap tests check that the home directory exists @@ -119,16 +136,6 @@ stdenv.mkDerivation rec { ) ''; - postCheck = '' - # The testsuite doesn't exit with a non-zero exit code on failure. - # It leaves its logs in dev/log however. - - # grep for error messages - if grep ^##### dev/log/*; then - exit 1 - fi - ''; - postBuild = '' pushd pkg bash ../bin/BuildPackages.sh