diff --git a/ocaml-pkgs/catala.nix b/ocaml-pkgs/catala.nix new file mode 100644 index 0000000..0ca49ae --- /dev/null +++ b/ocaml-pkgs/catala.nix @@ -0,0 +1,82 @@ +{ + lib, + fetchFromGitHub, + buildDunePackage, + + menhirLib, + menhir, + re, + otoml, + ubase, + ocamlgraph, + uutf, + js_of_ocaml, + zarith_stubs_js, + bindlib, + alcotest, + dates_calc, + sedlex, + js_of_ocaml-ppx, + zarith, + ocolor, + unionFind, + visitors, + ninja_utils, + ocaml-crunch, + obelisk, + cppo, + groff, +}: + +buildDunePackage rec { + pname = "catala"; + version = "0.10.0"; + + minimalOCamlVersion = "4.14"; + duneVersion = "3"; + + src = fetchFromGitHub { + owner = "CatalaLang"; + repo = "catala"; + rev = version; + hash = "sha256-JMDJJ+KIIlWMcKhKGUGwPy5+XoiVd0b/uXKAIn85n/Q="; + }; + + buildInputs = [ + menhirLib + js_of_ocaml + re + otoml + ubase + ocamlgraph + uutf + zarith_stubs_js + bindlib + alcotest + dates_calc + sedlex + js_of_ocaml-ppx + zarith + ocolor + unionFind + visitors + ninja_utils + ]; + nativeBuildInputs = [ + menhir + js_of_ocaml + ocaml-crunch + obelisk + cppo + groff + ]; + + meta = { + description = "Programming language for literate programming law specification"; + homepage = "https://github.com/CatalaLang/catala"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ ]; + mainProgram = "catala"; + platforms = lib.platforms.all; + }; +} diff --git a/overlay.nix b/overlay.nix index c9c92e7..c66812d 100644 --- a/overlay.nix +++ b/overlay.nix @@ -21,4 +21,7 @@ mkGeneralOverlay ./pkgs final prev ocamlPackagesExtensions = (prev.ocamlPackagesExtensions or [ ]) ++ [ (mkGeneralOverlay ./ocaml-pkgs) ]; + + # tools from language specific pkgs sets + inherit (final.ocamlPackages) catala; }