2019-04-15 23:12:04 +02:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, gmp
|
|
|
|
, flint
|
2019-05-07 17:27:07 +02:00
|
|
|
, mpfr
|
|
|
|
, libmpc
|
2019-04-15 23:12:04 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "symengine";
|
2019-09-29 06:33:35 +02:00
|
|
|
version = "0.5.0";
|
2019-04-15 23:12:04 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "symengine";
|
|
|
|
repo = "symengine";
|
|
|
|
rev = "v${version}";
|
2019-09-29 06:33:35 +02:00
|
|
|
sha256 = "1zgfhqv43qcfkfdyf1p82bcfv05n6iix6yw6qx1y5bnb7dv74irw";
|
2019-04-15 23:12:04 +02:00
|
|
|
};
|
|
|
|
|
2019-05-07 17:27:07 +02:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
|
|
|
buildInputs = [ gmp flint mpfr libmpc ];
|
2019-04-15 23:12:04 +02:00
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DWITH_FLINT=ON"
|
2019-05-07 17:27:07 +02:00
|
|
|
"-DINTEGER_CLASS=flint"
|
|
|
|
"-DWITH_SYMENGINE_THREAD_SAFE=yes"
|
|
|
|
"-DWITH_MPC=yes"
|
|
|
|
"-DBUILD_FOR_DISTRIBUTION=yes"
|
2019-04-15 23:12:04 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
2019-05-07 17:27:07 +02:00
|
|
|
|
2019-04-15 23:12:04 +02:00
|
|
|
checkPhase = ''
|
|
|
|
ctest
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "SymEngine is a fast symbolic manipulation library";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/symengine/symengine";
|
2019-04-15 23:12:04 +02:00
|
|
|
platforms = platforms.unix ++ platforms.windows;
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|