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 {
|
|
|
|
name = "symengine-${version}";
|
2019-05-07 17:27:07 +02:00
|
|
|
version = "0.4.0";
|
2019-04-15 23:12:04 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "symengine";
|
|
|
|
repo = "symengine";
|
|
|
|
rev = "v${version}";
|
2019-05-07 17:27:07 +02:00
|
|
|
sha256 = "1kz893p3pmsw3gfwickk2nliw8p63yp89xriad7kpw4kmhvgr8gb";
|
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";
|
|
|
|
homepage = https://github.com/symengine/symengine;
|
|
|
|
platforms = platforms.unix ++ platforms.windows;
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|