guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

04/05: gnu: Add nanopb.


From: guix-commits
Subject: 04/05: gnu: Add nanopb.
Date: Wed, 31 Aug 2022 10:36:38 -0400 (EDT)

apteryx pushed a commit to branch master
in repository guix.

commit cc3cc72d859cc514bd62027898b497116dd28459
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Tue Aug 30 23:34:49 2022 -0400

    gnu: Add nanopb.
    
    * gnu/packages/protobuf.scm (nanopb): New variable.
---
 gnu/packages/protobuf.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/protobuf.scm b/gnu/packages/protobuf.scm
index 6c3a47986d..dcb742a463 100644
--- a/gnu/packages/protobuf.scm
+++ b/gnu/packages/protobuf.scm
@@ -237,6 +237,39 @@ encoder in C++.  The developer using protozero has to 
manually translate the
               license:asl2.0            ; for folly
               license:bsd-2))))
 
+(define-public nanopb
+  (package
+    (name "nanopb")
+    (version "0.4.6.4")
+    (source (origin
+              (method git-fetch)        ;for tests
+              (uri (git-reference
+                    (url "https://github.com/nanopb/nanopb";)
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0gb6q4igrjj8jap4p1ijza4y8dkjlingzym3cli1w18f90d7xlh7"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list
+      #:configure-flags #~(list "-DBUILD_SHARED_LIBS=ON"
+                                "-DBUILD_STATIC_LIBS=OFF")
+      #:phases
+      #~(modify-phases %standard-phases
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                (with-directory-excursion "../source/tests"
+                  (invoke "scons"))))))))
+    (native-inputs (list protobuf python-protobuf python-wrapper scons))
+    (home-page "https://jpa.kapsi.fi/nanopb/";)
+    (synopsis "Small code-size Protocol Buffers implementation in ANSI C")
+    (description "Nanopb is a small code-size Protocol Buffers implementation
+in ansi C.  It is especially suitable for use in microcontrollers, but fits
+any memory-restricted system.")
+    (license license:zlib)))
+
 (define-public python-protobuf
   (package
     (name "python-protobuf")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]