2020-04-09 09:58:32 -07:00
|
|
|
{ lib, buildDunePackage, ocaml, alcotest, cstruct, sexplib }:
|
2019-08-24 00:02:26 -07:00
|
|
|
|
|
|
|
if !lib.versionAtLeast (cstruct.version or "1") "3"
|
|
|
|
then cstruct
|
|
|
|
else
|
|
|
|
|
2020-04-09 09:58:29 -07:00
|
|
|
buildDunePackage rec {
|
2019-08-24 00:02:26 -07:00
|
|
|
pname = "cstruct-sexp";
|
|
|
|
inherit (cstruct) version src meta;
|
|
|
|
|
2020-04-09 09:58:32 -07:00
|
|
|
doCheck = lib.versionAtLeast ocaml.version "4.03";
|
2020-04-09 09:58:29 -07:00
|
|
|
checkInputs = lib.optional doCheck alcotest;
|
2019-08-24 00:02:26 -07:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ cstruct sexplib ];
|
|
|
|
}
|
|
|
|
|