2015-06-25 21:46:54 +01:00
|
|
|
{ stdenv, fetchurl, gmp, bison, perl, autoconf, ncurses, readline, coreutils }:
|
2010-12-05 18:37:47 +00:00
|
|
|
|
2015-06-25 21:46:54 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "singular-${version}";
|
|
|
|
version="3-1-2";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/${version}/${name}.tar.gz";
|
|
|
|
sha256 = "04f9i1xar0r7qrrbfki1h9rrmx5y2xg4w7rrvlbx05v2dy6s8djv";
|
2010-12-05 18:37:47 +00:00
|
|
|
};
|
|
|
|
|
2015-06-25 21:46:54 +01:00
|
|
|
buildInputs = [ gmp bison perl autoconf ncurses readline coreutils ];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
find . -exec sed -e 's@/bin/rm@${coreutils}&@g' -i '{}' ';'
|
|
|
|
find . -exec sed -e 's@/bin/uname@${coreutils}&@g' -i '{}' ';'
|
|
|
|
'';
|
2010-12-05 18:37:47 +00:00
|
|
|
|
2015-06-25 21:46:54 +01:00
|
|
|
postInstall = ''
|
2010-12-05 19:08:32 +00:00
|
|
|
rm -rf "$out/LIB"
|
|
|
|
cp -r Singular/LIB "$out"
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p "$out/bin"
|
2014-07-28 10:42:49 +01:00
|
|
|
ln -s "$out/"*/Singular "$out/bin"
|
2015-06-25 21:46:54 +01:00
|
|
|
'';
|
2014-07-28 10:43:20 +01:00
|
|
|
|
2015-06-25 21:46:54 +01:00
|
|
|
meta = with stdenv.lib; {
|
2010-12-05 18:37:47 +00:00
|
|
|
description = "A CAS for polynomial computations";
|
2015-06-25 21:46:54 +01:00
|
|
|
maintainers = with maintainers;
|
|
|
|
[ raskin ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl3; # Or GPLv2 at your option - but not GPLv4
|
2010-12-05 18:37:47 +00:00
|
|
|
homepage = "http://www.singular.uni-kl.de/index.php";
|
|
|
|
};
|
|
|
|
passthru = {
|
|
|
|
updateInfo = {
|
|
|
|
downloadPage = "http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/";
|
|
|
|
};
|
|
|
|
};
|
2015-06-25 21:46:54 +01:00
|
|
|
}
|