10 , ocaml-migrate-parsetree
11 , ocaml-migrate-parsetree-2
15 if lib.versionAtLeast ppxlib.version "0.20" then {
17 sha256 = "11h75dsbv3rs03pl67hdd3lbim7wjzh257ij9c75fcknbfr5ysz9";
19 } else if lib.versionAtLeast ppxlib.version "0.15" then {
21 sha256 = "1i64fd7qrfzbam5hfbl01r0sx4iihsahcwqj13smmrjlnwi3nkxh";
25 sha256 = "0fkzrn4pdyvf1kl0nwvhqidq01pnq3ql8zk1jd56hb0cxaw851w3";
30 buildDunePackage rec {
31 pname = "ppx_deriving";
32 inherit (params) version;
37 url = "https://github.com/ocaml-ppx/ppx_deriving/releases/download/v${version}/ppx_deriving-v${version}.tbz";
38 inherit (params) sha256;
41 # This currently fails with dune
44 nativeBuildInputs = [ cppo ];
45 buildInputs = [ ppxlib ];
46 propagatedBuildInputs = [
48 then ocaml-migrate-parsetree-2
49 else ocaml-migrate-parsetree)
56 (if lib.versionAtLeast version "5.2" then ounit2 else ounit)
60 description = "deriving is a library simplifying type-driven code generation on OCaml >=4.02.";
61 maintainers = [ maintainers.maurer ];
62 license = licenses.mit;