gnupg.scm 47 KB

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