2015-06-25 22:46:54 +02:00
|
|
|
{ stdenv, fetchurl, gmp, bison, perl, autoconf, ncurses, readline, coreutils }:
|
2010-12-05 19:37:47 +01:00
|
|
|
|
2015-06-25 22:46:54 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "singular-${version}";
|
2016-10-12 17:34:29 +02:00
|
|
|
version="3-1-7";
|
2015-06-25 22:46:54 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2016-10-12 17:34:29 +02:00
|
|
|
url = "http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/${version}/Singular-${version}.tar.gz";
|
|
|
|
sha256 = "1j4mcpnwzdp3h4qspk6ww0m67rmx4s11cy17pvzbpf70lm0jzzh2";
|
2010-12-05 19:37:47 +01:00
|
|
|
};
|
|
|
|
|
2015-06-25 22:46:54 +02: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 19:37:47 +01:00
|
|
|
|
2016-04-03 14:25:05 +02:00
|
|
|
hardeningDisable = stdenv.lib.optional stdenv.isi686 "stackprotector";
|
|
|
|
|
2015-06-25 22:46:54 +02:00
|
|
|
postInstall = ''
|
2010-12-05 20:08:32 +01:00
|
|
|
rm -rf "$out/LIB"
|
2016-10-12 17:34:29 +02:00
|
|
|
cp -Tr Singular/LIB "$out/lib"
|
|
|
|
ln -s "$out"/*/include "$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"
|
2015-06-25 22:46:54 +02:00
|
|
|
'';
|
2014-07-28 11:43:20 +02:00
|
|
|
|
2015-06-25 22:46:54 +02:00
|
|
|
meta = with stdenv.lib; {
|
2010-12-05 19:37:47 +01:00
|
|
|
description = "A CAS for polynomial computations";
|
2015-06-25 22:46:54 +02:00
|
|
|
maintainers = with maintainers;
|
|
|
|
[ raskin ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = 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";
|
2016-10-12 17:34:29 +02:00
|
|
|
downloadPage = "http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/";
|
2010-12-05 19:37:47 +01:00
|
|
|
};
|
2015-06-25 22:46:54 +02:00
|
|
|
}
|