diff mbox series

[bug#51219] gnu: Add libcbor

Message ID 134a7b0a-4104-4b51-a494-3ddd19ee3329@www.fastmail.com
State Accepted
Headers show
Series [bug#51219] gnu: Add libcbor | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Ahmad Jarara Oct. 27, 2021, 2:12 a.m. UTC
Figured out the lint problem: I think this should be good now.
diff mbox series

Patch

From 9800488a2060f8afd3b3dacd9b135e6d2b44c119 Mon Sep 17 00:00:00 2001
From: Ahmad Jarara <git@ajarara.io>
Date: Tue, 26 Oct 2021 22:08:18 -0400
Subject: [PATCH] gnu: Add libcbor

---
 gnu/packages/compression.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 3098230bd5..a8b429661b 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -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 "03gv6qn09kj7glq96rwc2g88j80xkykc95jnclfxb7iffxzkw4xd"))))
+    (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: 89d8417b371f3918f0508bbc561675ec100a6add
-- 
2.33.0