about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/yojson
diff options
context:
space:
mode:
authorVincent Laporte <vincent.laporte@gmail.com>2014-07-05 08:50:47 +0200
committerVincent Laporte <vincent.laporte@gmail.com>2014-07-05 09:00:12 +0200
commit925613663513f3306e47e25130a1d2e02945e305 (patch)
treec9fec26f4b020e6d0b57fe995d6b0bf8fb61bb23 /pkgs/development/ocaml-modules/yojson
parent67e4df75dd361b2af34d3abbb0f174dada692fac (diff)
Adds yojson.
Yojson is an optimized parsing and printing OCaml library for the JSON
format, contributed by Martin Jambon.

Webpage: http://mjambon.com/yojson.html
Diffstat (limited to 'pkgs/development/ocaml-modules/yojson')
-rw-r--r--pkgs/development/ocaml-modules/yojson/default.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/yojson/default.nix b/pkgs/development/ocaml-modules/yojson/default.nix
new file mode 100644
index 0000000000000..9237db080d679
--- /dev/null
+++ b/pkgs/development/ocaml-modules/yojson/default.nix
@@ -0,0 +1,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;
+  };
+}