summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Hondet <gabrielhondet@gmail.com>2018-12-27 07:25:12 +0100
committerJulien Lepiller <julien@lepiller.eu>2018-12-27 09:37:40 +0100
commit2e951707f505db2d6e3a94a842b4319aa9b07e39 (patch)
tree0a3bdf20d48b6259d2cedda5d5a2fb2b4c3a54df
parent2939fe7b3cb5a53daebab7b7734e29be3ba8d153 (diff)
gnu: Add ocaml-yojson.
* gnu/packages/ocaml.scm (ocaml-yojson): New variable. Signed-off-by: Julien Lepiller <julien@lepiller.eu>
-rw-r--r--gnu/packages/ocaml.scm29
1 files changed, 29 insertions, 0 deletions
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index a5193c7b3cc..aeff7b50e9d 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -5073,3 +5073,32 @@ protocols evolve. Biniou is vastly equivalent to JSON in terms of
5073functionality but allows implementations several times faster (4 times faster 5073functionality but allows implementations several times faster (4 times faster
5074than yojson), with 25-35% space savings.") 5074than yojson), with 25-35% space savings.")
5075 (license license:bsd-3))) 5075 (license license:bsd-3)))
5076
5077(define-public ocaml-yojson
5078 (package
5079 (name "ocaml-yojson")
5080 (version "1.4.1")
5081 (home-page "https://github.com/ocaml-community/yojson")
5082 (source
5083 (origin
5084 (method git-fetch)
5085 (uri (git-reference
5086 (url (string-append home-page ".git"))
5087 (commit (string-append "v" version))))
5088 (file-name (git-file-name name version))
5089 (sha256
5090 (base32
5091 "0nwsfkmqpyfab4rxq76q8ff7giyanghw08094jyrp275v99zdjr9"))))
5092 (build-system dune-build-system)
5093 (inputs
5094 `(("ocaml-biniou" ,ocaml-biniou)
5095 ("ocaml-easy-format" ,ocaml-easy-format)
5096 ("ocaml-cppo" ,ocaml-cppo)))
5097 (synopsis "Low-level JSON library for OCaml")
5098 (description "Yojson is an optimized parsing and printing library for the
5099JSON format. It addresses a few shortcomings of json-wheel including 2x
5100speedup, polymorphic variants and optional syntax for tuples and variants.
5101@code{ydump} is a pretty printing command-line program provided with the
5102yojson package. The program @code{atdgen} can be used to derive OCaml-JSON
5103serializers and deserializers from type definitions.")
5104 (license license:bsd-3)))