projects/guix·blob java-team · refs

1337 lines · 52.1 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2012-2021, 2023-2025 Ludovic Courtès <[email protected]>
3;;; Copyright © 2013, 2015, 2018 Andreas Enge <[email protected]>
4;;; Copyright © 2014, 2018 Eric Bavier <[email protected]>
5;;; Copyright © 2014, 2015, 2016, 2020 Mark H Weaver <[email protected]>
6;;; Copyright © 2015 Paul van der Walt <[email protected]>
7;;; Copyright © 2015-2021, 2024, 2025 Efraim Flashner <[email protected]>
8;;; Copyright © 2015, 2016, 2017, 2019, 2025 Ricardo Wurmus <[email protected]>
9;;; Copyright © 2016 Christine Lemmer-Webber <[email protected]>
10;;; Copyright © 2016, 2017 Nikita <[email protected]>
11;;; Copyright © 2016 Christopher Baines <[email protected]>
12;;; Copyright © 2016 Mike Gerwitz <[email protected]>
13;;; Copyright © 2016 Troy Sankey <[email protected]>
14;;; Copyright © 2017, 2020 Leo Famulari <[email protected]>
15;;; Copyright © 2017 Petter <[email protected]>
16;;; Copyright © 2018–2022 Tobias Geerinckx-Rice <[email protected]>
17;;; Copyright © 2018, 2019, 2022 Marius Bakke <[email protected]>
18;;; Copyright © 2018 Björn Höfling <[email protected]>
19;;; Copyright © 2019 Mathieu Othacehe <[email protected]>
20;;; Copyright © 2020 Fredrik Salomonsson <[email protected]>
21;;; Copyright © 2021 Maxime Devos <[email protected]>
22;;; Copyright © 2021 Nikita Domnitskii <[email protected]>
23;;; Copyright © 2021 Aleksandr Vityazev <[email protected]>
24;;; Copyright © 2022, 2023 Maxim Cournoyer <[email protected]>
25;;; Copyright © 2023, 2024 Janneke Nieuwenhuizen <[email protected]>
26;;; Copyright © 2024 Zheng Junjie <[email protected]>
27;;; Copyright © 2025 Antoine Côté <[email protected]>
28;;; Copyright © 2026 Luis Guilherme Coelho <[email protected]>
29;;; Copyright © 2026 Daniel Littlewood <[email protected]>
30;;; Copyright © 2026 Cayetano Santos <[email protected]>
31;;; Copyright © 2026 Sughosha <[email protected]>
32;;;
33;;; This file is part of GNU Guix.
34;;;
35;;; GNU Guix is free software; you can redistribute it and/or modify it
36;;; under the terms of the GNU General Public License as published by
37;;; the Free Software Foundation; either version 3 of the License, or (at
38;;; your option) any later version.
39;;;
40;;; GNU Guix is distributed in the hope that it will be useful, but
41;;; WITHOUT ANY WARRANTY; without even the implied warranty of
42;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
43;;; GNU General Public License for more details.
44;;;
45;;; You should have received a copy of the GNU General Public License
46;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
47
48(define-module (gnu packages gnupg)
49 #:use-module (gnu packages autotools)
50 #:use-module (gnu packages base)
51 #:use-module (gnu packages bash)
52 #:use-module (gnu packages check)
53 #:use-module (gnu packages compression)
54 #:use-module (gnu packages crypto)
55 #:use-module (gnu packages curl)
56 #:use-module (gnu packages dns)
57 #:use-module (gnu packages emacs)
58 #:use-module (gnu packages enlightenment)
59 #:use-module (gnu packages gettext)
60 #:use-module (gnu packages glib)
61 #:use-module (gnu packages gnome)
62 #:use-module (gnu packages gtk)
63 #:use-module (gnu packages guile)
64 #:use-module (gnu packages ncurses)
65 #:use-module (gnu packages openldap)
66 #:use-module (gnu packages perl)
67 #:use-module (gnu packages perl-check)
68 #:use-module (gnu packages pkg-config)
69 #:use-module (gnu packages popt)
70 #:use-module (gnu packages pth)
71 #:use-module (gnu packages python)
72 #:use-module (gnu packages python-build)
73 #:use-module (gnu packages python-xyz)
74 #:use-module (gnu packages qt)
75 #:use-module (gnu packages readline)
76 #:use-module (gnu packages security-token)
77 #:use-module (gnu packages sqlite)
78 #:use-module (gnu packages swig)
79 #:use-module (gnu packages texinfo)
80 #:use-module (gnu packages tls)
81 #:use-module (gnu packages tor)
82 #:use-module (gnu packages web)
83 #:use-module (gnu packages xdisorg)
84 #:use-module (gnu packages xml)
85 #:use-module (gnu packages xorg)
86 #:use-module (gnu packages)
87 #:use-module (guix build-system cmake)
88 #:use-module (guix build-system copy)
89 #:use-module (guix build-system gnu)
90 #:use-module (guix build-system meson)
91 #:use-module (guix build-system perl)
92 #:use-module (guix build-system pyproject)
93 #:use-module (guix build-system qt)
94 #:use-module (guix download)
95 #:use-module (guix gexp)
96 #:use-module (guix git-download)
97 #:use-module ((guix licenses) #:prefix license:)
98 #:use-module (guix packages)
99 #:use-module (guix utils)
100 #:use-module (ice-9 match)
101 #:use-module (srfi srfi-1))
102
103(define-public libgpg-error
104 (package
105 (name "libgpg-error")
106 (version "1.61")
107 (source
108 (origin
109 (method url-fetch)
110 (uri (string-append "mirror://gnupg/libgpg-error/libgpg-error-"
111 version ".tar.bz2"))
112 (sha256
113 (base32
114 "14sw73317735xq991sz0x5jqkr12y6572aw3mbwg8m635czl31bs"))))
115 (build-system gnu-build-system)
116 (arguments
117 (list
118 #:configure-flags #~(list "--enable-install-gpg-error-config")
119 #:phases
120 #~(modify-phases %standard-phases
121 #$@(cond
122 ((%current-target-system)
123 ;; If this is left out, some generated header
124 ;; files will be sprinkled with ‘\c’, which
125 ;; the compiler won't like.
126 #~((add-after 'unpack 'fix-gen-lock-obj.sh
127 (lambda _
128 (substitute* "src/gen-lock-obj.sh"
129 (("if test -n `echo -n`") "if ! test -n `echo -n`"))))
130 ;; When cross-compiling, some platform specific properties cannot
131 ;; be detected. Create a symlink to the appropriate platform
132 ;; file if required. Note that these platform files depend on
133 ;; both the operating system and architecture!
134 ;;
135 ;; See Cross-Compiling section at:
136 ;; https://github.com/gpg/libgpg-error/blob/master/README
137 (add-after 'unpack 'cross-symlinks
138 (lambda _
139 (define (link triplet source)
140 (symlink (string-append "lock-obj-pub." triplet ".h")
141 (string-append "src/syscfg/lock-obj-pub."
142 source ".h")))
143 #$(let ((target (%current-target-system)))
144 (cond ((target-linux? target)
145 (match (string-take target
146 (string-index target #\-))
147 ("armhf"
148 `(link "arm-unknown-linux-gnueabi" "linux-gnu"))
149 ("mips64el"
150 `(link "mips-unknown-linux-gnu" "linux-gnu"))
151 ;; Don't always link to the "linux-gnu"
152 ;; configuration, as this is not correct for
153 ;; all architectures.
154 (_ #t)))
155 (#t #t)))))))
156 ((system-hurd?)
157 #~((add-after 'unpack 'skip-tests
158 (lambda _
159 (substitute* "tests/t-syserror.c"
160 (("(^| )main *\\(.*" all)
161 (string-append all "{\n exit (77);//")))))))
162 (else #~())))))
163 (home-page "https://gnupg.org/software/libgpg-error")
164 (synopsis "Library of error values for GnuPG components")
165 (description
166 "Libgpg-error is a small library that defines common error values
167for all GnuPG components. Among these are GPG, GPGSM, GPGME,
168GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, SmartCard
169Daemon and possibly more in the future.")
170 (license license:lgpl2.0+)))
171
172(define-public libgcrypt
173 (package
174 (name "libgcrypt")
175 (version "1.12.2")
176 (source (origin
177 (method url-fetch)
178 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
179 version ".tar.bz2"))
180 (sha256
181 (base32
182 "0pmxp91sirqmsiy7asnjbz5ksglzbqhh11baz4v086i2j8j3rqvw"))))
183 (build-system gnu-build-system)
184 (arguments
185 ;; The '--with-gpg-error-prefix' argument is needed because otherwise
186 ;; 'configure' uses 'gpg-error-config' to determine the '-L' flag, and
187 ;; the 'gpg-error-config' it runs is the native one---i.e., the wrong one.
188 (list
189 #:configure-flags
190 #~(append
191 (let ((gpgrt-config (search-input-file #$(if (%current-target-system)
192 #~%build-target-inputs
193 #~%build-inputs)
194 "bin/gpgrt-config")))
195 (list (string-append "--with-libgpg-error-prefix="
196 (dirname (dirname gpgrt-config)))
197 ;; libgcrypt is transitioning from gpg-error-config to
198 ;; gpgrt-config, and in the process the
199 ;; --with-libgpg-error-config prefix defined above is
200 ;; not respected. See <https://dev.gnupg.org/T5365>.
201 ;; TODO: transition to pkg-config instead of these scripts.
202 (string-append "ac_cv_path_GPGRT_CONFIG=" gpgrt-config)))
203 #$@(if (%current-target-system)
204 ;; When cross-compiling, _gcry_mpih_lshift etc are
205 ;; undefined.
206 #~((list "--disable-asm"))
207 #~()))
208 #:phases
209 #~(modify-phases %standard-phases
210 #$@(cond
211 ((system-hurd?)
212 #~((add-before 'configure 'setenv
213 (lambda _ (setenv "GCRYPT_NO_BENCHMARKS" "t")))))
214 (else #~())))))
215 (outputs '("out" "debug"))
216 (propagated-inputs (list libgpg-error))
217 (home-page "https://gnupg.org/software/libgcrypt")
218 (synopsis "Cryptographic function library")
219 (description
220 "Libgcrypt is a general-purpose cryptographic library. It provides the
221standard cryptographic building blocks such as symmetric ciphers, hash
222algorithms, public key algorithms, large integer functions and random number
223generation.")
224 (license license:lgpl2.0+)))
225
226(define-public libassuan
227 (package
228 (name "libassuan")
229 (version "3.0.2")
230 (source
231 (origin
232 (method url-fetch)
233 (uri (string-append "mirror://gnupg/libassuan/libassuan-"
234 version ".tar.bz2"))
235 (sha256
236 (base32
237 "1xin9h3vhx94j5w9p7xi3csmw1a6yfif2w4r1x8k7rk6sbd1r4yj"))))
238 (build-system gnu-build-system)
239 (arguments (if (%current-target-system)
240 (list #:configure-flags
241 #~(list (string-append
242 "--with-libgpg-error-prefix="
243 #$(this-package-input "libgpg-error"))))
244 '()))
245 (propagated-inputs (list libgpg-error))
246 (home-page "https://gnupg.org")
247 (synopsis
248 "IPC library used by GnuPG and related software")
249 (description
250 "Libassuan is a small library implementing the so-called Assuan
251protocol. This protocol is used for IPC between most newer
252GnuPG components. Both, server and client side functions are
253provided.")
254 (license license:lgpl2.0+)))
255
256(define-public libksba
257 (package
258 (name "libksba")
259 (version "1.8.0")
260 (source
261 (origin
262 (method url-fetch)
263 (uri (string-append
264 "mirror://gnupg/libksba/libksba-"
265 version ".tar.bz2"))
266 (sha256
267 (base32
268 "14lj3ld4nxf916kq01z0203x36nhgymxf0j222mg4jap16wrssr9"))))
269 (build-system gnu-build-system)
270 (propagated-inputs
271 (list libgpg-error))
272 (arguments
273 (list
274 #:configure-flags
275 #~(list #$@(if (%current-target-system)
276 #~("CC_FOR_BUILD=gcc")
277 #~())
278 (string-append "--with-gpg-error-prefix="
279 (assoc-ref %build-inputs "libgpg-error")))))
280 (home-page "https://www.gnupg.org")
281 (synopsis "CMS and X.509 access library")
282 (description
283 "KSBA (pronounced Kasbah) is a library to make X.509 certificates
284as well as the CMS easily accessible by other applications. Both
285specifications are building blocks of S/MIME and TLS.")
286 (license license:gpl3+)))
287
288(define-public npth
289 (package
290 (name "npth")
291 (version "1.8")
292 (source
293 (origin
294 (method url-fetch)
295 (uri (string-append "mirror://gnupg/npth/npth-" version ".tar.bz2"))
296 (sha256
297 (base32 "0gnaj176jjfi6ldrq1l1sx7ym0z7kjx8ms96bdp5s1m34d7lpllb"))))
298 (build-system gnu-build-system)
299 (home-page "https://www.gnupg.org")
300 (synopsis "Non-preemptive thread library")
301 (description
302 "Npth is a library to provide the GNU Pth API and thus a non-preemptive
303threads implementation.
304
305In contrast to GNU Pth is is based on the system's standard threads
306implementation. This allows the use of libraries which are not
307compatible to GNU Pth.")
308 (license (list license:lgpl3+ license:gpl2+)))) ;dual license
309
310(define-public gnupg
311 (package
312 (name "gnupg")
313 (version "2.5.21")
314 (source (origin
315 ;; Use tarballs instead of git, see the discussion at
316 ;; https://codeberg.org/guix/guix/issues/10622 .
317 (method url-fetch)
318 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
319 ".tar.bz2"))
320 (patches (search-patches "gnupg-default-pinentry.patch"))
321 (sha256
322 (base32
323 "0lhknfbnbhn2mfz9b5c19n8m2116my06hz7s569nm9j6ma62rbz3"))))
324 (build-system gnu-build-system)
325 (native-inputs
326 (list libgpg-error ; for yat2m
327 pkg-config))
328 (inputs
329 (append (if (target-hurd?)
330 '()
331 (list pcsc-lite))
332 (list gnutls
333 libassuan
334 libgcrypt
335 libgpg-error
336 libksba
337 npth
338 openldap
339 readline
340 sqlite
341 zlib)))
342 (arguments
343 (list
344 #:configure-flags
345 #~(list
346 ;; Otherwise, the test suite looks for the `gpg`
347 ;; executable in its installation directory in
348 ;; /gnu/store before it has been installed.
349 "--enable-gnupg-builddir-envvar"
350 "--enable-all-tests"
351 #$@(if (%current-target-system)
352 (list
353 #~(string-append
354 "--with-libgpg-error-prefix="
355 #$(this-package-input "libgpg-error"))
356 #~(string-append
357 "ac_cv_path_GPGRT_CONFIG="
358 #$(this-package-input "libgpg-error")
359 "/bin/gpgrt-config")
360 #~(string-append
361 "--with-libgcrypt-prefix="
362 #$(this-package-input "libgcrypt"))
363 #~(string-append
364 "--with-libassuan-prefix="
365 #$(this-package-input "libassuan"))
366 #~(string-append
367 "--with-ksba-prefix="
368 #$(this-package-input "libksba"))
369 #~(string-append
370 "--with-npth-prefix="
371 #$(this-package-input "npth")))
372 '()))
373 #:phases
374 #~(modify-phases %standard-phases
375 (add-before 'configure 'patch-paths
376 (lambda* (#:key inputs #:allow-other-keys)
377 (let ((libpcsclite.so (false-if-exception
378 (search-input-file inputs
379 "lib/libpcsclite.so"))))
380 (when libpcsclite.so
381 (substitute* "scd/scdaemon.c"
382 (("libpcsclite\\.so")
383 libpcsclite.so))))))
384 (add-after 'build 'patch-scheme-tests
385 (lambda _
386 (substitute* (find-files "tests" ".\\.scm$")
387 (("/usr/bin/env gpgscm")
388 (string-append (getcwd) "/tests/gpgscm/gpgscm")))))
389 (add-before 'build 'patch-test-paths
390 (lambda _
391 (substitute* '("tests/pkits/inittests"
392 "tests/pkits/common.sh"
393 "tests/pkits/Makefile")
394 (("/bin/pwd") (which "pwd")))
395 (substitute* "common/t-exectool.c"
396 (("/bin/cat") (which "cat"))
397 (("/bin/true") (which "true"))
398 (("/bin/false") (which "false"))))))))
399 (home-page "https://gnupg.org/")
400 (synopsis "GNU Privacy Guard")
401 (description
402 "The GNU Privacy Guard is a complete implementation of the OpenPGP
403standard. It is used to encrypt and sign data and communication. It
404features powerful key management and the ability to access public key
405servers. It includes several libraries: libassuan (IPC between GnuPG
406components), libgpg-error (centralized GnuPG error values), and
407libskba (working with X.509 certificates and CMS data).")
408 (license license:gpl3+)))
409
410(define-public gpgme-2
411 (package
412 (name "gpgme")
413 (version "2.1.0")
414 (source
415 (origin
416 (method url-fetch)
417 (uri (string-append "mirror://gnupg/gpgme/gpgme-" version ".tar.bz2"))
418 (sha256
419 (base32 "0azrddb51c423il7xdqcrahvi8fyhblvvs7hzgs5jqn27yjmw744"))))
420 (build-system gnu-build-system)
421 (arguments
422 (list
423 #:configure-flags
424 #~(let ((gpg-bins (dirname (search-input-file %build-inputs "/bin/gpg"))))
425 (list (string-append "--enable-fixed-path=" gpg-bins)))))
426 (inputs
427 (list gnupg))
428 (propagated-inputs
429 ;; As required by the pkg-config's Requires.private.
430 (list libgpg-error libassuan))
431 (home-page "https://gnupg.org/software/gpgme/index.html")
432 (synopsis "Library providing simplified access to GnuPG functionality")
433 (description
434 "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
435easier for applications. It provides a High-Level Crypto API for encryption,
436decryption, signing, signature verification and key management. Currently
437it uses GnuPG as its backend but the API isn't restricted to this engine.
438
439Because the direct use of GnuPG from an application can be a complicated
440programming task, it is suggested that all software should try to use GPGME
441instead. This way bug fixes or improvements can be done at a central place
442and every application benefits from this.")
443 (license license:lgpl2.1+)))
444
445(define-public gpgme-1
446 (package
447 (inherit gpgme-2)
448 (version "1.24.1")
449 (source
450 (origin
451 (method url-fetch)
452 (uri (string-append "mirror://gnupg/gpgme/gpgme-" version ".tar.bz2"))
453 (sha256
454 (base32 "0px87fbp90xp8vf1wms02flk14zmrqsfr135f5his1kiiqjx01ga"))))))
455
456(define-public gpgme gpgme-1)
457
458(define-public gpgmepp
459 (package
460 (name "gpgmepp")
461 (version "2.1.0")
462 (source
463 (origin
464 (method url-fetch)
465 (uri (string-append "mirror://gnupg/gpgmepp/gpgmepp-" version ".tar.xz"))
466 (sha256
467 (base32 "1qhn583cbi67694m3bg77ckb892in2f16src2x5m0102ix309y2p"))))
468 (build-system cmake-build-system)
469 (arguments
470 (list
471 ;; FIXME: BUILD_TESTING variable is enabled by deault, but still no tests
472 ;; are found.
473 #:tests? #f))
474 (propagated-inputs
475 ;; As required by the pkg-config's Requires.private.
476 (list gpgme-2 libgpg-error))
477 (home-page "https://gnupg.org/software/gpgme/index.html")
478 (synopsis "C++ bindings/wrapper for GPGME")
479 (description
480 "GPGME++ is a C++ wrapper (or C++ bindings) for the GnuPG project's
481@acronym{GPGME, GnuPG Made Easy} library.")
482 (license license:lgpl2.1+)))
483
484(define-public qgpgme
485 (package
486 (name "qgpgme")
487 (version "2.1.0")
488 (source
489 (origin
490 (method url-fetch)
491 (uri (string-append "mirror://gnupg/qgpgme/qgpgme-" version ".tar.xz"))
492 (sha256
493 (base32 "024gdw8i5ibmq0bjjf6znhxw93chh1j21dr25m0gk9z4xsrzwcjv"))))
494 (build-system qt-build-system)
495 (arguments
496 (list
497 #:qtbase qtbase
498 #:configure-flags #~(list "-DBUILD_WITH_QT5=OFF")
499 #:phases
500 #~(modify-phases %standard-phases
501 (add-before 'check 'check-setup
502 (lambda _
503 (setenv "HOME" (getcwd))
504 (invoke "gpg-agent" "--daemon"))))))
505 (propagated-inputs
506 (list gpgme-2 ;for FindGpgme.cmake and QGpgmeQt6Config.cmake
507 gpgmepp ;for QGpgmeQt6Config.cmake
508 libgpg-error)) ;for FindLibGpgError.cmake and QGpgmeQt6Config.cmake
509 (native-inputs
510 (list gnupg ;for tests
511 pkg-config))
512 (home-page "https://gnupg.org/software/gpgme/index.html")
513 (synopsis "Qt API bindings for gpgme")
514 (description "QGpgme provides a very high level Qt API around GpgMEpp.")
515 (license license:gpl2+)))
516
517(define-public qgpgme-qt5
518 (package
519 (inherit qgpgme)
520 (name "qgpgme-qt5")
521 (arguments
522 (list
523 #:configure-flags #~(list "-DBUILD_WITH_QT6=OFF")
524 #:phases
525 #~(modify-phases %standard-phases
526 (add-before 'check 'check-setup
527 (lambda _
528 (setenv "HOME" (getcwd))
529 (invoke "gpg-agent" "--daemon"))))))))
530
531(define-public guile-gcrypt
532 (package
533 (name "guile-gcrypt")
534 (version "0.5.0")
535 (home-page "https://codeberg.org/guile-gcrypt/guile-gcrypt")
536 (source (origin
537 (method git-fetch)
538 (uri (git-reference
539 (url (string-append home-page ".git"))
540 (commit (string-append "v" version))))
541 (sha256
542 (base32
543 "0zh5bqgbc3r4dlzz64flnh10pq0ipbxx8mpbwgp4di0abhlcxz30"))
544 (file-name (git-file-name name version))))
545 (build-system gnu-build-system)
546 (arguments
547 ;; Work around <https://bugs.gnu.org/20272> to achieve reproducible
548 ;; builds.
549 '(#:parallel-build? #f
550
551 #:phases
552 (modify-phases %standard-phases
553 (add-before 'configure 'add-libgrypt-config
554 (lambda* (#:key inputs target #:allow-other-keys)
555 (when target
556 ;; When cross-compiling, the bash script 'libgcrypt-config'
557 ;; must be accessible during the configure phase.
558 (setenv "PATH"
559 (string-append
560 (dirname
561 (search-input-file inputs "bin/libgcrypt-config"))
562 ":" (getenv "PATH")))))))))
563 (native-inputs
564 (list pkg-config autoconf automake texinfo guile-3.0))
565 (inputs
566 (list guile-3.0 libgcrypt))
567 (synopsis "Cryptography library for Guile using Libgcrypt")
568 (description
569 "Guile-Gcrypt provides a Guile interface to a subset of the
570GNU Libgcrypt crytographic library. It provides modules for cryptographic
571hash functions, message authentication codes (MAC), public-key cryptography,
572strong randomness, and more. It is implemented using the foreign function
573interface (FFI) of Guile.")
574 (license license:lgpl3+)))
575
576(define-public guile2.2-gcrypt
577 (package
578 (inherit guile-gcrypt)
579 (name "guile2.2-gcrypt")
580 (native-inputs
581 (modify-inputs native-inputs
582 (replace "guile" guile-2.2)))
583 (inputs
584 (modify-inputs inputs
585 (replace "guile" guile-2.2)))))
586
587(define-public python-gpg
588 (package
589 (name "python-gpg")
590 (version "2.0.0")
591 (source (origin
592 (method url-fetch)
593 (uri (pypi-uri "gpg" version))
594 (sha256
595 (base32
596 "0f2l0iyc8gp49i604c5wpliaa1dsyj0i0p9xc9zfj4z7fwaavdsf"))))
597 (build-system pyproject-build-system)
598 (arguments
599 (list
600 #:tests? #f ; No test suite.
601 #:phases
602 #~(modify-phases %standard-phases
603 (add-before 'build 'patch-setup.py
604 (lambda _
605 ;; GPGME is built with large file support, so we need to set
606 ;; _FILE_OFFSET_BITS to 64 in all users of the GPGME library.
607 #$@(if (or (target-x86-32?) (target-arm32?))
608 #~((substitute* "setup.py"
609 (("extra_macros = dict\\(\\)")
610 "extra_macros = { \"_FILE_OFFSET_BITS\": 64 }")))
611 #~())
612 (substitute* "setup.py"
613 (("cc") (which "gcc"))
614 (("\\/usr\\/lib\\/x86_64-linux-gnu( -lgpg-error)" _ keep)
615 (string-append #$(this-package-input "libgpg-error") "/lib"
616 keep))
617 (("\\/usr\\/lib\\/x86_64-linux-gnu( -lgpgme)" _ keep)
618 (string-append #$(this-package-input "gpgme") "/lib" keep))
619 (("\\/usr\\/local(', 'include', 'gpgme\\.h')" _ keep)
620 (string-append #$(this-package-input "gpgme") keep))))))))
621 (inputs
622 (list gpgme-2 libgpg-error))
623 (native-inputs
624 (list swig-4.0 python-setuptools))
625 (home-page (package-home-page gpgme))
626 (synopsis "Python bindings for GPGME GnuPG cryptography library")
627 (description "This package provides Python bindings to the GPGME GnuPG
628cryptographic library. It is developed in the GPGME source code, and then
629distributed separately.")
630 (license license:lgpl2.1+)))
631
632(define-public python-pygpgme
633 (package
634 (name "python-pygpgme")
635 (version "0.6")
636 (source
637 (origin
638 (method url-fetch)
639 (uri (pypi-uri "pygpgme" version))
640 (sha256
641 (base32
642 "0k25y3c07bkmz6q87lcbsbf34gva99rmdf5gffd8c1r1sccjif1n"))))
643 (build-system pyproject-build-system)
644 (arguments
645 (list
646 #:test-flags
647 ;; gpgme.GpgmeError: (<ErrSource.DIRMNGR: 10>, <ErrCode.ENOENT: 32849>,
648 ;; 'No such file or directory')
649 #~(list "--deselect=tests/test_import.py::ImportTestCase::test_import_keys")))
650 (native-inputs
651 (list gnupg ;to run gpg-connect-agent
652 pkg-config
653 python-pytest
654 python-setuptools))
655 (inputs
656 (list gpgme))
657 (home-page "https://github.com/jhenstridge/pygpgme")
658 (synopsis "Python module for working with OpenPGP messages")
659 (description
660 "PyGPGME is a Python module that lets you sign, verify, encrypt and
661decrypt messages using the OpenPGP format by making use of GPGME.")
662 (license license:lgpl2.1+)))
663
664(define-public python-gnupg
665 (package
666 (name "python-gnupg")
667 (version "0.5.6")
668 (source
669 (origin
670 (method git-fetch)
671 (uri (git-reference
672 (url "https://github.com/vsajip/python-gnupg/")
673 (commit version)))
674 (file-name (git-file-name name version))
675 (sha256
676 (base32
677 "0p5ijy8fqc84hcjr2np977v784y07b60l53wffwb7znyx570ip6f"))))
678 (build-system pyproject-build-system)
679 (arguments
680 (list
681 #:phases
682 #~(modify-phases %standard-phases
683 (replace 'check
684 (lambda* (#:key tests? #:allow-other-keys)
685 (when tests?
686 (substitute* "test_gnupg.py"
687 ;; Unsure why this test fails.
688 (("'test_search_keys'") "True")
689 (("def test_search_keys") "def disabled__search_keys"))
690 (setenv "USERNAME" "guixbuilder")
691 ;; The doctests are extremely slow and sometimes time out,
692 ;; so we disable them.
693 (invoke "python" "test_gnupg.py" "--no-doctests")))))))
694 (native-inputs
695 (list gnupg python-setuptools))
696 (home-page "https://docs.red-dove.com/python-gnupg/")
697 (synopsis "Wrapper for the GNU Privacy Guard")
698 (description
699 "This module allows easy access to GnuPG’s key management, encryption
700and signature functionality from Python programs.")
701 (license license:bsd-3)))
702
703(define-public perl-gnupg-interface
704 (package
705 (name "perl-gnupg-interface")
706 (version "1.06")
707 (source (origin
708 (method url-fetch)
709 (uri (string-append "mirror://cpan/authors/id/B/BP/BPS/"
710 "GnuPG-Interface-" version ".tar.gz"))
711 (sha256
712 (base32
713 "07946rsmz0ibasd53l4qiwg0dl1h65p8byja4d7fiflxsklxccs4"))))
714 (build-system perl-build-system)
715 (inputs
716 (list gnupg))
717 (propagated-inputs
718 (list perl-moo perl-moox-handlesvia perl-moox-late))
719 (native-inputs
720 (list which perl-module-install))
721 (home-page "https://metacpan.org/dist/GnuPG-Interface")
722 (synopsis "Perl interface to GnuPG")
723 (description "@code{GnuPG::Interface} and its associated modules are
724designed to provide an object-oriented method for interacting with GnuPG,
725being able to perform functions such as but not limited to encrypting,
726signing, decryption, verification, and key-listing parsing.")
727 (license license:perl-license)))
728
729(define-public pius
730 ;; The last release was from 2019, the latest commit is from 2025
731 (let ((commit "5f7c10bd3b058c864b128a3b0e0c0efa1f1befa2")
732 (revision "0"))
733 (package
734 (name "pius")
735 (version (git-version "3.0.0" revision commit))
736 (source
737 (origin
738 (method git-fetch)
739 (uri (git-reference
740 (url "https://github.com/jaymzh/pius")
741 (commit commit)))
742 (file-name (git-file-name name version))
743 (sha256
744 (base32 "0qf1fxwdrnfkia0c1iz752mb9flbjl9jgh75dls51j1k8fzbl758"))))
745 (build-system pyproject-build-system)
746 (arguments
747 (list
748 #:phases
749 #~(modify-phases %standard-phases
750 (add-before 'build 'set-gpg-file-name
751 (lambda* (#:key inputs #:allow-other-keys)
752 (substitute* "libpius/constants.py"
753 (("/usr/bin/gpg2")
754 (search-input-file inputs "bin/gpg")))))
755 (replace 'check
756 (lambda* (#:key tests? test-flags #:allow-other-keys)
757 (when tests?
758 (invoke "./run_tests")))))))
759 (native-inputs (list python-setuptools))
760 (inputs (list perl ;for 'pius-party-worksheet'
761 gnupg))
762 (synopsis "Programs to simplify GnuPG key signing")
763 (description
764 "Pius (PGP Individual UID Signer) helps attendees of PGP key signing
765parties. It is the main utility and makes it possible to quickly and easily
766sign each UID on a set of PGP keys. It is designed to take the pain out of
767the sign-all-the-keys part of PGP key signing parties while adding security to
768the process. The @command{pius-keyring-mgr} and
769@command{pius-party-worksheet} commands help organizers of PGP key signing
770parties.")
771 (license license:gpl2)
772 (home-page "https://github.com/jaymzh/pius"))))
773
774(define-public signing-party
775 (package
776 (name "signing-party")
777 (version "2.12")
778 (home-page "https://salsa.debian.org/signing-party-team/signing-party")
779 (source (origin
780 (method git-fetch)
781 (uri (git-reference
782 (url home-page)
783 (commit (string-append "v" version))))
784 (file-name (git-file-name name version))
785 (sha256
786 (base32
787 "1a4x02rcs5ryvfnhb6naiwc5jsil5k1fh8b01fkijkbzbh54qjc5"))))
788 (build-system gnu-build-system)
789 (native-inputs
790 ;; autoconf-wrapper is required due to the non-standard
791 ;; 'configure phase.
792 (list autoconf-wrapper automake))
793 (inputs (list bash-minimal
794 perl
795 perl-text-template
796 perl-mime-tools
797 perl-gnupg-interface
798 perl-net-idn-encode
799 libmd))
800 (arguments
801 (list #:tests? #f ; no test suite
802 #:phases
803 #~(modify-phases %standard-phases
804 (replace 'configure
805 (lambda _
806 (substitute* "keyanalyze/Makefile"
807 (("LDLIBS")
808 (string-append "CC=" (which "gcc") "\nLDLIBS")))
809 (substitute* "keyanalyze/Makefile"
810 (("\\./configure")
811 (string-append "./configure --prefix=" #$output)))
812 (substitute* "gpgwrap/Makefile"
813 (("\\} clean")
814 (string-append
815 "} clean\ninstall:\n\tinstall -D bin/gpgwrap "
816 #$output "/bin/gpgwrap\n")))
817 (substitute* '("gpgsigs/Makefile" "keyanalyze/Makefile"
818 "keylookup/Makefile" "sig2dot/Makefile"
819 "springgraph/Makefile")
820 (("/usr") #$output))
821 (setenv "CONFIG_SHELL" (which "sh"))))
822 (replace 'install
823 (lambda* (#:key #:allow-other-keys #:rest args)
824 (let ((install (assoc-ref %standard-phases 'install)))
825 (apply install args)
826 (for-each
827 (lambda (dir file)
828 (copy-file (string-append dir "/" file)
829 (string-append #$output "/bin/" file)))
830 '("caff" "caff" "caff" "gpgdir" "gpg-key2ps"
831 "gpglist" "gpg-mailkeys" "gpgparticipants")
832 '("caff" "pgp-clean" "pgp-fixkey" "gpgdir" "gpg-key2ps"
833 "gpglist" "gpg-mailkeys" "gpgparticipants"))
834 (for-each
835 (lambda (dir file)
836 (copy-file
837 (string-append dir "/" file)
838 (string-append #$output "/share/man/man1/" file)))
839 '("caff" "caff" "caff" "gpgdir"
840 "gpg-key2ps" "gpglist" "gpg-mailkeys"
841 "gpgparticipants" "gpgsigs" "gpgwrap/doc"
842 "keyanalyze" "keyanalyze/pgpring" "keyanalyze")
843 '("caff.1" "pgp-clean.1" "pgp-fixkey.1" "gpgdir.1"
844 "gpg-key2ps.1" "gpglist.1" "gpg-mailkeys.1"
845 "gpgparticipants.1" "gpgsigs.1" "gpgwrap.1"
846 "process_keys.1" "pgpring.1" "keyanalyze.1")))))
847 (add-after 'install 'wrap-programs
848 (lambda _
849 (wrap-program
850 (string-append #$output "/bin/caff")
851 `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB")))))))))
852 (synopsis "Collection of scripts for simplifying gnupg key signing")
853 (description
854 "Signing-party is a collection for all kinds of PGP/GnuPG related things,
855including tools for signing keys, keyring analysis, and party preparation.
856@enumerate
857@item caff: CA - Fire and Forget signs and mails a key
858@item pgp-clean: removes all non-self signatures from key
859@item pgp-fixkey: removes broken packets from keys
860@item gpg-mailkeys: simply mail out a signed key to its owner
861@item gpg-key2ps: generate PostScript file with fingerprint paper strips
862@item gpgdir: recursive directory encryption tool
863@item gpglist: show who signed which of your UIDs
864@item gpgsigs: annotates list of GnuPG keys with already done signatures
865@item gpgparticipants: create list of party participants for the organiser
866@item gpgwrap: a passphrase wrapper
867@item keyanalyze: minimum signing distance (MSD) analysis on keyrings
868@item keylookup: ncurses wrapper around gpg --search
869@item sig2dot: converts a list of GnuPG signatures to a .dot file
870@item springgraph: creates a graph from a .dot file
871@end enumerate")
872 ;; gpl2+ for almost all programs, except for keyanalyze: gpl2
873 ;; and caff and gpgsigs: bsd-3, see
874 ;; http://packages.debian.org/changelogs/pool/main/s/signing-party/current/copyright
875 (license license:gpl2)))
876
877(define-public pinentry-tty
878 (package
879 (name "pinentry-tty")
880 (version "1.3.3")
881 (source (origin
882 (method url-fetch)
883 (uri (string-append "mirror://gnupg/pinentry/pinentry-"
884 version ".tar.bz2"))
885 (sha256
886 (base32
887 "0qsb85wad5vmzpbywdprpwwn5j1n75s7sxnavz6nxdmgsqb0z5y2"))))
888 (build-system gnu-build-system)
889 (arguments
890 `(#:configure-flags '("--enable-pinentry-tty")))
891 (inputs
892 (list ncurses libassuan
893 `(,libsecret "out")))
894 (native-inputs
895 (list pkg-config))
896 (home-page "https://gnupg.org/aegypten2/")
897 (synopsis "GnuPG's interface to passphrase input")
898 (description
899 "Pinentry provides a console that allows users to enter a passphrase when
900@code{gpg} is run and needs it.")
901 (license license:gpl2+)
902 (properties
903 '((release-monitoring-url . "https://gnupg.org/ftp/gcrypt/pinentry/")
904 (upstream-name . "pinentry")))))
905
906(define-public pinentry-emacs
907 (package
908 (inherit pinentry-tty)
909 (name "pinentry-emacs")
910 (arguments
911 `(#:configure-flags '("--enable-pinentry-emacs")))
912 (description
913 "Pinentry provides a console and an Emacs interface that allows users to
914enter a passphrase when required by @code{gpg} or other software.")))
915
916(define-public pinentry-gtk2
917 (package
918 (inherit pinentry-tty)
919 (name "pinentry-gtk2")
920 (arguments
921 `(#:configure-flags '("--enable-fallback-curses")))
922 (inputs
923 (modify-inputs inputs
924 (prepend gtk+-2 glib)))
925 (description
926 "Pinentry provides a console and a GTK+ GUI that allows users to enter a
927passphrase when @code{gpg} is run and needs it.")))
928
929(define-public pinentry-gnome3
930 (package
931 (inherit pinentry-tty)
932 (name "pinentry-gnome3")
933 (inputs
934 (modify-inputs inputs
935 (prepend gtk+-2 gcr-3 glib)))
936 (arguments
937 `(#:configure-flags '("--enable-pinentry-gnome3"
938 "--enable-fallback-curses")))
939 (description
940 "Pinentry provides a console and a GUI designed for use with GNOME@tie{}3
941that allows users to enter a passphrase when required by @code{gpg} or other
942software.")))
943
944(define-public pinentry-qt
945 (package
946 (inherit pinentry-tty)
947 (name "pinentry-qt")
948 (arguments
949 (list #:configure-flags
950 #~(list "--enable-fallback-curses")
951 #:imported-modules
952 (append %default-gnu-imported-modules
953 %qt-build-system-modules)
954 #:modules
955 '((guix build utils)
956 (guix build gnu-build-system)
957 ((guix build qt-build-system) #:prefix qt:))
958 #:phases
959 #~(modify-phases %standard-phases
960 (add-after 'install 'qt-wrap
961 (lambda args
962 (apply (assoc-ref qt:%standard-phases 'qt-wrap)
963 #:qtbase #$(this-package-input "qtbase")
964 args))))))
965 (inputs
966 (modify-inputs inputs
967 (prepend qtbase qtwayland)))
968 (description
969 "Pinentry provides a console and a Qt GUI that allows users to enter a
970passphrase when @code{gpg} is run and needs it.")))
971
972(define-public pinentry-efl
973 (package
974 (inherit pinentry-tty)
975 (name "pinentry-efl")
976 (arguments
977 '(#:configure-flags '("--enable-pinentry-efl"
978 "--enable-fallback-curses")
979 #:phases
980 (modify-phases %standard-phases
981 (replace 'bootstrap
982 (lambda _
983 (invoke "sh" "autogen.sh"))))))
984 (native-inputs
985 (modify-inputs native-inputs
986 (prepend autoconf automake gettext-minimal)))
987 (inputs
988 (modify-inputs inputs
989 (prepend efl)))
990 (description
991 "Pinentry provides a console and a graphical interface for @acronym{EFL,
992the Enlightenment Foundation Libraries} that allows users to enter a
993passphrase when @code{gpg} is run and needs it.")))
994
995(define-public pinentry-rofi
996 (package
997 (name "pinentry-rofi")
998 (version "3.0.0")
999 (source (origin
1000 (method git-fetch)
1001 (uri (git-reference
1002 (url "https://github.com/plattfot/pinentry-rofi/")
1003 (commit version)))
1004 (file-name (git-file-name name version))
1005 (sha256
1006 (base32 "0m3lv6cydx2jg7743m6lab0v1myz84xys9z2sdb1b9jiq4xmayhq"))))
1007 (build-system gnu-build-system)
1008 (arguments
1009 `(#:modules
1010 ((ice-9 match)
1011 (ice-9 ftw)
1012 ,@%default-gnu-modules)
1013 #:phases
1014 (modify-phases
1015 %standard-phases
1016 (add-after 'install 'hall-wrap-binaries
1017 (lambda* (#:key inputs outputs #:allow-other-keys)
1018 (let* ((out (assoc-ref outputs "out"))
1019 (bin (string-append out "/bin/"))
1020 (site (string-append out "/share/guile/site"))
1021 (rofi-bin (string-append (assoc-ref inputs "rofi") "/bin")))
1022 (match (scandir site)
1023 (("." ".." version)
1024 (wrap-program
1025 (string-append bin "pinentry-rofi")
1026 (list "PATH" ":" 'prefix `(,rofi-bin))))))))
1027 (add-after 'compress-documentation 'installcheck
1028 (lambda* rest
1029 (invoke "make" "installcheck"))))))
1030 (native-inputs
1031 (list autoconf autoconf-archive automake pkg-config texinfo))
1032 (inputs (list bash-minimal guile-3.0 rofi))
1033 (synopsis "Rofi GUI for GnuPG's passphrase input")
1034 (description "Pinentry-rofi is a simple graphical user interface for
1035passphrase or PIN when required by @code{gpg} or other software. It is using
1036the Rofi application launcher as the user interface. Which makes it combined
1037with @code{rofi-pass} a good front end for @code{password-store}.")
1038 (home-page "https://github.com/plattfot/pinentry-rofi/")
1039 (license license:gpl3+)))
1040
1041(define-public pinentry-bemenu
1042 (package
1043 (name "pinentry-bemenu")
1044 (version "0.14.0")
1045 (source
1046 (origin
1047 (method git-fetch)
1048 (uri (git-reference
1049 (url "https://github.com/t-8ch/pinentry-bemenu")
1050 (commit (string-append "v" version))))
1051 (file-name (git-file-name name version))
1052 (sha256
1053 (base32 "0sh2182p5674m50vphir53jpq4p2i8ld6asfihbryjq8qh4r88cj"))))
1054 (build-system meson-build-system)
1055 (native-inputs
1056 (list pkg-config))
1057 (inputs
1058 (list bemenu libassuan libgpg-error popt))
1059 (home-page "https://github.com/t-8ch/pinentry-bemenu")
1060 (synopsis "Pinentry implementation based on @code{bemenu}")
1061 (description
1062 "This package provides a Pinentry implementation based on Bemenu.")
1063 (license license:gpl3+)))
1064
1065(define-public pinentry-fuzzel
1066 (package
1067 (name "pinentry-fuzzel")
1068 (version "1.0.0")
1069 (source
1070 (origin
1071 (method git-fetch)
1072 (uri (git-reference
1073 (url "https://github.com/JonasToth/pinentry-fuzzel")
1074 (commit (string-append "v" version))))
1075 (file-name (git-file-name name version))
1076 (sha256
1077 (base32 "1ykmxckiy361rl4aj3bkyihx1639x61ic4995yxkqr9r4vc7zha1"))))
1078 (build-system copy-build-system)
1079 (arguments
1080 (list #:install-plan
1081 #~'(("pinentry-fuzzel" "bin/"))
1082 #:phases
1083 #~(modify-phases %standard-phases
1084 (add-after 'unpack 'patch-scripts
1085 (lambda* (#:key inputs #:allow-other-keys)
1086 (substitute* "pinentry-fuzzel"
1087 (("fuzzel") (search-input-file inputs "bin/fuzzel"))))))))
1088 (inputs
1089 (list fuzzel))
1090 (synopsis "Pinentry implementation based on @code{fuzzel}")
1091 (description
1092 "This package provides a very simple Pinentry implementation based
1093on Fuzzel.")
1094 (home-page "https://github.com/JonasToth/pinentry-fuzzel")
1095 (license license:gpl3)))
1096
1097(define-public pinentry
1098 (package (inherit pinentry-gtk2)
1099 (name "pinentry")))
1100
1101(define-public paperkey
1102 (package
1103 (name "paperkey")
1104 (version "1.6")
1105 (source (origin
1106 (method url-fetch)
1107 (uri (string-append "https://www.jabberwocky.com/"
1108 "software/paperkey/paperkey-"
1109 version ".tar.gz"))
1110 (sha256
1111 (base32
1112 "1xq5gni6gksjkd5avg0zpd73vsr97appksfx0gx2m38s4w9zsid2"))))
1113 (build-system gnu-build-system)
1114 (arguments
1115 `(#:phases
1116 (modify-phases %standard-phases
1117 (add-before 'check 'patch-check-scripts
1118 (lambda _
1119 (substitute* '("checks/roundtrip.sh"
1120 "checks/roundtrip-raw.sh")
1121 (("/bin/echo") "echo"))
1122 #t)))))
1123 (home-page "https://www.jabberwocky.com/software/paperkey/")
1124 (synopsis "Backup OpenPGP keys to paper")
1125 (description
1126 "Paperkey extracts the secret bytes from an OpenPGP (GnuPG, PGP, etc) key
1127for printing with paper and ink, which have amazingly long retention
1128qualities. To reconstruct a secret key, you re-enter those
1129bytes (whether by hand, OCR, QR code, or the like) and paperkey can use
1130them to transform your existing public key into a secret key.")
1131 (license license:gpl2+)))
1132
1133(define-public pgpdump
1134 (package
1135 (name "pgpdump")
1136 (version "0.35")
1137 (source
1138 (origin
1139 (method url-fetch)
1140 (uri (string-append "https://www.mew.org/~kazu/proj/pgpdump/pgpdump-"
1141 version ".tar.gz"))
1142 (sha256
1143 (base32 "0kslr62h3wazg4x0l38lsmswvh2dizpnwcrdsmqz62b3plnr40jf"))))
1144 (build-system gnu-build-system)
1145 (arguments
1146 (list #:tests? #f ; no make check
1147 #:make-flags
1148 #~(list (string-append "CC=" #$(cc-for-target)))))
1149 (inputs
1150 (list zlib))
1151 (home-page "https://www.mew.org/~kazu/proj/pgpdump/en/")
1152 (synopsis "PGP packet visualizer")
1153 (description "pgpdump displays the sequence of OpenPGP or PGP version 2
1154packets from a file.
1155
1156The output of this command is similar to GnuPG's list packets command,
1157however, pgpdump produces more detailed and easier to understand output.")
1158 (license license:bsd-3)))
1159
1160(define-public gpa
1161 (package
1162 (name "gpa")
1163 (version "0.11.1")
1164 (source (origin
1165 (method url-fetch)
1166 (uri (string-append "mirror://gnupg/gpa/"
1167 name "-" version ".tar.bz2"))
1168 (sha256
1169 (base32
1170 "02sx9my3s4yjxzxzs8pfif8wvpjrjsh75wwa5mxd0h867v6v5i8b"))))
1171 (build-system gnu-build-system)
1172 (arguments
1173 (list #:make-flags #~(list "CFLAGS=-Wno-implicit-function-declaration")
1174 #:phases
1175 #~(modify-phases %standard-phases
1176 (add-after 'install 'wrap-program
1177 (lambda* (#:key inputs #:allow-other-keys)
1178 (let ((gnupg (assoc-ref inputs "gnupg")))
1179 (wrap-program (string-append #$output "/bin/gpa")
1180 `("PATH" ":" prefix (,(string-append gnupg "/bin"))))))))))
1181 (native-inputs (list pkg-config))
1182 (inputs
1183 (list bash-minimal
1184 gnupg
1185 gpgme
1186 libassuan
1187 libgpg-error
1188 gtk+))
1189 (home-page "https://gnupg.org/software/gpa/")
1190 (synopsis "Graphical user interface for GnuPG")
1191 (description
1192 "GPA, the GNU Privacy Assistant, is a graphical user interface for
1193@uref{https://gnupg.org, GnuPG}. It can be used to encrypt, decrypt, and sign
1194files, to verify signatures, and to manage the private and public keys.")
1195 (license license:gpl3+)))
1196
1197(define-public parcimonie
1198 (package
1199 (name "parcimonie")
1200 (version "0.12.0")
1201 (source (origin
1202 (method url-fetch)
1203 (uri (string-append "https://gaffer.boum.org/intrigeri/files/"
1204 "parcimonie/App-Parcimonie-"
1205 version ".tar.gz"))
1206 (sha256
1207 (base32
1208 "10gal2h8ihg7nnzy3adw942axd2ia1rcn1fw3a3v07n5mm8kqrx9"))))
1209 (build-system perl-build-system)
1210 (inputs
1211 (list bash-minimal
1212 gnupg
1213 perl-clone
1214 perl-config-general
1215 perl-file-homedir
1216 perl-file-sharedir
1217 perl-file-which
1218 perl-gnupg-interface
1219 perl-ipc-system-simple
1220 perl-json
1221 perl-list-moreutils
1222 perl-moo
1223 perl-moox-late
1224 perl-moox-options
1225 perl-moox-strictconstructor
1226 perl-namespace-clean
1227 perl-net-dbus
1228 perl-pango
1229 perl-path-tiny
1230 perl-time-duration
1231 perl-time-duration-parse
1232 perl-try-tiny
1233 perl-type-tiny
1234 perl-types-path-tiny
1235 torsocks))
1236 (native-inputs
1237 (list perl-file-which
1238 perl-gnupg-interface
1239 perl-list-moreutils
1240 perl-lwp-online
1241 perl-module-build
1242 perl-strictures-2
1243 perl-test-most
1244 perl-test-trap
1245 xorg-server-for-tests))
1246 (arguments
1247 (list
1248 #:phases
1249 #~(modify-phases %standard-phases
1250 ;; Needed for using gpg-connect-agent during tests.
1251 (add-before 'check 'prepare-for-tests
1252 (lambda* (#:key inputs #:allow-other-keys)
1253 (let ((Xvfb (search-input-file inputs "/bin/Xvfb")))
1254 (system (string-append Xvfb " :1 &"))
1255 (setenv "DISPLAY" ":1")
1256 (setenv "HOME" "/tmp")
1257 ;; These tests expect usable gnupg configurations.
1258 (delete-file "t/32-keyserver_defined_on_command_line.t")
1259 (delete-file "t/33-checkGpgHasDefinedKeyserver.t"))))
1260 (add-before 'install 'fix-references
1261 (lambda _
1262 (substitute* "lib/App/Parcimonie/GnuPG/Interface.pm"
1263 ;; Skip check whether dependencies are in the PATH
1264 (("defined which.*") ""))))
1265 (add-after 'install 'wrap-program
1266 (lambda _
1267 (let* ((perllib (string-append #$output "/lib/perl5/site_perl/"
1268 #$(package-version perl))))
1269 (wrap-program (string-append #$output "/bin/parcimonie")
1270 `("PERL5LIB" ":" prefix
1271 (,(string-append perllib ":" (getenv "PERL5LIB")))))))))))
1272 (home-page "https://salsa.debian.org/intrigeri/parcimonie")
1273 (synopsis "Incrementally refreshes a GnuPG keyring")
1274 (description "Parcimonie incrementally refreshes a GnuPG keyring in a way
1275that makes it hard to correlate the keyring content to an individual, and
1276makes it hard to locate an individual based on an identifying subset of her
1277keyring content. Parcimonie is a daemon that fetches one key at a time using
1278the Tor network, waits a bit, changes the Tor circuit being used, and starts
1279over.")
1280 (properties '((upstream-name . "App-Parcimonie")))
1281 (license license:gpl1+)))
1282
1283(define-public jetring
1284 (package
1285 (name "jetring")
1286 (version "0.32")
1287 (source
1288 (origin
1289 (method git-fetch)
1290 (uri (git-reference
1291 (url "https://salsa.debian.org/debian/jetring")
1292 (commit (string-append "debian/" version))))
1293 (file-name (git-file-name name version))
1294 (sha256
1295 (base32 "0drw04iw0bp6xsb40wdbji6xkxgiyzix1mikpkc61ljfy35mg9m1"))))
1296 (build-system gnu-build-system)
1297 (arguments
1298 (list
1299 #:phases
1300 #~(modify-phases %standard-phases
1301 (delete 'configure) ; no configure script
1302 (add-before 'install 'hardlink-gnupg
1303 (lambda* (#:key inputs #:allow-other-keys)
1304 (let ((gpg (search-input-file inputs "/bin/gpg")))
1305 (substitute* (find-files "." "jetring-[[:alpha:]]+$")
1306 (("gpg -") (string-append gpg " -"))
1307 (("\\\"gpg\\\"") (string-append "\"" gpg "\""))))))
1308 (replace 'install
1309 (lambda _
1310 (for-each
1311 (lambda (file)
1312 (install-file file
1313 (string-append #$output "/bin/")))
1314 (find-files "." "jetring-[[:alpha:]]+$"))
1315 (for-each
1316 (lambda (file)
1317 (install-file file
1318 (string-append #$output "/share/man/man1/")))
1319 (find-files "." ".*\\.1$"))
1320 (install-file "jetring.7"
1321 (string-append #$output "/share/man/man7/")))))
1322 #:tests? #f)) ; no tests
1323 (inputs
1324 (list gnupg perl))
1325 (home-page "https://joeyh.name/code/jetring/")
1326 (synopsis "GnuPG keyring maintenance using changesets")
1327 (description
1328 "Jetring is a collection of tools that allow for gpg keyrings to be
1329maintained using changesets. It was developed with the Debian keyring in mind,
1330and aims to solve the problem that a gpg keyring is a binary blob that's hard
1331for multiple people to collaboratively edit.
1332
1333With jetring, changesets can be submitted, reviewed to see exactly what they
1334will do, applied, and used to build a keyring. The origin of every change made
1335to the keyring is available for auditing, and gpg signatures can be used for
1336integrity guarantees.")
1337 (license license:gpl2+)))