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