1{
2 lib,
3 buildDunePackage,
4 fetchFromGitLab,
5 clang,
6 libclang,
7 libllvm,
8 flint3,
9 mpfr,
10 pplite,
11 ocaml,
12 menhir,
13 apron,
14 arg-complete,
15 camlidl,
16 yojson,
17 zarith,
18}:
19
20buildDunePackage rec {
21 pname = "mopsa";
22 version = "1.1";
23
24 minimalOCamlVersion = "4.13";
25
26 src = fetchFromGitLab {
27 owner = "mopsa";
28 repo = "mopsa-analyzer";
29 tag = "v${version}";
30 hash = "sha256-lO5dtGAl1dq8oJco/hPXrAbN05rKc62Zrci/8CLrQ0c=";
31 };
32
33 nativeBuildInputs = [
34 clang
35 libllvm
36 menhir
37 ];
38
39 buildInputs = [
40 arg-complete
41 camlidl
42 flint3
43 libclang
44 mpfr
45 pplite
46 ];
47
48 propagatedBuildInputs = [
49 apron
50 yojson
51 zarith
52 ];
53
54 postPatch = ''
55 patchShebangs bin
56 '';
57
58 buildPhase = ''
59 runHook preBuild
60 dune build --profile release -p mopsa
61 runHook postBuild
62 '';
63
64 installPhase = ''
65 runHook preInstall
66 dune install --profile release --prefix=$bin --libdir=$out/lib/ocaml/${ocaml.version}/site-lib
67 runHook postInstall
68 '';
69
70 outputs = [
71 "bin"
72 "out"
73 ];
74
75 meta = {
76 license = lib.licenses.lgpl3Plus;
77 homepage = "https://mopsa.lip6.fr/";
78 description = "Modular and Open Platform for Static Analysis using Abstract Interpretation";
79 maintainers = [ lib.maintainers.vbgl ];
80 };
81
82}