gnupg.scm 49 KB

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