Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 16.09 30 lines 897 B view raw
1{ stdenv, fetchurl, ocaml, findlib, uutf }: 2 3let version = "0.9.1"; in 4 5stdenv.mkDerivation { 6 name = "ocaml-jsonm-${version}"; 7 8 src = fetchurl { 9 url = "http://erratique.ch/software/jsonm/releases/jsonm-${version}.tbz"; 10 sha256 = "0wszqrmx8iqlwzvs76fjf4sqh15mv20yjrbyhkd348yq8nhdrm1z"; 11 }; 12 13 buildInputs = [ ocaml findlib ]; 14 propagatedBuildInputs = [ uutf ]; 15 16 unpackCmd = "tar xjf $src"; 17 18 configurePhase = "ocaml setup.ml -configure --prefix $prefix"; 19 buildPhase = "ocaml setup.ml -build"; 20 createFindlibDestdir = true; 21 installPhase = "ocaml setup.ml -install"; 22 23 meta = { 24 description = "An OCaml non-blocking streaming codec to decode and encode the JSON data format"; 25 homepage = http://erratique.ch/software/jsonm; 26 license = stdenv.lib.licenses.bsd3; 27 maintainers = with stdenv.lib.maintainers; [ vbgl ]; 28 platforms = ocaml.meta.platforms or []; 29 }; 30}