summaryrefslogtreecommitdiffstats
path: root/pkgs/development/ocaml-modules/gen_js_api/default.nix
blob: aafae7b6ff9e744e0a9f18f61359744614f21438 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{
  buildDunePackage,
  ocaml,
  lib,
  ppxlib,
  fetchFromGitHub,
  ojs,
  js_of_ocaml-compiler,
  nodejs,
}:

buildDunePackage (finalAttrs: {
  pname = "gen_js_api";
  version = "1.1.5";

  src = fetchFromGitHub {
    owner = "LexiFi";
    repo = "gen_js_api";
    rev = "v${finalAttrs.version}";
    sha256 = "sha256-baK+/y0s08hHC8/+P7RKOboFnALQpndxBMuhI1WKf2o=";
  };

  minimalOCamlVersion = "4.11";

  propagatedBuildInputs = [
    ojs
    ppxlib
  ];
  nativeCheckInputs = [
    js_of_ocaml-compiler
    nodejs
  ];
  doCheck = lib.versionAtLeast ocaml.version "4.13" && !(lib.versionAtLeast ppxlib.version "0.36");

  meta = {
    homepage = "https://github.com/LexiFi/gen_js_api";
    description = "Easy OCaml bindings for JavaScript libraries";
    longDescription = ''
      gen_js_api aims at simplifying the creation of OCaml bindings for
      JavaScript libraries. Authors of bindings write OCaml signatures for
      JavaScript libraries and the tool generates the actual binding code with a
      combination of implicit conventions and explicit annotations.

      gen_js_api is to be used with the js_of_ocaml compiler.
    '';
    license = lib.licenses.mit;
    maintainers = [ lib.maintainers.bcc32 ];
  };
})