2010-12-05 19:37:47 +01:00
|
|
|
x@{builderDefsPackage
|
|
|
|
, gmp, bison, perl, autoconf, ncurses, readline
|
|
|
|
, coreutils
|
|
|
|
, ...}:
|
|
|
|
builderDefsPackage
|
2014-07-28 11:43:20 +02:00
|
|
|
(a :
|
|
|
|
let
|
|
|
|
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
|
2010-12-05 19:37:47 +01:00
|
|
|
[];
|
|
|
|
|
|
|
|
buildInputs = map (n: builtins.getAttr n x)
|
|
|
|
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
|
|
|
|
sourceInfo = rec {
|
|
|
|
baseName="Singular";
|
|
|
|
version="3-1-2";
|
|
|
|
revision="-1";
|
|
|
|
name="${baseName}-${version}${revision}";
|
|
|
|
url="http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/${version}/${name}.tar.gz";
|
|
|
|
hash="04f9i1xar0r7qrrbfki1h9rrmx5y2xg4w7rrvlbx05v2dy6s8djv";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
rec {
|
|
|
|
src = a.fetchurl {
|
|
|
|
url = sourceInfo.url;
|
|
|
|
sha256 = sourceInfo.hash;
|
|
|
|
};
|
|
|
|
|
|
|
|
inherit (sourceInfo) name version;
|
|
|
|
inherit buildInputs;
|
|
|
|
|
|
|
|
/* doConfigure should be removed if not needed */
|
2010-12-05 20:08:32 +01:00
|
|
|
phaseNames = ["doFixPaths" "doConfigure" "doMakeInstall" "fixInstall"];
|
2010-12-05 19:37:47 +01:00
|
|
|
doFixPaths = a.fullDepEntry (''
|
|
|
|
find . -exec sed -e 's@/bin/rm@${a.coreutils}&@g' -i '{}' ';'
|
|
|
|
find . -exec sed -e 's@/bin/uname@${a.coreutils}&@g' -i '{}' ';'
|
|
|
|
'') ["minInit" "doUnpack"];
|
2010-12-05 20:08:32 +01:00
|
|
|
fixInstall = a.fullDepEntry (''
|
|
|
|
rm -rf "$out/LIB"
|
|
|
|
cp -r Singular/LIB "$out"
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p "$out/bin"
|
2014-07-28 11:42:49 +02:00
|
|
|
ln -s "$out/"*/Singular "$out/bin"
|
2010-12-05 20:08:32 +01:00
|
|
|
'') ["minInit" "defEnsureDir"];
|
2014-07-28 11:43:20 +02:00
|
|
|
|
2010-12-05 19:37:47 +01:00
|
|
|
meta = {
|
|
|
|
description = "A CAS for polynomial computations";
|
|
|
|
maintainers = with a.lib.maintainers;
|
|
|
|
[
|
|
|
|
raskin
|
|
|
|
];
|
|
|
|
platforms = with a.lib.platforms;
|
|
|
|
linux;
|
2014-07-28 11:43:20 +02:00
|
|
|
license = a.stdenv.lib.licenses.gpl3; # Or GPLv2 at your option - but not GPLv4
|
2010-12-05 19:37:47 +01:00
|
|
|
homepage = "http://www.singular.uni-kl.de/index.php";
|
|
|
|
};
|
|
|
|
passthru = {
|
|
|
|
updateInfo = {
|
|
|
|
downloadPage = "http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}) x
|