2024-05-15 15:35:15 +00:00
|
|
|
{ lib, buildDunePackage, ocaml, cstruct, sexplib, ppxlib
|
2023-08-22 20:05:09 +00:00
|
|
|
, ocaml-migrate-parsetree-2
|
2021-02-05 17:12:51 +00:00
|
|
|
, ounit, cppo, ppx_sexp_conv, cstruct-unix, cstruct-sexp
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
if lib.versionOlder (cstruct.version or "1") "3"
|
2020-04-24 23:36:52 +00:00
|
|
|
then cstruct
|
|
|
|
else
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
buildDunePackage {
|
|
|
|
pname = "ppx_cstruct";
|
|
|
|
inherit (cstruct) version src meta;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
minimalOCamlVersion = "4.08";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
propagatedBuildInputs = [ cstruct ppxlib sexplib ];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
doCheck = !lib.versionAtLeast ocaml.version "5.1";
|
2023-02-09 11:40:11 +00:00
|
|
|
nativeCheckInputs = [ cppo ];
|
2023-08-22 20:05:09 +00:00
|
|
|
checkInputs = [ ounit ppx_sexp_conv cstruct-sexp cstruct-unix ocaml-migrate-parsetree-2 ];
|
2023-02-09 11:40:11 +00:00
|
|
|
}
|