From 925613663513f3306e47e25130a1d2e02945e305 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sat, 5 Jul 2014 08:50:47 +0200 Subject: [PATCH] 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 --- .../ocaml-modules/yojson/default.nix | 32 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/development/ocaml-modules/yojson/default.nix diff --git a/pkgs/development/ocaml-modules/yojson/default.nix b/pkgs/development/ocaml-modules/yojson/default.nix new file mode 100644 index 000000000000..9237db080d67 --- /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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c0a27fa1ab84..a043912dc8b7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3279,6 +3279,8 @@ let opam_1_1 = callPackage ../development/tools/ocaml/opam/1.1.nix { }; opam = opam_1_1; + yojson = callPackage ../development/ocaml-modules/yojson { }; + zarith = callPackage ../development/ocaml-modules/zarith { }; };