ocamlPackages.hxd: 0.3.2 -> 0.3.3 (#364231)
[NixPkgs.git] / pkgs / development / ocaml-modules / ppx_cstubs / default.nix
blob75bdee5783a8e3dcf8d8505ccbda0dc6a8841311
2   lib,
3   ocaml,
4   fetchFromGitHub,
5   buildDunePackage,
6   bigarray-compat,
7   containers,
8   cppo,
9   ctypes,
10   integers,
11   num,
12   ppxlib,
13   re,
14   findlib,
17 lib.throwIf (lib.versionAtLeast ocaml.version "5.2")
18   "ppx_cstubs is not available for OCaml ${ocaml.version}"
20   buildDunePackage
21   rec {
22     pname = "ppx_cstubs";
23     version = "0.7.0";
25     minimalOCamlVersion = "4.08";
27     src = fetchFromGitHub {
28       owner = "fdopen";
29       repo = "ppx_cstubs";
30       rev = version;
31       hash = "sha256-qMmwRWCIfNyhCQYPKLiufnb57sTR3P+WInOqtPDywFs=";
32     };
34     patches = [ ./ppxlib.patch ];
36     nativeBuildInputs = [ cppo ];
38     buildInputs = [
39       bigarray-compat
40       containers
41       findlib
42       integers
43       num
44       ppxlib
45       re
46     ];
48     propagatedBuildInputs = [
49       ctypes
50     ];
52     meta = with lib; {
53       homepage = "https://github.com/fdopen/ppx_cstubs";
54       changelog = "https://github.com/fdopen/ppx_cstubs/raw/${version}/CHANGES.md";
55       description = "Preprocessor for easier stub generation with ocaml-ctypes";
56       license = licenses.lgpl21Plus;
57       maintainers = [ maintainers.osener ];
58     };
59   }