567e8dfd8e
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
39 lines
933 B
Nix
39 lines
933 B
Nix
{
|
|
lib,
|
|
buildDunePackage,
|
|
fetchFromGitHub,
|
|
ppx_js_style,
|
|
ppx_yojson_conv_lib,
|
|
ppxlib,
|
|
version ? if lib.versionAtLeast ppxlib.version "0.36.0" then "0.17.1" else "0.15.1",
|
|
}:
|
|
buildDunePackage {
|
|
pname = "ppx_yojson_conv";
|
|
inherit version;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "janestreet";
|
|
repo = "ppx_yojson_conv";
|
|
tag = "v${version}";
|
|
hash =
|
|
{
|
|
"0.15.1" = "sha256-lSOUSMVgsRiArEhFTKpAj2yFBPbtaIc/SxdPA+24xXs=";
|
|
"0.17.1" = "sha256-QI2uN1/KeyDxdk6oxPt48lDir55Kkgx2BX6wKCY59LI=";
|
|
}
|
|
."${version}";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
ppx_js_style
|
|
ppx_yojson_conv_lib
|
|
ppxlib
|
|
];
|
|
|
|
meta = {
|
|
description = "PPX syntax extension that generates code for converting OCaml types to and from Yojson";
|
|
homepage = "https://github.com/janestreet/ppx_yojson_conv";
|
|
maintainers = with lib.maintainers; [ djacu ];
|
|
license = with lib.licenses; [ mit ];
|
|
};
|
|
}
|