projects/guix·blob kernel-updates · refs

122 lines · 4.7 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2020 Justus Winter <[email protected]>
3;;; Copyright © 2024 Nicolas Graves <[email protected]>
4;;;
5;;; This file is part of GNU Guix.
6;;;
7;;; GNU Guix is free software; you can redistribute it and/or modify it
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
12;;; GNU Guix is distributed in the hope that it will be useful, but
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20(define-module (gnu packages openpgp)
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (guix git-download)
24 #:use-module (guix build-system cmake)
25 #:use-module (guix build-system gnu)
26 #:use-module (guix gexp)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (gnu packages)
29 #:use-module (gnu packages check)
30 #:use-module (gnu packages compression)
31 #:use-module (gnu packages crypto)
32 #:use-module (gnu packages gnupg)
33 #:use-module (gnu packages multiprecision)
34 #:use-module (gnu packages pkg-config)
35 #:use-module (gnu packages python)
36 #:use-module (gnu packages web))
37
38(define-public rnp
39 (let ((day-of-release "2025-11-21"))
40 (package
41 (name "rnp")
42 (version "0.18.1")
43 (source (origin
44 (method git-fetch)
45 (uri (git-reference
46 (url "https://github.com/rnpgp/rnp")
47 (commit (string-append "v" version))))
48 (file-name (git-file-name name version))
49 (sha256
50 (base32
51 "07qz51qgi8zq67civiz1bysmclwshav8v77hp4c1da6clf02hj0q"))))
52 (build-system cmake-build-system)
53 (arguments
54 (list
55 #:configure-flags
56 #~(list "-DBUILD_SHARED_LIBS=on"
57 "-DSYSTEM_LIBSEXPP=on"
58 "-DDOWNLOAD_GTEST=off")
59 #:phases
60 #~(modify-phases %standard-phases
61 (replace 'check
62 (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
63 (when tests?
64 ;; Some OpenPGP certificates used by the tests expire.
65 ;; To work around that, set the time to roughly the
66 ;; release date.
67 (setenv "CTEST_OUTPUT_ON_FAILURE" "1")
68 (invoke "faketime" #$day-of-release "ctest"
69 "-j" (if parallel-tests?
70 (number->string (parallel-job-count))
71 "1"))))))))
72 (native-inputs
73 (list gnupg ;for tests
74 googletest ;for tests
75 libfaketime ;for tests
76 pkg-config
77 python))
78 (inputs (list botan bzip2 json-c sexpp zlib))
79 (synopsis
80 "RFC4880-compliant OpenPGP library written in C++")
81 (description
82 "Set of OpenPGP (RFC4880) tools that works on Linux, *BSD and macOS as a
83replacement of GnuPG. It is maintained by Ribose after being forked from
84NetPGP, itself originally written for NetBSD.
85
86librnp is the library used by rnp for all OpenPGP functions, useful for
87developers to build against. It is a “real” library, not a wrapper like GPGME
88of GnuPG.")
89 (home-page "https://www.rnpgp.org/")
90 (license
91 ;; RNP contains code written by Ribose and code derived from netpgp.
92 (list
93 ;; Ribose's BSD 2-Clause License and NetBSD's BSD 2-Clause License
94 ;; (netpgp).
95 license:bsd-2
96 ;; Nominet UK's Apache 2.0 Licence (netpgp).
97 license:asl2.0
98 ;; Nominet UK's BSD 3-Clause License (netpgp).
99 license:bsd-3)))))
100
101(define-public sexpp
102 (package
103 (name "sexpp")
104 (version "0.9.0")
105 (source
106 (origin
107 (method git-fetch)
108 (uri (git-reference
109 (url "https://github.com/rnpgp/sexpp")
110 (commit (string-append "v" version))))
111 (file-name (git-file-name name version))
112 (sha256
113 (base32 "16y9f42w6ay3w0s23xmigqm0qi1swdfvc93g2xn3xkg1r4kpmnwq"))))
114 (build-system cmake-build-system)
115 (arguments
116 (list #:configure-flags '(list "-DDOWNLOAD_GTEST=off")))
117 (native-inputs (list googletest pkg-config))
118 (home-page "https://github.com/rnpgp/sexpp")
119 (synopsis "C++ library for S-expressions")
120 (description
121 "This package provides a C++ library for working with S-Expressions.")
122 (license license:expat)))