ocamlPackages.base_quickcheck: 0.17.0 → 0.17.1 ocamlPackages.optcomp: 0.17.0 → 0.17.1 ocamlPackages.ppx_bench: 0.17.0 → 0.17.1 ocamlPackages.ppx_bin_prot: 0.17.0 → 0.17.1 ocamlPackages.ppx_deriving: 6.0.3 → 6.1.0 ocamlPackages.ppx_deriving_qcheck: 0.6 → 0.7 ocamlPackages.ppx_deriving_yaml: 0.3.0 → 0.4.1 ocamlPackages.ppx_deriving_yojson: 3.9.0 → 3.10.0 ocamlPackages.ppx_diff: 0.17.0 → 0.17.1 ocamlPackages.ppx_expect: 0.17.2 → 0.17.3 ocamlPackages.ppx_globalize: 0.17.0 → 0.17.2 ocamlPackages.ppx_inline_test: 0.17.0 → 0.17.1 ocamlPackages.ppx_let: 0.17.0 → 0.17.1 ocamlPackages.ppx_stable: 0.17.0 → 0.17.1 ocamlPackages.ppx_tydi: 0.17.0 → 0.17.1 ocamlPackages.ppx_typeprep_conv: 0.17.0 → 0.17.1 ocamlPackages.ppx_variants_conv: 0.17.0 → 0.17.1 ocamlPackages.sexp_conv: 0.17.0 → 0.17.1 ocamlPackages.sexp_message: 0.17.2 → 0.17.4 reason: 3.15.0 → 3.16.0 ocamlPackages.bisect_ppx: make compatible with ppxlib 0.36 ocamlPackages.config: make compatible with ppxlib 0.36 ocamlPackages.lwt_ppx: make compatible with ppxlib 0.36 ocamlPackages.melange: make compatible with ppxlib 0.36 ocamlPackages.ppx_bitstring: make compatible with ppxlib 0.36 ocamlPackages.ppx_repr: make compatible with ppxlib 0.36 ocamlPackages.bistro: mark as broken ocamlPackages.dream-html: mark as broken ocamlPackages.ocsigen-ppx-rpc: mark as broken ocamlPackages.ppx_deriving_cmdliner: mark as broken ocamlPackages.reason-react-ppx: mark as broken
73 lines
1.8 KiB
Nix
73 lines
1.8 KiB
Nix
{
|
|
lib,
|
|
fetchurl,
|
|
buildDunePackage,
|
|
ocaml,
|
|
findlib,
|
|
cppo,
|
|
ppxlib,
|
|
ppx_derivers,
|
|
result,
|
|
ounit,
|
|
ounit2,
|
|
ocaml-migrate-parsetree,
|
|
version ?
|
|
if lib.versionAtLeast ppxlib.version "0.36" then
|
|
"6.1.0"
|
|
else if lib.versionAtLeast ppxlib.version "0.32" then
|
|
"6.0.3"
|
|
else if lib.versionAtLeast ppxlib.version "0.20" then
|
|
"5.2.1"
|
|
else if lib.versionAtLeast ppxlib.version "0.15" then
|
|
"5.1"
|
|
else
|
|
"5.0",
|
|
}:
|
|
|
|
let
|
|
hash =
|
|
{
|
|
"6.1.0" = "sha256-dHpWiOpjD3elCw6QJUrG+KZr3Ul0suhzdjQUJ4B9S1Y=";
|
|
"6.0.3" = "sha256-N0qpezLF4BwJqXgQpIv6IYwhO1tknkRSEBRVrBnJSm0=";
|
|
"5.2.1" = "sha256:11h75dsbv3rs03pl67hdd3lbim7wjzh257ij9c75fcknbfr5ysz9";
|
|
"5.1" = "sha256:1i64fd7qrfzbam5hfbl01r0sx4iihsahcwqj13smmrjlnwi3nkxh";
|
|
"5.0" = "sha256:0fkzrn4pdyvf1kl0nwvhqidq01pnq3ql8zk1jd56hb0cxaw851w3";
|
|
}
|
|
."${version}";
|
|
in
|
|
|
|
buildDunePackage rec {
|
|
pname = "ppx_deriving";
|
|
inherit version;
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/ocaml-ppx/ppx_deriving/releases/download/v${version}/ppx_deriving-${lib.optionalString (lib.versionOlder version "6.0") "v"}${version}.tbz";
|
|
inherit hash;
|
|
};
|
|
|
|
strictDeps = true;
|
|
|
|
nativeBuildInputs = [ cppo ];
|
|
buildInputs = [
|
|
findlib
|
|
];
|
|
propagatedBuildInputs =
|
|
lib.optional (lib.versionOlder version "5.2") ocaml-migrate-parsetree
|
|
++ [
|
|
ppx_derivers
|
|
ppxlib
|
|
]
|
|
++ lib.optional (lib.versionOlder version "6.0") result;
|
|
|
|
doCheck = lib.versionAtLeast ocaml.version "4.08";
|
|
checkInputs = [
|
|
(if lib.versionAtLeast version "5.2" then ounit2 else ounit)
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Library simplifying type-driven code generation on OCaml >=4.02";
|
|
maintainers = [ maintainers.maurer ];
|
|
license = licenses.mit;
|
|
};
|
|
}
|