3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/science/math/gap/default.nix

49 lines
1 KiB
Nix
Raw Normal View History

2016-06-02 22:53:39 +01:00
{ stdenv, fetchurl, m4, gmp }:
2015-07-21 12:19:38 +01:00
2014-07-28 10:43:20 +01:00
let
2015-07-21 12:19:38 +01:00
baseName = "gap";
2016-06-02 22:53:39 +01:00
version = "4r8p3";
2016-06-02 22:53:39 +01:00
pkgVer = "2016_03_19-22_17";
in
2015-07-21 12:19:38 +01:00
stdenv.mkDerivation rec {
name = "${baseName}-${version}";
2015-07-21 12:19:38 +01:00
src = fetchurl {
2016-06-02 22:53:39 +01:00
url = "ftp://ftp.gap-system.org/pub/gap/gap48/tar.gz/${baseName}${version}_${pkgVer}.tar.gz";
sha256 = "1rmb0lj43avv456sjwb7ia3y0wwk5shlqylpkdwnnqpjnvjbnzv6";
2015-07-21 12:19:38 +01:00
};
2016-06-02 22:53:39 +01:00
configureFlags = [ "--with-gmp=system" ];
buildInputs = [ m4 gmp ];
postBuild = ''
pushd pkg
bash ../bin/BuildPackages.sh
popd
'';
2015-07-21 12:19:38 +01:00
installPhase = ''
mkdir -p "$out/bin" "$out/share/gap/"
cp -r . "$out/share/gap/build-dir"
2014-07-28 10:43:20 +01:00
sed -e "/GAP_DIR=/aGAP_DIR='$out/share/gap/build-dir/'" -i "$out/share/gap/build-dir/bin/gap.sh"
ln -s "$out/share/gap/build-dir/bin/gap.sh" "$out/bin"
2015-07-21 12:19:38 +01:00
'';
2014-07-28 10:43:20 +01:00
2015-07-21 12:19:38 +01:00
meta = with stdenv.lib; {
description = "Computational discrete algebra system";
2015-07-21 12:19:38 +01:00
maintainers = with maintainers;
[
raskin
2016-06-02 22:53:39 +01:00
chrisjefferson
];
2016-06-02 22:53:39 +01:00
platforms = platforms.all;
2015-07-21 12:19:38 +01:00
license = licenses.gpl2;
homepage = http://gap-system.org/;
};
2015-07-21 12:19:38 +01:00
}