2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv
|
2019-04-15 22:12:04 +01:00
|
|
|
, 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";
|
2020-11-26 21:47:38 +00:00
|
|
|
version = "0.6.0";
|
2019-04-15 22:12:04 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "symengine";
|
|
|
|
repo = "symengine";
|
|
|
|
rev = "v${version}";
|
2020-11-26 21:47:38 +00:00
|
|
|
sha256 = "129iv9maabmb42ylfdv0l0g94mcbf3y4q3np175008rcqdr8z6h1";
|
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
|
|
|
|
'';
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-10-26 04:08:40 +00:00
|
|
|
description = "A fast symbolic manipulation library";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/symengine/symengine";
|
2019-04-15 22:12:04 +01:00
|
|
|
platforms = platforms.unix ++ platforms.windows;
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|