forked from mirrors/nixpkgs
Add packages to GAP
svn path=/nixpkgs/trunk/; revision=33601
This commit is contained in:
parent
a78b508f8e
commit
6bc87a1ac8
|
@ -1,5 +1,5 @@
|
|||
x@{builderDefsPackage
|
||||
|
||||
, pari ? null
|
||||
, ...}:
|
||||
builderDefsPackage
|
||||
(a :
|
||||
|
@ -15,6 +15,9 @@ let
|
|||
name="${baseName}-${version}";
|
||||
url="ftp://ftp.gap-system.org/pub/gap/gap4/tar.gz/${baseName}${version}.tar.gz";
|
||||
hash="0flap5lbkvpms3zznq1zwxyxyj0ax3fk7m24f3bvhvr37vyxnf40";
|
||||
pkgVer="2012_01_12-10_47_UTC";
|
||||
pkgURL="ftp://ftp.gap-system.org/pub/gap/gap4/tar.bz2/packages-${pkgVer}.tar.bz2";
|
||||
pkgHash="0z9ncy1m5gvv4llkclxd1vpcgpb0b81a2pfmnhzvw8x708frhmnb";
|
||||
};
|
||||
in
|
||||
rec {
|
||||
|
@ -23,6 +26,11 @@ rec {
|
|||
sha256 = sourceInfo.hash;
|
||||
};
|
||||
|
||||
pkgSrc = a.fetchurl {
|
||||
url=sourceInfo.pkgURL;
|
||||
sha256=sourceInfo.pkgHash;
|
||||
};
|
||||
|
||||
inherit (sourceInfo) name version;
|
||||
inherit buildInputs;
|
||||
|
||||
|
@ -34,6 +42,11 @@ rec {
|
|||
|
||||
cp -r . "$out/share/gap/build-dir"
|
||||
|
||||
tar xf "${pkgSrc}" -C "$out/share/gap/build-dir/pkg"
|
||||
|
||||
${if a.pari != null then
|
||||
''sed -e '2iexport PATH=$PATH:${pari}/bin' -i "$out/share/gap/build-dir/bin/gap.sh" ''
|
||||
else ""}
|
||||
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"
|
||||
|
@ -47,7 +60,7 @@ rec {
|
|||
];
|
||||
platforms = with a.lib.platforms;
|
||||
linux;
|
||||
license = "GPLv2+";
|
||||
license = "GPLv2";
|
||||
homepage = "http://gap-system.org/";
|
||||
};
|
||||
}) x
|
||||
|
|
Loading…
Reference in a new issue