summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDariqq <dariqq@posteo.net>2025-01-15 20:16:42 +0000
committerSharlatan Hellseher <sharlatanus@gmail.com>2025-01-15 21:39:08 +0000
commit1fc41ca4096be8186bf720fd62d52bdb877ba2a2 (patch)
tree6c4886fd847dc1b1e506097377727ab53dc7892b
parent6f74832d45b4b86208606af8c23868687f863a28 (diff)
gnu: Add yyjson.
* gnu/packages/c.scm (yyjson): New variable. Change-Id: Ica9ff2e1b6676aa8761eb33cbab76154f17e443f Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
-rw-r--r--gnu/packages/c.scm44
1 files changed, 44 insertions, 0 deletions
diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index 07df24d4e1..2787d065b5 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -22,6 +22,7 @@
;;; Copyright © 2023, 2024 Foundation Devices, Inc. <hello@foundation.xyz>
;;; Copyright © 2023, 2024 David Elsing <david.elsing@posteo.net>
;;; Copyright @ 2022, Kitzman <kitzman@disroot.org>
+;;; Copyright @ 2025 Dariqq <dariqq@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1764,3 +1765,46 @@ program instances execute in parallel on the hardware.")
Linear Congruential Generator (LCG) with a permutation function to increase
output randomness while retaining speed, simplicity, and conciseness.")
(license (list license:expat license:asl2.0))))) ; dual licensed
+
+(define-public yyjson
+ (package
+ (name "yyjson")
+ (version "0.10.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ibireme/yyjson")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0kmzgs24v0rxlibg4qwlm6yplzs96pgxb1gyviijhkra9z7lx7ws"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:configure-flags #~(list "-DBUILD_SHARED_LIBS=ON"
+ "-DYYJSON_BUILD_TESTS=ON")))
+ (home-page "https://github.com/ibireme/yyjson")
+ (synopsis "C implementation of JSON RFC 8259")
+ (description
+ "This package provides an implementation of JSON in ANSI C as specified
+in RFC 8259.
+Features:
+@itemize
+@item Fast: can read or write gigabytes per second JSON data on modern CPUs.
+@item Portable: complies with ANSI C (C89) for cross-platform compatibility.
+@item Strict: complies with
+@url{https://datatracker.ietf.org/doc/html/rfc8259,RFC 8259} JSON standard,
+ensuring strict number format and UTF-8 validation.
+@item Extendable: offers options to allow comments, trailing commas, NaN/Inf,
+ and custom memory allocator.
+@item Accuracy: can accurately read and write @code{int64}, @code{uint64}, and
+@code{double} numbers.
+@item Flexible: supports unlimited JSON nesting levels, @code{\\u0000}
+characters, and non null-terminated strings.
+@item Manipulation: supports querying and modifying using JSON Pointer,
+JSON Patch and JSON Merge Patch.
+@item Developer-Friendly: easy integration with only one @code{.h} and one
+@code{.c} file.
+@end itemize")
+ (license license:expat)))