guix_mirror_bot pushed a commit to branch ocaml-team
in repository guix.
commit afc689bf22b7f3740262c63dfc857559b8368e7c
Author: Jason Conroy <[email protected]>
AuthorDate: Thu Jan 15 13:15:33 2026 -0500
gnu: ocaml5: Add ocaml-yojson.
* gnu/packages/ocaml5.scm (ocaml-yojson): New variable.
Change-Id: I2a86e9b856d2792f12e8208f5349b3a0070e47e3
Signed-off-by: Julien Lepiller <[email protected]>
---
gnu/packages/ocaml5.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/gnu/packages/ocaml5.scm b/gnu/packages/ocaml5.scm
index d2eb3c61ec..297390cfd9 100644
--- a/gnu/packages/ocaml5.scm
+++ b/gnu/packages/ocaml5.scm
@@ -1715,6 +1715,35 @@ also create your own representation and use it to
instantiate a new set of
combinators.")
(license license:lgpl2.1)))
+(define-public ocaml-yojson
+ (package
+ (name "ocaml5-yojson")
+ (version "2.0.2")
+ (home-page "https://github.com/ocaml-community/yojson")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url (string-append home-page ".git"))
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1habsh00ihjhk1g1csxqg3hj8izk5zvgc7wm579wyjw35vzcmwr1"))))
+ (build-system dune-build-system)
+ (arguments
+ `(#:package "yojson"))
+ (propagated-inputs (list ocaml-seq))
+ (native-inputs (list ocaml-alcotest ocaml-cppo))
+ (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)))
+
;;;
;;; Avoid adding new packages to the end of this file. To reduce the chances
;;; of a merge conflict, place them above by existing packages with similar