gnupg.scm 42 KB

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