1{ stdenv, fetchzip, ocaml, findlib, cppo, easy-format, biniou }:
2let
3 pname = "yojson";
4 version = "1.2.3";
5in
6stdenv.mkDerivation {
7
8 name = "ocaml-${pname}-${version}";
9
10 src = fetchzip {
11 url = "https://github.com/mjambon/${pname}/archive/v${version}.tar.gz";
12 sha256 = "10dvkndgwanvw4agbjln7kgb1n9s6lii7jw82kwxczl5rd1sgmvl";
13 };
14
15 buildInputs = [ ocaml findlib ];
16
17 propagatedBuildInputs = [ cppo easy-format biniou ];
18
19 createFindlibDestdir = true;
20
21 makeFlags = "PREFIX=$(out)";
22
23 preBuild = ''
24 mkdir $out/bin
25 '';
26
27 meta = with stdenv.lib; {
28 description = "An optimized parsing and printing library for the JSON format";
29 homepage = "http://mjambon.com/${pname}.html";
30 license = licenses.bsd3;
31 maintainers = [ maintainers.vbgl ];
32 platforms = ocaml.meta.platforms or [];
33 };
34}