From a4c76b970c5060fad9ccb4009cce891b17c63bce Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Wed, 27 May 2020 22:00:21 +0200 Subject: [PATCH 1/7] gap: use the `check` target for install checks As suggested by Max Horn. This exists since gap 4.10 and will only run the install checks once while also exiting with an appropriate exit code. This new check has uncovered some test failures, which are harmless and actually disabled in a future gap release. The error-detection code for the previous test target was probably broken. --- .../applications/science/math/gap/default.nix | 29 ++++++++++++------- 1 file changed, 18 insertions(+), 11 deletions(-) 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 From c269b51c38b7262aff38f82adb9ca6592b8910e8 Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Thu, 28 May 2020 15:53:56 +0200 Subject: [PATCH 2/7] gap: move to new source URL GAP downloads moved to a new subdomain. The old one still redirects, but the new one is the "source of truth" so we should switch to that. --- pkgs/applications/science/math/gap/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/science/math/gap/default.nix b/pkgs/applications/science/math/gap/default.nix index 2c3e4d9917c..52554e9af36 100644 --- a/pkgs/applications/science/math/gap/default.nix +++ b/pkgs/applications/science/math/gap/default.nix @@ -64,7 +64,7 @@ stdenv.mkDerivation rec { version = "4.10.2"; src = fetchurl { - url = "https://www.gap-system.org/pub/gap/gap-${lib.versions.major version}.${lib.versions.minor version}/tar.bz2/gap-${version}.tar.bz2"; + url = "https://files.gap-system.org/gap-${lib.versions.major version}.${lib.versions.minor version}/tar.bz2/gap-${version}.tar.bz2"; sha256 = "0cp6ddk0469zzv1m1vair6gm27ic6c5m77ri8rn0znq3gaps6x94"; }; From e2e45e163c3d00ad977a2491da813e72b70f7b20 Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Thu, 28 May 2020 15:55:07 +0200 Subject: [PATCH 3/7] gap: remove m4 dependency No longer necessary, since the build system was significantly overhauled / replaced by Max Horn. --- pkgs/applications/science/math/gap/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/applications/science/math/gap/default.nix b/pkgs/applications/science/math/gap/default.nix index 52554e9af36..280288754f2 100644 --- a/pkgs/applications/science/math/gap/default.nix +++ b/pkgs/applications/science/math/gap/default.nix @@ -3,7 +3,6 @@ , fetchurl , fetchpatch , makeWrapper -, m4 , gmp # one of # - "minimal" (~400M): @@ -76,7 +75,6 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-gmp=system" ]; buildInputs = [ - m4 gmp ]; From 9e245a0878478dc45232100cc4c81fd0de747030 Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Thu, 28 May 2020 15:57:31 +0200 Subject: [PATCH 4/7] gap: fix comment typo --- pkgs/applications/science/math/gap/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/science/math/gap/default.nix b/pkgs/applications/science/math/gap/default.nix index 280288754f2..0b69c00710c 100644 --- a/pkgs/applications/science/math/gap/default.nix +++ b/pkgs/applications/science/math/gap/default.nix @@ -175,9 +175,9 @@ stdenv.mkDerivation rec { ]; platforms = platforms.all; broken = stdenv.isDarwin; - # keeping all packages increases the package size considerably, wchich - # is why a local build is preferable in that situation. The timeframe - # is reasonable and that way the binary cache doesn't get overloaded. + # keeping all packages increases the package size considerably, which is + # why a local build is preferable in that situation. The timeframe is + # reasonable and that way the binary cache doesn't get overloaded. hydraPlatforms = lib.optionals (!keepAllPackages) meta.platforms; license = licenses.gpl2; homepage = "http://gap-system.org/"; From f15c8165848d804ba86fa5c1715997e27ebbe990 Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Thu, 28 May 2020 15:58:41 +0200 Subject: [PATCH 5/7] gap: use https for the homepage --- pkgs/applications/science/math/gap/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/science/math/gap/default.nix b/pkgs/applications/science/math/gap/default.nix index 0b69c00710c..079051cc34d 100644 --- a/pkgs/applications/science/math/gap/default.nix +++ b/pkgs/applications/science/math/gap/default.nix @@ -180,6 +180,6 @@ stdenv.mkDerivation rec { # reasonable and that way the binary cache doesn't get overloaded. hydraPlatforms = lib.optionals (!keepAllPackages) meta.platforms; license = licenses.gpl2; - homepage = "http://gap-system.org/"; + homepage = "https://www.gap-system.org"; }; } From d689f3fe7298cea3a922a3afc0af7f4dc3f1a8c8 Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Thu, 28 May 2020 16:06:34 +0200 Subject: [PATCH 6/7] gap: add readline support Technically optional but strongly recommended from upstream. Replaces their own implementation for input parsing. --- pkgs/applications/science/math/gap/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/applications/science/math/gap/default.nix b/pkgs/applications/science/math/gap/default.nix index 079051cc34d..a2432e9827c 100644 --- a/pkgs/applications/science/math/gap/default.nix +++ b/pkgs/applications/science/math/gap/default.nix @@ -3,6 +3,7 @@ , fetchurl , fetchpatch , makeWrapper +, readline , gmp # one of # - "minimal" (~400M): @@ -75,6 +76,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-gmp=system" ]; buildInputs = [ + readline gmp ]; From 6579f814cfd2bcaf277d33edab9b6ee7409bd82b Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Thu, 28 May 2020 16:07:38 +0200 Subject: [PATCH 7/7] gap: remove explicit configreFlags System gmp is now the default. --- pkgs/applications/science/math/gap/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/applications/science/math/gap/default.nix b/pkgs/applications/science/math/gap/default.nix index a2432e9827c..04a49becc97 100644 --- a/pkgs/applications/science/math/gap/default.nix +++ b/pkgs/applications/science/math/gap/default.nix @@ -73,8 +73,6 @@ stdenv.mkDerivation rec { patchShebangs . ''; - configureFlags = [ "--with-gmp=system" ]; - buildInputs = [ readline gmp