diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/compiler-wasm.nix b/pkgs/development/tools/ocaml/js_of_ocaml/compiler-wasm.nix new file mode 100644 index 0000000000000..70a63198aa64d --- /dev/null +++ b/pkgs/development/tools/ocaml/js_of_ocaml/compiler-wasm.nix @@ -0,0 +1,42 @@ +{ + lib, + buildDunePackage, + binaryen, + cmdliner, + js_of_ocaml, + js_of_ocaml-compiler, + menhir, + menhirLib, + ppxlib, + sedlex, + yojson, +}: + +buildDunePackage { + pname = "wasm_of_ocaml-compiler"; + inherit (js_of_ocaml-compiler) version src; + minimalOCamlVersion = "4.12"; + + nativeBuildInputs = [ + binaryen + menhir + ]; + + buildInputs = [ + cmdliner + ppxlib + ]; + + propagatedBuildInputs = [ + js_of_ocaml + menhirLib + sedlex + yojson + ]; + + meta = js_of_ocaml-compiler.meta // { + description = "Compiler from OCaml bytecode to WebAssembly"; + mainProgram = "wasm_of_ocaml"; + maintainers = [ lib.maintainers.stepbrobd ]; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 7bebc3af9364c..ac29de7938173 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -2012,6 +2012,8 @@ let wasm = callPackage ../development/ocaml-modules/wasm { }; + wasm_of_ocaml-compiler = callPackage ../development/tools/ocaml/js_of_ocaml/compiler-wasm.nix { }; + wayland = callPackage ../development/ocaml-modules/wayland { }; webbrowser = callPackage ../development/ocaml-modules/webbrowser { };