1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 autoreconfHook,
6 flint3,
7 gmp,
8 mpfr,
9 llvmPackages,
10}:
11
12stdenv.mkDerivation (finalAttrs: {
13 pname = "msolve";
14 version = "0.9.0";
15
16 src = fetchFromGitHub {
17 owner = "algebraic-solving";
18 repo = "msolve";
19 tag = "v${finalAttrs.version}";
20 hash = "sha256-6TU/h6ewQreomjStHZRViYTrrDG3+MZXa8mLg1NvvZg=";
21 };
22
23 postPatch = ''
24 patchShebangs .
25 '';
26
27 nativeBuildInputs = [
28 autoreconfHook
29 ];
30
31 buildInputs = [
32 flint3
33 gmp
34 mpfr
35 ]
36 ++ lib.optionals stdenv.cc.isClang [
37 llvmPackages.openmp
38 ];
39
40 doCheck = true;
41
42 meta = {
43 description = "Library for polynomial system solving through algebraic methods";
44 mainProgram = "msolve";
45 homepage = "https://msolve.lip6.fr";
46 changelog = "https://github.com/algebraic-solving/msolve/releases/tag/${finalAttrs.src.rev}";
47 license = lib.licenses.gpl2Plus;
48 maintainers = with lib.maintainers; [ wegank ];
49 platforms = lib.platforms.unix;
50 };
51})