diff --git a/pkgs/development/ocaml-modules/smtml/default.nix b/pkgs/development/ocaml-modules/smtml/default.nix new file mode 100644 index 000000000000..d68add0058e4 --- /dev/null +++ b/pkgs/development/ocaml-modules/smtml/default.nix @@ -0,0 +1,76 @@ +{ + lib, + stdenv, + buildDunePackage, + ocaml, + fetchFromGitHub, + menhir, + bos, + cmdliner, + dolmen_type, + fpath, + hc, + menhirLib, + # fix eval on legacy ocaml versions + ocaml_intrinsics ? null, + patricia-tree, + prelude, + scfg, + yojson, + z3, + zarith, + mdx, + ounit2, +}: + +buildDunePackage rec { + pname = "smtml"; + version = "0.7.0"; + + src = fetchFromGitHub { + owner = "formalsec"; + repo = "smtml"; + tag = "v${version}"; + hash = "sha256-QxVORnu28mcs54ZEPMxI5Bch/+/gkIfn0bTqrnSKUOw="; + }; + + nativeBuildInputs = [ + menhir + ]; + + propagatedBuildInputs = [ + bos + cmdliner + dolmen_type + fpath + hc + menhirLib + ocaml_intrinsics + patricia-tree + prelude + scfg + yojson + z3 + zarith + ]; + + checkInputs = [ + mdx + ounit2 + ]; + + nativeCheckInputs = [ + mdx.bin + ]; + + doCheck = !(lib.versions.majorMinor ocaml.version == "5.0" || stdenv.hostPlatform.isDarwin); + + meta = { + description = "SMT solver frontend for OCaml"; + homepage = "https://formalsec.github.io/smtml/smtml/"; + downloadPage = "https://github.com/formalsec/smtml"; + changelog = "https://github.com/formalsec/smtml/releases/tag/v${version}"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.ethancedwards8 ]; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 96fefa20d8ad..60b0c32f3b75 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1885,6 +1885,10 @@ let slug = callPackage ../development/ocaml-modules/slug { }; + smtml = callPackage ../development/ocaml-modules/smtml { + mdx = mdx.override { inherit logs; }; + }; + sodium = callPackage ../development/ocaml-modules/sodium { }; sosa = callPackage ../development/ocaml-modules/sosa { };