2020-04-09 17:58:32 +01:00
|
|
|
{ lib, buildDunePackage, ocaml, alcotest, cstruct, sexplib }:
|
2019-08-24 08:02:26 +01:00
|
|
|
|
|
|
|
if !lib.versionAtLeast (cstruct.version or "1") "3"
|
|
|
|
then cstruct
|
|
|
|
else
|
|
|
|
|
2020-04-09 17:58:29 +01:00
|
|
|
buildDunePackage rec {
|
2021-01-21 00:24:35 +00:00
|
|
|
pname = "cstruct-sexp";
|
|
|
|
inherit (cstruct) version src useDune2 meta;
|
2019-08-24 08:02:26 +01:00
|
|
|
|
2020-10-25 18:54:25 +00:00
|
|
|
minimumOCamlVersion = "4.03";
|
|
|
|
|
|
|
|
# alcotest is only available on OCaml >= 4.05 due to fmt
|
|
|
|
doCheck = lib.versionAtLeast ocaml.version "4.05";
|
|
|
|
checkInputs = [ alcotest ];
|
2019-08-24 08:02:26 +01:00
|
|
|
|
2021-01-21 00:24:35 +00:00
|
|
|
propagatedBuildInputs = [ cstruct sexplib ];
|
2019-08-24 08:02:26 +01:00
|
|
|
}
|