1{
2 buildDunePackage,
3 ocaml,
4 lib,
5 ppxlib,
6 fetchFromGitHub,
7 ojs,
8 js_of_ocaml-compiler,
9 nodejs,
10}:
11
12buildDunePackage rec {
13 pname = "gen_js_api";
14 version = "1.1.5";
15
16 src = fetchFromGitHub {
17 owner = "LexiFi";
18 repo = pname;
19 rev = "v${version}";
20 sha256 = "sha256-baK+/y0s08hHC8/+P7RKOboFnALQpndxBMuhI1WKf2o=";
21 };
22
23 minimalOCamlVersion = "4.11";
24
25 propagatedBuildInputs = [
26 ojs
27 ppxlib
28 ];
29 nativeCheckInputs = [
30 js_of_ocaml-compiler
31 nodejs
32 ];
33 doCheck = lib.versionAtLeast ocaml.version "4.13" && !(lib.versionAtLeast ppxlib.version "0.36");
34
35 meta = {
36 homepage = "https://github.com/LexiFi/gen_js_api";
37 description = "Easy OCaml bindings for JavaScript libraries";
38 longDescription = ''
39 gen_js_api aims at simplifying the creation of OCaml bindings for
40 JavaScript libraries. Authors of bindings write OCaml signatures for
41 JavaScript libraries and the tool generates the actual binding code with a
42 combination of implicit conventions and explicit annotations.
43
44 gen_js_api is to be used with the js_of_ocaml compiler.
45 '';
46 license = lib.licenses.mit;
47 maintainers = [ lib.maintainers.bcc32 ];
48 };
49}