summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/jsonm/default.nix
blob: 5445fd1e110d0657769f03ba19103eadc57798bd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ stdenv, fetchurl, ocaml, findlib, uutf }:

let version = "0.9.1"; in

stdenv.mkDerivation {
  name = "ocaml-jsonm-${version}";

  src = fetchurl {
    url = "http://erratique.ch/software/jsonm/releases/jsonm-${version}.tbz";
    sha256 = "0wszqrmx8iqlwzvs76fjf4sqh15mv20yjrbyhkd348yq8nhdrm1z";
  };

  buildInputs = [ ocaml findlib ];
  propagatedBuildInputs = [ uutf ];

  unpackCmd = "tar xjf $src";

  configurePhase = "ocaml setup.ml -configure --prefix $prefix";
  buildPhase = "ocaml setup.ml -build";
  createFindlibDestdir = true;
  installPhase = "ocaml setup.ml -install";

  meta = {
    description = "An OCaml non-blocking streaming codec to decode and encode the JSON data format";
    homepage = http://erratique.ch/software/jsonm;
    licenses = stdenv.lib.licenses.bsd3;
    maintainers = with stdenv.lib.maintainers; [ vbgl ];
    platforms = ocaml.meta.platforms;
  };
}