Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

67 lines
1.4 KiB
Nix

{
lib,
buildDunePackage,
fetchFromGitHub,
ocaml,
ppxlib,
ounit,
ounit2,
ppx_deriving,
result,
yojson,
}:
let
param =
if lib.versionAtLeast ppxlib.version "0.36" then
{
version = "3.10.0";
sha256 = "sha256-Dy9egNpZdxsTPLo2mbpiFTMh5cYUXXOlOZLlQJuAK+E=";
checkInputs = [ ounit2 ];
}
else if lib.versionAtLeast ppxlib.version "0.30" then
{
version = "3.9.0";
sha256 = "sha256-0d6YcBkeFoHXffCYjLIIvruw8B9ZB6NbUijhTv9uyN8=";
checkInputs = [ ounit2 ];
}
else
{
version = "3.6.1";
sha256 = "1icz5h6p3pfj7my5gi7wxpflrb8c902dqa17f9w424njilnpyrbk";
checkInputs = [ ounit ];
propagatedBuildInputs = [ result ];
};
in
buildDunePackage rec {
pname = "ppx_deriving_yojson";
inherit (param) version;
minimalOCamlVersion = "4.07";
src = fetchFromGitHub {
owner = "ocaml-ppx";
repo = "ppx_deriving_yojson";
rev = "v${version}";
inherit (param) sha256;
};
propagatedBuildInputs = [
ppxlib
ppx_deriving
yojson
]
++ param.propagatedBuildInputs or [ ];
doCheck = lib.versionAtLeast ocaml.version "4.08";
inherit (param) checkInputs;
meta = {
description = "Yojson codec generator for OCaml >= 4.04";
inherit (src.meta) homepage;
license = lib.licenses.mit;
maintainers = [ lib.maintainers.vbgl ];
};
}