13 ocaml-migrate-parsetree,
15 if lib.versionAtLeast ppxlib.version "0.32" then
17 else if lib.versionAtLeast ppxlib.version "0.20" then
19 else if lib.versionAtLeast ppxlib.version "0.15" then
28 "6.0.3" = "sha256-N0qpezLF4BwJqXgQpIv6IYwhO1tknkRSEBRVrBnJSm0=";
29 "5.2.1" = "sha256:11h75dsbv3rs03pl67hdd3lbim7wjzh257ij9c75fcknbfr5ysz9";
30 "5.1" = "sha256:1i64fd7qrfzbam5hfbl01r0sx4iihsahcwqj13smmrjlnwi3nkxh";
31 "5.0" = "sha256:0fkzrn4pdyvf1kl0nwvhqidq01pnq3ql8zk1jd56hb0cxaw851w3";
36 buildDunePackage rec {
37 pname = "ppx_deriving";
41 url = "https://github.com/ocaml-ppx/ppx_deriving/releases/download/v${version}/ppx_deriving-${lib.optionalString (lib.versionOlder version "6.0") "v"}${version}.tbz";
47 nativeBuildInputs = [ cppo ];
52 propagatedBuildInputs =
53 lib.optional (lib.versionOlder version "5.2") ocaml-migrate-parsetree
57 ++ lib.optional (lib.versionOlder version "6.0") result;
59 doCheck = lib.versionAtLeast ocaml.version "4.08";
61 (if lib.versionAtLeast version "5.2" then ounit2 else ounit)
65 description = "deriving is a library simplifying type-driven code generation on OCaml >=4.02";
66 maintainers = [ maintainers.maurer ];
67 license = licenses.mit;