12 , ocaml-migrate-parsetree
16 if lib.versionAtLeast ppxlib.version "0.20" then {
18 sha256 = "11h75dsbv3rs03pl67hdd3lbim7wjzh257ij9c75fcknbfr5ysz9";
19 } else if lib.versionAtLeast ppxlib.version "0.15" then {
21 sha256 = "1i64fd7qrfzbam5hfbl01r0sx4iihsahcwqj13smmrjlnwi3nkxh";
24 sha256 = "0fkzrn4pdyvf1kl0nwvhqidq01pnq3ql8zk1jd56hb0cxaw851w3";
28 buildDunePackage rec {
29 pname = "ppx_deriving";
30 inherit (params) version;
33 url = "https://github.com/ocaml-ppx/ppx_deriving/releases/download/v${version}/ppx_deriving-v${version}.tbz";
34 inherit (params) sha256;
39 nativeBuildInputs = [ cppo ];
40 buildInputs = [ findlib ppxlib ];
41 propagatedBuildInputs =
42 lib.optional (lib.versionOlder version "5.2") ocaml-migrate-parsetree ++ [
47 doCheck = lib.versionAtLeast ocaml.version "4.08"
48 && lib.versionOlder ocaml.version "5.0";
50 (if lib.versionAtLeast version "5.2" then ounit2 else ounit)
54 description = "deriving is a library simplifying type-driven code generation on OCaml >=4.02";
55 maintainers = [ maintainers.maurer ];
56 license = licenses.mit;