2012-03-08 19:23:47 +01:00
|
|
|
x@{builderDefsPackage
|
2014-07-28 11:43:20 +02:00
|
|
|
, pari ? null
|
2012-03-08 19:23:47 +01:00
|
|
|
, ...}:
|
|
|
|
builderDefsPackage
|
2014-07-28 11:43:20 +02:00
|
|
|
(a :
|
|
|
|
let
|
|
|
|
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
|
2012-03-08 19:23:47 +01:00
|
|
|
[];
|
|
|
|
|
|
|
|
buildInputs = map (n: builtins.getAttr n x)
|
|
|
|
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
|
|
|
|
sourceInfo = rec {
|
|
|
|
baseName="gap";
|
|
|
|
version="4r4p12";
|
|
|
|
name="${baseName}-${version}";
|
|
|
|
url="ftp://ftp.gap-system.org/pub/gap/gap4/tar.gz/${baseName}${version}.tar.gz";
|
|
|
|
hash="0flap5lbkvpms3zznq1zwxyxyj0ax3fk7m24f3bvhvr37vyxnf40";
|
2012-04-05 06:46:11 +02:00
|
|
|
pkgVer="2012_01_12-10_47_UTC";
|
|
|
|
pkgURL="ftp://ftp.gap-system.org/pub/gap/gap4/tar.bz2/packages-${pkgVer}.tar.bz2";
|
|
|
|
pkgHash="0z9ncy1m5gvv4llkclxd1vpcgpb0b81a2pfmnhzvw8x708frhmnb";
|
2012-03-08 19:23:47 +01:00
|
|
|
};
|
|
|
|
in
|
|
|
|
rec {
|
|
|
|
src = a.fetchurl {
|
|
|
|
url = sourceInfo.url;
|
|
|
|
sha256 = sourceInfo.hash;
|
|
|
|
};
|
|
|
|
|
2012-04-05 06:46:11 +02:00
|
|
|
pkgSrc = a.fetchurl {
|
|
|
|
url=sourceInfo.pkgURL;
|
|
|
|
sha256=sourceInfo.pkgHash;
|
|
|
|
};
|
|
|
|
|
2012-03-08 19:23:47 +01:00
|
|
|
inherit (sourceInfo) name version;
|
|
|
|
inherit buildInputs;
|
|
|
|
|
|
|
|
/* doConfigure should be removed if not needed */
|
|
|
|
phaseNames = ["doConfigure" "doMake" "doDeploy"];
|
|
|
|
|
|
|
|
doDeploy = a.fullDepEntry ''
|
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"
|
|
|
|
|
2014-07-28 11:43:20 +02:00
|
|
|
${if a.pari != null then
|
|
|
|
''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"
|
|
|
|
'' ["doMake" "minInit" "defEnsureDir"];
|
2014-07-28 11:43:20 +02:00
|
|
|
|
2012-03-08 19:23:47 +01:00
|
|
|
meta = {
|
|
|
|
description = "Computational discrete algebra system";
|
|
|
|
maintainers = with a.lib.maintainers;
|
|
|
|
[
|
|
|
|
raskin
|
|
|
|
];
|
|
|
|
platforms = with a.lib.platforms;
|
|
|
|
linux;
|
2014-07-28 11:43:20 +02:00
|
|
|
license = with a.lib.licenses;
|
|
|
|
gpl2;
|
2012-03-08 19:23:47 +01:00
|
|
|
homepage = "http://gap-system.org/";
|
2015-09-01 11:13:00 +02:00
|
|
|
broken = true;
|
2012-03-08 19:23:47 +01:00
|
|
|
};
|
|
|
|
}) x
|