ripasso-cursive: cosmetic changes (#361736)
[NixPkgs.git] / pkgs / by-name / sy / symengine / package.nix
blob9d6ef0f2404c984538b7dd31aee147f3ab2daac3
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , cmake
5 , gmp
6 , flint
7 , mpfr
8 , libmpc
9 , withShared ? true
12 stdenv.mkDerivation rec {
13   pname = "symengine";
14   version = "0.13.0";
16   src = fetchFromGitHub {
17     owner = "symengine";
18     repo = "symengine";
19     rev = "v${version}";
20     hash = "sha256-hMTndwIXTqf3cxKZdnn38SFvZLEb48k1Lvm5/hW7U8k=";
21   };
23   nativeBuildInputs = [ cmake ];
25   buildInputs = [ gmp flint mpfr libmpc ];
27   cmakeFlags = [
28     "-DWITH_FLINT=ON"
29     "-DINTEGER_CLASS=flint"
30     "-DWITH_SYMENGINE_THREAD_SAFE=yes"
31     "-DWITH_MPC=yes"
32     "-DBUILD_FOR_DISTRIBUTION=yes"
33   ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
34     # error: unrecognized instruction mnemonic, did you mean: bit, cnt, hint, ins, not?
35     "-DBUILD_TESTS=OFF"
36   ] ++ lib.optionals withShared [
37     "-DBUILD_SHARED_LIBS=ON"
38   ];
40   doCheck = true;
42   meta = with lib; {
43     description = "Fast symbolic manipulation library";
44     homepage = "https://github.com/symengine/symengine";
45     platforms = platforms.unix ++ platforms.windows;
46     license = licenses.bsd3;
47     maintainers = [ maintainers.costrouc ];
48   };