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