git.iko.soy/typeable/nixpkgs
on master help sign in
gap: 4r8p10 -> 4.10.0 (#53037)

This new version also has a libgap replacement, so after the next sage update gap-libgap-compatible and libgap won't be necessary anymore.

commit8cd7b5aab37a745664723f10df6e2797f8ec6b12 authorTimo Kaufmann <timokau@zoho.com> dateSat 29 Dec 2018, 16:05 (8 years ago) parentb783cc7
2 files changed+72−28
pkgs/applications/science/math/gap/default.nix+65−27 pkgs/top-level/all-packages.nix+7−1
pkgs/applications/science/math/gap/default.nix+65−27
@@ -1,6 +1,8 @@
11{ stdenv
2+, lib
23, fetchurl
34, fetchpatch
5+, makeWrapper
46, m4
57, gmp
68# don't remove any packages -- results in a ~1.3G size increase
@@ -11,24 +13,17 @@
1113stdenv.mkDerivation rec {
1214 pname = "gap";
1315 # https://www.gap-system.org/Releases/
14− # newer versions (4.9.0) are available, but still considered beta (https://github.com/gap-system/gap/wiki/GAP-4.9-release-notes)
15− version = "4r8p10";
16− pkgVer = "2018_01_15-13_02";
17− name = "${pname}-${version}";
18−
19− src = let
20− # 4r8p10 -> 48
21− majorminor = stdenv.lib.replaceStrings ["r"] [""] (
22− builtins.head (stdenv.lib.splitString "p" version) # 4r8p10 -> 4r8
23− );
24− in
25− fetchurl {
26− url = "https://www.gap-system.org/pub/gap/gap${majorminor}/tar.bz2/gap${version}_${pkgVer}.tar.bz2";
27− sha256 = "0wzfdjnn6sfiaizbk5c7x44rhbfayis4lf57qbqqg84c7dqlwr6f";
16+ version = "4.10.0";
17+
18+ src = fetchurl {
19+ url = "https://www.gap-system.org/pub/gap/gap-${lib.versions.major version}.${lib.versions.minor version}/tar.bz2/gap-${version}.tar.bz2";
20+ sha256 = "1dmb8v4p7j1nnf7sx8sg54b49yln36bi9acwp7w1d3a1nxj17ird";
2821 };
2922
3023 # remove all non-essential packages (which take up a lot of space)
31− preConfigure = stdenv.lib.optionalString (!keepAllPackages) ''
24+ preConfigure = ''
25+ patchShebangs .
26+ '' + lib.optionalString (!keepAllPackages) ''
3227 find pkg -type d -maxdepth 1 -mindepth 1 \
3328 -not -name 'GAPDoc-*' \
3429 -not -name 'autpgrp*' \
@@ -37,26 +32,63 @@ stdenv.mkDerivation rec {
3732 '';
3833
3934 configureFlags = [ "--with-gmp=system" ];
40− buildInputs = [ m4 gmp ];
35+
36+ buildInputs = [
37+ m4
38+ gmp
39+ ];
40+
41+ nativeBuildInputs = [
42+ makeWrapper
43+ ];
4144
4245 patches = [
43− # fix infinite loop in writeandcheck() when writing an error message fails.
46+ # bugfix: https://github.com/gap-system/gap/pull/3102
47+ (fetchpatch {
48+ name = "fix-infinite-loop-in-writeandcheck.patch";
49+ url = "https://git.sagemath.org/sage.git/plain/build/pkgs/gap/patches/0001-a-version-of-the-writeandcheck.patch-from-Sage-that-.patch?id=5e61d7b6a0da3aa53d8176fa1fb9353cc559b098";
50+ sha256 = "1zkv8bbiw3jdn54sqqvfkdkfsd7jxzq0bazwsa14g4sh2265d28j";
51+ })
52+
53+ # needed for libgap (sage): https://github.com/gap-system/gap/pull/3043
4454 (fetchpatch {
45− url = "https://git.sagemath.org/sage.git/plain/build/pkgs/gap/patches/writeandcheck.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba";
46− sha256 = "1r1511x4kc2i2mbdq1b61rb6p3misvkf1v5qy3z6fmn6vqwziaz1";
55+ name = "add-error-messages-helper.patch";
56+ url = "https://git.sagemath.org/sage.git/plain/build/pkgs/gap/patches/0002-kernel-add-helper-function-for-writing-error-message.patch?id=5e61d7b6a0da3aa53d8176fa1fb9353cc559b098";
57+ sha256 = "0c4ry5znb6hwwp8ld6k62yw8w6cqldflw3x49bbzizbmipfpidh5";
58+ })
59+
60+ # needed for libgap (sage): https://github.com/gap-system/gap/pull/3096
61+ (fetchpatch {
62+ name = "gap-enter.patch";
63+ url = "https://git.sagemath.org/sage.git/plain/build/pkgs/gap/patches/0003-Prototype-for-GAP_Enter-Leave-macros-to-bracket-use-.patch?id=5e61d7b6a0da3aa53d8176fa1fb9353cc559b098";
64+ sha256 = "12fg8mb8rm6khsz1r4k3k26jrkx4q1rv13hcrfnlhn0m7iikvc3q";
4765 })
4866 ];
4967
50− doCheck = true;
51− checkTarget = "testinstall";
5268 # "teststandard" is a superset of testinstall. It takes ~1h instead of ~1min.
5369 # tests are run twice, once with all packages loaded and once without
5470 # checkTarget = "teststandard";
5571
56− preCheck = ''
72+ doInstallCheck = true;
73+ installCheckTarget = "testinstall";
74+
75+ preInstallCheck = ''
5776 # gap tests check that the home directory exists
5877 export HOME="$TMP/gap-home"
5978 mkdir -p "$HOME"
79+
80+ # make sure gap is in PATH
81+ export PATH="$out/bin:$PATH"
82+
83+ # make sure we don't accidentally use the wrong gap binary
84+ rm -r bin
85+
86+ # like the defaults the Makefile, but use gap from PATH instead of the
87+ # one from builddir
88+ installCheckFlagsArray+=(
89+ "TESTGAP=gap --quitonbreak -b -m 100m -o 1g -q -x 80 -r -A"
90+ "TESTGAPauto=gap --quitonbreak -b -m 100m -o 1g -q -x 80 -r"
91+ )
6092 '';
6193
6294 postCheck = ''
@@ -78,14 +110,20 @@ stdenv.mkDerivation rec {
78110 installPhase = ''
79111 mkdir -p "$out/bin" "$out/share/gap/"
80112
81− cp -r . "$out/share/gap/build-dir"
113+ mkdir -p "$out/share/gap"
114+ echo "Copying files to target directory"
115+ cp -ar . "$out/share/gap/build-dir"
82116
83− sed -e "/GAP_DIR=/aGAP_DIR='$out/share/gap/build-dir/'" -i "$out/share/gap/build-dir/bin/gap.sh"
117+ makeWrapper "$out/share/gap/build-dir/bin/gap.sh" "$out/bin/gap" \
118+ --set GAP_DIR $out/share/gap/build-dir
119+ '';
84120
85− ln -s "$out/share/gap/build-dir/bin/gap.sh" "$out/bin/gap"
121+ preFixup = ''
122+ # patchelf won't strip references to the build dir if it still exists
123+ rm -rf pkg
86124 '';
87125
88− meta = with stdenv.lib; {
126+ meta = with lib; {
89127 description = "Computational discrete algebra system";
90128 maintainers = with maintainers;
91129 [
@@ -96,7 +134,7 @@ stdenv.mkDerivation rec {
96134 # keeping all packages increases the package size considerably, wchich
97135 # is why a local build is preferable in that situation. The timeframe
98136 # is reasonable and that way the binary cache doesn't get overloaded.
99− hydraPlatforms = stdenv.lib.optionals (!keepAllPackages) meta.platforms;
137+ hydraPlatforms = lib.optionals (!keepAllPackages) meta.platforms;
100138 license = licenses.gpl2;
101139 homepage = http://gap-system.org/;
102140 };
pkgs/top-level/all-packages.nix+7−1
@@ -10806,12 +10806,18 @@ in
1080610806 url = "https://www.gap-system.org/pub/gap/gap48/tar.bz2/gap${version}_${pkgVer}.tar.bz2";
1080710807 sha256 = "19n2p1mdg33s2x9rs51iak7rgndc1cwr56jyqnah0g1ydgg1yh6b";
1080810808 };
10809− patches = (oldAttrs.patches or []) ++ [
10809+ patches = [
1081010810 # don't install any packages by default (needed for interop with libgap, probably obsolete with 4r10
1081110811 (fetchpatch {
1081210812 url = "https://git.sagemath.org/sage.git/plain/build/pkgs/gap/patches/nodefaultpackages.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba";
1081310813 sha256 = "1xwj766m3axrxbkyx13hy3q8s2wkqxy3m6mgpwq3c3n4vk3v416v";
1081410814 })
10815+
10816+ # fix infinite loop in writeandcheck() when writing an error message fails.
10817+ (fetchpatch {
10818+ url = "https://git.sagemath.org/sage.git/plain/build/pkgs/gap/patches/writeandcheck.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba";
10819+ sha256 = "1r1511x4kc2i2mbdq1b61rb6p3misvkf1v5qy3z6fmn6vqwziaz1";
10820+ })
1081510821 ];
1081610822 });
1081710823 libgap = callPackage ../development/libraries/libgap { };