mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-24 22:53:42 +00:00
33afbf39f6
checkInputs used to be added to nativeBuildInputs. Now we have nativeCheckInputs to do that instead. Doing this treewide change allows to keep hashes identical to before the introduction of nativeCheckInputs.
40 lines
916 B
Nix
40 lines
916 B
Nix
{ lib, buildDunePackage, fetchFromGitHub, ppxlib, ounit
|
|
, ppx_deriving, yojson
|
|
}:
|
|
|
|
let param =
|
|
if lib.versionAtLeast ppxlib.version "0.26" then {
|
|
version = "3.7.0";
|
|
sha256 = "sha256-niKxn1fX0mL1MhlZvbN1wgRed9AHh+z9s6l++k1VX9k=";
|
|
} else {
|
|
version = "3.6.1";
|
|
sha256 = "1icz5h6p3pfj7my5gi7wxpflrb8c902dqa17f9w424njilnpyrbk";
|
|
}
|
|
; 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 ];
|
|
|
|
doCheck = true;
|
|
nativeCheckInputs = [ ounit ];
|
|
|
|
meta = {
|
|
description = "A Yojson codec generator for OCaml >= 4.04";
|
|
inherit (src.meta) homepage;
|
|
license = lib.licenses.mit;
|
|
maintainers = [ lib.maintainers.vbgl ];
|
|
};
|
|
}
|