blob: 25043bbb0265d10927b296bcf70deedd3d26dc6b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
{ lib
, stdenv
, fetchFromGitHub
, cmake
, gmp
, flint
, mpfr
, libmpc
, withShared ? true
}:
stdenv.mkDerivation rec {
pname = "symengine";
version = "0.12.0";
src = fetchFromGitHub {
owner = "symengine";
repo = "symengine";
rev = "v${version}";
hash = "sha256-SfifujR2VM1OlPN0ZRUC3hWImXO/8PuiyrBdpyNoKW4=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ gmp flint mpfr libmpc ];
cmakeFlags = [
"-DWITH_FLINT=ON"
"-DINTEGER_CLASS=flint"
"-DWITH_SYMENGINE_THREAD_SAFE=yes"
"-DWITH_MPC=yes"
"-DBUILD_FOR_DISTRIBUTION=yes"
] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
# error: unrecognized instruction mnemonic, did you mean: bit, cnt, hint, ins, not?
"-DBUILD_TESTS=OFF"
] ++ lib.optionals withShared [
"-DBUILD_SHARED_LIBS=ON"
];
doCheck = true;
meta = with lib; {
description = "Fast symbolic manipulation library";
homepage = "https://github.com/symengine/symengine";
platforms = platforms.unix ++ platforms.windows;
license = licenses.bsd3;
maintainers = [ maintainers.costrouc ];
};
}
|