From 0cec908a97f2ce538d0dbf62fc8c43e05a2907a5 Mon Sep 17 00:00:00 2001
From: Ahmad Jarara <git@ajarara.io>
Date: Fri, 5 Nov 2021 12:42:05 -0400
Subject: [PATCH 1/3] gnu: Add libcbor 0.8.0
* gnu/packages/compression.scm (libcbor): New variable.
---
gnu/packages/compression.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
@@ -2730,3 +2730,36 @@ (define-public tarlz
tar tools like GNU tar, which treat it like any other tar.lz archive. Tarlz
can append files to the end of such compressed archives.")
(license license:gpl2+)))
+
+(define-public libcbor
+ (package
+ (name "libcbor")
+ (version "0.8.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/PJK/libcbor")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256 (base32 "01dv4vxcmbvpphqy16vqiwh25wx11x630js5wfnx7cryarsh9ld7"))))
+ (build-system cmake-build-system)
+ (arguments
+ '(#:configure-flags
+ (let* ((out (assoc-ref %outputs "out"))
+ (lib (string-append out "/lib")))
+ (list
+ "-DCMAKE_BUILD_TYPE=Release"
+ "-DBUILD_SHARED_LIBS=ON"
+ "-DCBOR_CUSTOM_ALLOC=ON"
+ (string-append "-DCMAKE_INSTALL_LIBDIR=" lib)
+ (string-append "-DCMAKE_INSTALL_RPATH=" lib)))))
+ (synopsis "The C library for parsing and generating CBOR")
+ (description
+ "The Concise Binary Object Representation (CBOR) is a data format whose
+design goals include the possibility of extremely small code size, fairly
+small message size, and extensibility without the need for version
+negotiation. These design goals make it different from earlier binary
+serializations such as ASN.1 and MessagePack.")
+ (license license:expat)
+ (home-page "https://github.com/PJK/libcbor")))
base-commit: 1ffc0a6be3c1613b2d99ceea098174d1f11f6f3f
--
2.33.1