summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/yojson/default.nix
blob: 9237db080d679a51e58beafe6c27d2ff6d455213 (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
31
32
{stdenv, fetchurl, ocaml, findlib, cppo, easy-format, biniou}:
let
  pname = "yojson";
  version = "1.1.8";
  webpage = "http://mjambon.com/${pname}.html";
in
stdenv.mkDerivation rec {

  name = "${pname}-${version}";

  src = fetchurl {
    url = "http://mjambon.com/releases/${pname}/${name}.tar.gz";
    sha256 = "0ayx17dimnpavdfyq6dk9xv2x1fx69by85vc6vl3nqxjkcv5d2rv";
  };

  buildInputs = [ ocaml findlib cppo easy-format biniou ];

  createFindlibDestdir = true;

  makeFlags = "PREFIX=$(out)";

  preBuild = ''
    mkdir $out/bin
  '';

  meta = {
    description = "An optimized parsing and printing library for the JSON format";
    homepage = "${webpage}";
    license = stdenv.lib.licenses.bsd3;
    platforms = ocaml.meta.platforms;
  };
}