nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildDunePackage,
4 fetchFromGitHub,
5 ppx_js_style,
6 ppx_yojson_conv_lib,
7 ppxlib,
8 version ? if lib.versionAtLeast ppxlib.version "0.36.0" then "0.17.1" else "0.15.1",
9}:
10buildDunePackage {
11 pname = "ppx_yojson_conv";
12 inherit version;
13
14 src = fetchFromGitHub {
15 owner = "janestreet";
16 repo = "ppx_yojson_conv";
17 tag = "v${version}";
18 hash =
19 {
20 "0.15.1" = "sha256-lSOUSMVgsRiArEhFTKpAj2yFBPbtaIc/SxdPA+24xXs=";
21 "0.17.1" = "sha256-QI2uN1/KeyDxdk6oxPt48lDir55Kkgx2BX6wKCY59LI=";
22 }
23 ."${version}";
24 };
25
26 propagatedBuildInputs = [
27 ppx_js_style
28 ppx_yojson_conv_lib
29 ppxlib
30 ];
31
32 meta = {
33 description = "PPX syntax extension that generates code for converting OCaml types to and from Yojson";
34 homepage = "https://github.com/janestreet/ppx_yojson_conv";
35 maintainers = with lib.maintainers; [ djacu ];
36 license = with lib.licenses; [ mit ];
37 };
38}