nixpkgs/pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix
Alexis Hildebrandt 755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00

39 lines
950 B
Nix

{ lib, buildDunePackage, fetchFromGitHub, ocaml, 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 = lib.versionAtLeast ocaml.version "4.08";
checkInputs = [ ounit ];
meta = {
description = "Yojson codec generator for OCaml >= 4.04";
inherit (src.meta) homepage;
license = lib.licenses.mit;
maintainers = [ lib.maintainers.vbgl ];
};
}