2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv
|
2019-04-15 21:12:04 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, gmp
|
|
|
|
, flint
|
2019-05-07 15:27:07 +00:00
|
|
|
, mpfr
|
|
|
|
, libmpc
|
2022-01-10 21:58:19 +00:00
|
|
|
, catch
|
2019-04-15 21:12:04 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "symengine";
|
2022-02-19 02:11:49 +00:00
|
|
|
version = "0.9.0";
|
2019-04-15 21:12:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "symengine";
|
|
|
|
repo = "symengine";
|
|
|
|
rev = "v${version}";
|
2022-02-19 02:11:49 +00:00
|
|
|
sha256 = "sha256-5KpxBusJCuwrfFWHbrRKlH6Ic7YivYqz2m+BCbNfZp0=";
|
2019-04-15 21:12:04 +00:00
|
|
|
};
|
|
|
|
|
2022-01-10 21:58:19 +00:00
|
|
|
postPatch = ''
|
|
|
|
cp ${catch}/include/catch/catch.hpp symengine/utilities/catch/catch.hpp
|
|
|
|
'';
|
|
|
|
|
2019-05-07 15:27:07 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
|
|
|
buildInputs = [ gmp flint mpfr libmpc ];
|
2019-04-15 21:12:04 +00:00
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DWITH_FLINT=ON"
|
2019-05-07 15:27:07 +00:00
|
|
|
"-DINTEGER_CLASS=flint"
|
|
|
|
"-DWITH_SYMENGINE_THREAD_SAFE=yes"
|
|
|
|
"-DWITH_MPC=yes"
|
|
|
|
"-DBUILD_FOR_DISTRIBUTION=yes"
|
2019-04-15 21:12:04 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
2019-05-07 15:27:07 +00:00
|
|
|
|
2019-04-15 21:12:04 +00: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 01:11:51 +00:00
|
|
|
homepage = "https://github.com/symengine/symengine";
|
2019-04-15 21:12:04 +00:00
|
|
|
platforms = platforms.unix ++ platforms.windows;
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|