Gabriel Hondet wrote 6 years ago
(address . guix-patches@gnu.org)
* gnu/packages/ocaml.scm (ocaml-yojson): New variable.
---
gnu/packages/ocaml.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
Toggle diff (49 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 4cfd203bd..6a16f0729 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -5085,3 +5085,42 @@ functionality but allows implementations several times faster (4 times faster
than yojson), with 25-35% space savings.")
(license license:bsd-3)))
+(define-public ocaml-yojson
+ (package
+ (name "ocaml-yojson")
+ (version "1.4.1")
+ (home-page "https://github.com/ocaml-community/yojson")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url (string-append home-page ".git"))
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0nwsfkmqpyfab4rxq76q8ff7giyanghw08094jyrp275v99zdjr9"))))
+ (build-system ocaml-build-system)
+ (inputs
+ `(("biniou" ,ocaml-biniou)
+ ("ocaml-easy-format" ,ocaml-easy-format)
+ ("cppo" ,ocaml-cppo)))
+ (native-inputs
+ `(("jbuilder" ,ocaml-jbuilder)))
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'install
+ (lambda _
+ (invoke "jbuilder" "install"
+ (string-append "--prefix="
+ (assoc-ref %outputs "out"))))))))
+ (synopsis "Low-level JSON library for OCaml")
+ (description "Yojson is an optimized parsing and printing library for the
+JSON format. It addresses a few shortcomings of json-wheel including 2x
+speedup, polymorphic variants and optional syntax for tuples and variants.
+@code{ydump} is a pretty printing command-line program provided with the
+yojson package. The program @code{atdgen} can be used to derive OCaml-JSON
+serializers and deserializers from type definitions.")
+ (license license:bsd-3)))
--
2.20.1
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEE5ercJXBcjd3P1FcAMbyBBfZZ1CUFAlwkdtoACgkQMbyBBfZZ
1CXhJxAAgIky+e1qglcVvV7Sbj8zE1+vxQZn4FL1gDWCnCwETTq99CUNfB2f2AC7
ZvQ5ktxGwclc2rgkxjHdGdIVPCL5yUOUGw5U2sJpnuuIl9vMPtnZMivwhBA/lNB8
FouGju6/7gqYwpV7lf0mnxVPmErtiIAvM1pK3rxOiR4Y8Y6UPyoYNR9zUXYE5gO7
VD4ABtdMqc+AhMXqxv5VA3UtwHDQ4RjLCdovtGhUilNlrrIuWn34GZZps5uJoonm
7+c10Ws4vUeVbEKZZk3yrProBpRVvfVHo3+BMGZXRC38pgBhGZUfaNmPgGftJiPc
YuzCQAzFVfnYac5iNLy/Gl0umnkkekKZLEhRdXAS/nGMi3HDKpEsHxyVBimQg7YQ
+JDrtlWcb7FrHXox1jNntav+ls7Cj0R10UNOK7/rZvkJ5nomQqCx3vS1RZH+wc5q
Ms6m9KwDwl5Eb69Ere8J64O3iYLxmVesK++zif3Zf0LHSqXyW0vw5oQwvyhO27WP
P/25ncR0Waz4qNA6upN/I74Uf2NDl6lPv6W2MiK4r3rtJoqgqAsQAi/dE2SHqaM3
ufLW1SMMQKoCR2yPvg6wsbKlfLTr7VJSFPGVBR7Fb+8s3mTxiMxJVMlehc4+vqCk
mIPf96TZI2F4V6Y1KlplrBUteh5spOHBoBsiIp3OAQzZT856fXw=
=P+d1
-----END PGP SIGNATURE-----