Subject: [PATCH v3 10/32] gnu: Add libnop.

From: David Elsing <[email-masked]>
Date: Wed, 20 Mar 2024 22:38:35 +0000

* gnu/packages/serialization.scm (libnop): New variable.
---
 gnu/packages/serialization.scm | 39 ++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
index 331fae80cf..bfee0dbfc6 100644
--- a/gnu/packages/serialization.scm
+++ b/gnu/packages/serialization.scm
@@ -19,6 +19,7 @@
 ;;; Copyright © 2023 Zheng Junjie <[email-masked]>
 ;;; Copyright © 2024 Paul A. Patience <[email-masked]>
 ;;; Copyright © 2024 Arun Isaac <[email-masked]>
+;;; Copyright © 2024 David Elsing <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -936,3 +937,41 @@ (define-public python-feather-format
     (description "This package provides a Python wrapper library to the
 Apache Arrow-based Feather binary columnar serialization data frame format.")
     (license license:asl2.0)))
+
+(define-public libnop
+  (let ((commit "35e800d81f28c632956c5a592e3cbe8085ecd430")
+        (revision "0"))
+    (package
+      (name "libnop")
+      (version (git-version "0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/google/libnop")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "0qqbaljq54qiq0dky9nj47igfcs065ry526jg9a0aafbfl9krpy2"))))
+      (build-system gnu-build-system)
+      (arguments
+       (list
+        #:test-target "test"
+        #:phases
+        #~(modify-phases %standard-phases
+            (delete 'configure)
+            (replace 'check
+              (lambda* (#:key tests? #:allow-other-keys)
+                (when tests?
+                  (invoke "out/test"))))
+            (replace 'install
+              (lambda _
+                (copy-recursively
+                 "include" (string-append #$output "/include")))))))
+      (native-inputs (list googletest))
+      (home-page "https://github.com/google/libnop")
+      (synopsis "C++ Native Object Protocols")
+      (description "@code{libnop} is a header-only library for serializing and
+deserializing C++ data types without external code generators or runtime
+support libraries.")
+      (license license:asl2.0))))
-- 
2.41.0