2015-07-21 13:19:38 +02:00
|
|
|
{ stdenv, fetchurl, pari ? null }:
|
|
|
|
|
2014-07-28 11:43:20 +02:00
|
|
|
let
|
2015-07-21 13:19:38 +02:00
|
|
|
baseName = "gap";
|
|
|
|
version = "4r4p12";
|
2012-03-08 19:23:47 +01:00
|
|
|
|
2015-07-21 13:19:38 +02:00
|
|
|
pkgVer = "2012_01_12-10_47_UTC";
|
|
|
|
pkgSrc = fetchurl {
|
|
|
|
url = "ftp://ftp.gap-system.org/pub/gap/gap4/tar.bz2/packages-${pkgVer}.tar.bz2";
|
|
|
|
sha256 = "0z9ncy1m5gvv4llkclxd1vpcgpb0b81a2pfmnhzvw8x708frhmnb";
|
2012-03-08 19:23:47 +01:00
|
|
|
};
|
|
|
|
in
|
|
|
|
|
2015-07-21 13:19:38 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "${baseName}-${version}";
|
2012-04-05 06:46:11 +02:00
|
|
|
|
2015-07-21 13:19:38 +02:00
|
|
|
src = fetchurl {
|
|
|
|
url = "ftp://ftp.gap-system.org/pub/gap/gap4/tar.gz/${baseName}${version}.tar.gz";
|
|
|
|
sha256 = "0flap5lbkvpms3zznq1zwxyxyj0ax3fk7m24f3bvhvr37vyxnf40";
|
|
|
|
};
|
2012-03-08 19:23:47 +01:00
|
|
|
|
2015-07-21 13:19:38 +02:00
|
|
|
buildInputs = [ pari ];
|
2012-03-08 19:23:47 +01:00
|
|
|
|
2015-07-21 13:19:38 +02:00
|
|
|
installPhase = ''
|
2014-06-30 14:56:10 +02:00
|
|
|
mkdir -p "$out/bin" "$out/share/gap/"
|
2012-03-08 19:23:47 +01:00
|
|
|
|
|
|
|
cp -r . "$out/share/gap/build-dir"
|
|
|
|
|
2012-04-05 06:46:11 +02:00
|
|
|
tar xf "${pkgSrc}" -C "$out/share/gap/build-dir/pkg"
|
|
|
|
|
2015-07-21 13:19:38 +02:00
|
|
|
${if pari != null then
|
2014-07-28 11:43:20 +02:00
|
|
|
''sed -e '2iexport PATH=$PATH:${pari}/bin' -i "$out/share/gap/build-dir/bin/gap.sh" ''
|
2012-04-05 06:46:11 +02:00
|
|
|
else ""}
|
2014-07-28 11:43:20 +02:00
|
|
|
sed -e "/GAP_DIR=/aGAP_DIR='$out/share/gap/build-dir/'" -i "$out/share/gap/build-dir/bin/gap.sh"
|
2012-03-08 19:23:47 +01:00
|
|
|
|
|
|
|
ln -s "$out/share/gap/build-dir/bin/gap.sh" "$out/bin"
|
2015-07-21 13:19:38 +02:00
|
|
|
'';
|
2014-07-28 11:43:20 +02:00
|
|
|
|
2015-07-21 13:19:38 +02:00
|
|
|
meta = with stdenv.lib; {
|
2012-03-08 19:23:47 +01:00
|
|
|
description = "Computational discrete algebra system";
|
2015-07-21 13:19:38 +02:00
|
|
|
maintainers = with maintainers;
|
2012-03-08 19:23:47 +01:00
|
|
|
[
|
|
|
|
raskin
|
|
|
|
];
|
2015-07-21 13:19:38 +02:00
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl2;
|
|
|
|
homepage = http://gap-system.org/;
|
2015-09-01 11:13:00 +02:00
|
|
|
broken = true;
|
2012-03-08 19:23:47 +01:00
|
|
|
};
|
2015-07-21 13:19:38 +02:00
|
|
|
}
|