gap: 4.11.1 -> 4.12.1

This commit is contained in:
Mauricio Collares 2022-09-22 23:32:58 -03:00
parent 4eb3b7c909
commit 90eca1d362

View file

@ -4,6 +4,7 @@
, makeWrapper , makeWrapper
, readline , readline
, gmp , gmp
, pari
, zlib , zlib
# one of # one of
# - "minimal" (~400M): # - "minimal" (~400M):
@ -23,27 +24,31 @@ let
# packages absolutely required for gap to start # packages absolutely required for gap to start
# `*` represents the version where applicable # `*` represents the version where applicable
requiredPackages = [ requiredPackages = [
"GAPDoc-*" "gapdoc"
"primgrp-*" "primgrp"
"SmallGrp-*" "smallgrp"
"transgrp" "transgrp"
]; ];
# packages autoloaded by default if available # packages autoloaded by default if available, and their dependencies
autoloadedPackages = [ autoloadedPackages = [
"atlasrep" "atlasrep"
"autpgrp-*" "autpgrp"
"alnuth-*" "alnuth"
"crisp-*" "crisp"
"ctbllib-*" "ctbllib"
"FactInt-*" "factint"
"fga" "fga"
"irredsol-*" "irredsol"
"laguna-*" "laguna"
"polenta-*" "polenta"
"polycyclic-*" "polycyclic"
"resclasses-*" "resclasses"
"sophus-*" "sophus"
"tomlib-*" "tomlib"
"autodoc" # dependency of atlasrep
"io" # used by atlasrep to fetch data from online sources
"radiroot" # dependency of polenta
"utils" # dependency of atlasrep
]; ];
keepAll = keepAllPackages || (packageSet == "full"); keepAll = keepAllPackages || (packageSet == "full");
packagesToKeep = requiredPackages ++ lib.optionals (packageSet == "standard") autoloadedPackages; packagesToKeep = requiredPackages ++ lib.optionals (packageSet == "standard") autoloadedPackages;
@ -61,11 +66,11 @@ in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "gap"; pname = "gap";
# https://www.gap-system.org/Releases/ # https://www.gap-system.org/Releases/
version = "4.11.1"; version = "4.12.1";
src = fetchurl { src = fetchurl {
url = "https://github.com/gap-system/gap/releases/download/v${version}/gap-${version}.tar.gz"; url = "https://github.com/gap-system/gap/releases/download/v${version}/gap-${version}.tar.gz";
sha256 = "sha256-ZjXF2n2CdV+DOUhrnKwzdm9YcS8pfoI0+6QIGJAuowQ="; sha256 = "sha256-+evvEe4xshDONuPHCWB0K04lMoK71ScK3JMkJzySsBY=";
}; };
# remove all non-essential packages (which take up a lot of space) # remove all non-essential packages (which take up a lot of space)
@ -83,9 +88,14 @@ stdenv.mkDerivation rec {
makeWrapper makeWrapper
]; ];
# "teststandard" is a superset of testinstall. It takes ~1h instead of ~1min. propagatedBuildInputs = [
# tests are run twice, once with all packages loaded and once without pari # used at runtime by the alnuth package
# checkTarget = "teststandard"; ];
# "teststandard" is a superset of the tests run by "check". it takes ~20min
# instead of ~1min. tests are run twice, once with all packages loaded and
# once without.
# installCheckTarget = "teststandard";
doInstallCheck = true; doInstallCheck = true;
installCheckTarget = "check"; installCheckTarget = "check";
@ -104,34 +114,28 @@ stdenv.mkDerivation rec {
# like the defaults the Makefile, but use gap from PATH instead of the # like the defaults the Makefile, but use gap from PATH instead of the
# one from builddir # one from builddir
installCheckFlagsArray+=( installCheckFlagsArray+=(
"TESTGAP=gap --quitonbreak -b -m 100m -o 1g -q -x 80 -r -A" "TESTGAPcore=gap --quitonbreak -b -q -r"
"TESTGAPauto=gap --quitonbreak -b -m 100m -o 1g -q -x 80 -r" "TESTGAPauto=gap --quitonbreak -b -q -r -m 100m -o 1g -x 80"
"TESTGAP=gap --quitonbreak -b -q -r -m 100m -o 1g -x 80 -A"
) )
''; '';
postBuild = '' postBuild = ''
pushd pkg pushd pkg
bash ../bin/BuildPackages.sh # failures are ignored unless --strict is set
bash ../bin/BuildPackages.sh ${lib.optionalString (!keepAll) "--strict"}
popd popd
''; '';
installTargets = [
"install-libgap"
"install-headers"
];
# full `make install` is not yet implemented, just for libgap and headers
postInstall = '' postInstall = ''
# Install config.h, which is not currently handled by `make install-headers` # make install creates an empty pkg dir. since we run "make check" on
cp gen/config.h "$out/include/gap" # installCheckPhase to make sure the installed GAP finds its libraries, we
# also install the tst dir. this is probably excessively cautious, see
# https://github.com/NixOS/nixpkgs/pull/192548#discussion_r992824942
rm -r "$out/share/gap/pkg"
cp -ar pkg tst "$out/share/gap"
mkdir -p "$out/bin" "$out/share/gap/" makeWrapper "$out/lib/gap/gap" "$out/bin/gap" --add-flags "-l $out/share/gap"
echo "Copying files to target directory"
cp -ar . "$out/share/gap/build-dir"
makeWrapper "$out/share/gap/build-dir/bin/gap.sh" "$out/bin/gap" \
--set GAP_DIR $out/share/gap/build-dir
''; '';
preFixup = '' preFixup = ''
@ -141,14 +145,11 @@ stdenv.mkDerivation rec {
meta = with lib; { meta = with lib; {
description = "Computational discrete algebra system"; description = "Computational discrete algebra system";
maintainers = with maintainers; # We are also grateful to ChrisJefferson for previous work on the package,
[ # and to ChrisJefferson and fingolfin for help with GAP-related questions
raskin # from the upstream point of view.
chrisjefferson maintainers = teams.sage.members;
timokau
];
platforms = platforms.all; platforms = platforms.all;
broken = stdenv.isDarwin;
# keeping all packages increases the package size considerably, which is # keeping all packages increases the package size considerably, which is
# why a local build is preferable in that situation. The timeframe is # why a local build is preferable in that situation. The timeframe is
# reasonable and that way the binary cache doesn't get overloaded. # reasonable and that way the binary cache doesn't get overloaded.