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-08-06 07:36:00 +01:00
|
|
|
version = "0.4.1";
|
2019-04-15 22:12:04 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "symengine";
|
|
|
|
repo = "symengine";
|
|
|
|
rev = "v${version}";
|
2019-08-06 07:36:00 +01:00
|
|
|
sha256 = "0qqxr7l5lr81k6fs2h5isr43x0dw07rwg3ivl6vd8zmmcgsp9ygd";
|
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 ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|