~ruther/guix-local

ref: 8b69e1f8006e8fd4908f4559c3e150d6b04cb34e guix-local/gnu/packages/sequoia.scm -rw-r--r-- 14.6 KiB
8b69e1f8 — Mathieu Lirzin gnu: clojure-tools-logging: Update to 1.3.1. a month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019, 2020, 2021 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2021, 2023-2026 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages sequoia)
  #:use-module (guix build-system cargo)
  #:use-module (guix build-system copy)
  #:use-module (guix build-system trivial)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix gexp)
  #:use-module (guix utils)
  #:use-module (gnu packages)
  #:use-module (gnu packages base)  ; glibc
  #:use-module (gnu packages gnupg)
  #:use-module (gnu packages hardware)
  #:use-module (gnu packages llvm)
  #:use-module (gnu packages multiprecision)
  #:use-module (gnu packages nettle)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages security-token)
  #:use-module (gnu packages serialization)
  #:use-module (gnu packages sqlite)
  #:use-module (gnu packages tls))

(define-public sequoia-chameleon-gnupg
  (package
    (name "sequoia-chameleon-gnupg")
    (version "0.13.1")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "sequoia-chameleon-gnupg" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32 "1qpanr7ydsr79adbn4bxwgqmhhq4wn7y90lw42a0g6p71x2cg73h"))))
    (build-system cargo-build-system)
    (arguments
     (list
       #:imported-modules (append %copy-build-system-modules
                                  %cargo-build-system-modules)
       #:modules '((guix build cargo-build-system)
                   ((guix build copy-build-system) #:prefix copy:)
                   (guix build utils))
       #:install-source? #f
       #:features '(list "crypto-nettle")
       #:cargo-test-flags
       '(list "--"
              ;; Some tests overly depend on specific versions of input crates.
              "--skip=gpg::generate_key"
              "--skip=gpg::list_keys"
              "--skip=gpg::migrate::migration_from_secring"
              "--skip=gpg::print_mds"
              "--skip=gpg::quick::add_key_default_default_iso_date"
              "--skip=gpg::quick::generate_key_default_default_iso_date"
              "--skip=gpg::sign"
              "--skip=gpg::verify"
              ;; These tests fail a certain amount of time after the release.
              "--skip=gpg::decrypt::general_purpose_cv25519"
              "--skip=gpg::decrypt::general_purpose_p256"
              "--skip=gpg::decrypt::general_purpose_p384"
              "--skip=gpg::decrypt::general_purpose_p521"
              "--skip=gpg::decrypt::general_purpose_rsa2k"
              "--skip=gpg::decrypt::general_purpose_rsa3k"
              "--skip=gpg::decrypt::general_purpose_rsa4k"
              "--skip=gpg::decrypt::restricted_agent")
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'unpack 'set-asset-out-dir
             (lambda _
               (setenv "ASSET_OUT_DIR" "target/assets")))
           (add-after 'install 'install-more
             (lambda args
               (apply (assoc-ref copy:%standard-phases 'install)
                      #:install-plan
                      '(("target/assets/man-pages" "share/man/man1"
                         #:include-regexp ("\\.1$"))
                        ("target/assets/shell-completions/gpg-sq.bash"
                         "share/bash-completion/completions/gpg-sq")
                        ("target/assets/shell-completions/gpgv-sq.bash"
                         "share/bash-completion/completions/gpgv-sq")
                        ("target/assets/shell-completions/gpg-sq.elv"
                         "share/elvish/lib/gpg-sq")
                        ("target/assets/shell-completions/gpgv-sq.elv"
                         "share/elvish/lib/gpgv-sq")
                        ("target/assets/shell-completions"
                         "share/fish/vendor_completions.d"
                         #:include-regexp ("\\.fish$"))
                        ("target/assets/shell-completions"
                         "share/zsh/site-functions"
                         #:include-regexp ("^_gpg")))
                      args))))))
    (inputs
     (cons* nettle openssl sqlite (cargo-inputs 'sequoia-chameleon-gnupg)))
    (native-inputs
     (list clang gnupg pkg-config sequoia-sq))
    (home-page "https://sequoia-pgp.org/")
    (synopsis "Sequoia's reimplementation of the GnuPG interface")
    (description "This package provides Sequoia's reimplementation of the
@code{GnuPG} interface.

@code{gpg-sq} is Sequoia's alternative implementation of a tool following the
GnuPG command line interface.  It provides a drop-in but not feature-complete
replacement for the GnuPG project's @code{gpg}.

This Guix package is built to use the nettle cryptographic library.")
    (license license:gpl3+)))

(define-public sequoia-sq
  (package
    (name "sequoia-sq")
    (version "1.3.1")
    (source
     (origin
       (method url-fetch)
       (uri (crate-uri "sequoia-sq" version))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32 "01aph6n9lj7qcz1n8gr6q48an4ypn9d6xzxfprwpw80wv9ibc12w"))))
    (build-system cargo-build-system)
    (arguments
     `(#:imported-modules ((guix build copy-build-system)
                           ,@%cargo-build-system-modules)
       #:modules ((guix build cargo-build-system)
                  ((guix build copy-build-system) #:prefix copy:)
                  (guix build utils))
       #:install-source? #f
       #:features '("crypto-nettle"
                    "sequoia-keystore/gpg-agent"
                    "sequoia-keystore/openpgp-card"
                    "sequoia-keystore/softkeys")
       #:cargo-test-flags
       (list "--"
             ;; The certificate has an expiration date.
             "--skip=sq_autocrypt_import")
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'set-asset-out-dir
           (lambda _
             (setenv "ASSET_OUT_DIR" "target/assets")))
          ;; The 'install phase doesn't currently work with multiple features.
          (replace 'install
            (lambda* (#:key outputs features #:allow-other-keys)
              (invoke "cargo" "install" "--offline" "--no-track"
                      "--path" "." "--root" (assoc-ref outputs "out")
                      "--features" (string-join features))))
         (add-after 'install 'install-more
           (lambda args
             (apply (assoc-ref copy:%standard-phases 'install)
                    #:install-plan
                    '(("target/assets/man-pages" "share/man/man1"
                       #:include-regexp ("\\.1$"))
                      ("target/assets/shell-completions/sq.bash"
                       "share/bash-completion/completions/sq")
                      ("target/assets/shell-completions/sq.elv"
                       "share/elvish/lib/sq")
                      ("target/assets/shell-completions/sq.fish"
                       "share/fish/vendor_completions.d/")
                      ("target/assets/shell-completions/_sq"
                       "share/zsh/site-functions/"))
                    args))))))
    (inputs
     (cons* nettle openssl pcsc-lite sqlite (cargo-inputs 'sequoia-sq)))
    (native-inputs
     (list capnproto clang pkg-config))
    (home-page "https://sequoia-pgp.org/")
    (synopsis "Command-line frontend for Sequoia OpenPGP")
    (description "This package provides the command-line frontend for Sequoia
OpenPGP.

This Guix package is built to use the nettle cryptographic library and the
gpg-agent, openpgp-card and softkeys keystore backends.")
    (license license:lgpl2.0+)))

(define-public sequoia-sqv
  (package
    (name "sequoia-sqv")
    (version "1.3.0")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "sequoia-sqv" version))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
          (base32 "0q2ylgzpnx290mwp8626j14b5z318074ag5dj99282vj4qfmf949"))))
    (build-system cargo-build-system)
    (inputs
     (cons* nettle openssl (cargo-inputs 'sequoia-sqv)))
    (native-inputs
     (list clang pkg-config))
    (arguments
     `(#:imported-modules ((guix build copy-build-system)
                           ,@%cargo-build-system-modules)
       #:modules ((guix build cargo-build-system)
                  ((guix build copy-build-system) #:prefix copy:)
                  (guix build utils))
       #:install-source? #f
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'set-asset-out-dir
           (lambda _
             (setenv "ASSET_OUT_DIR" "target/assets")))
         (add-after 'install 'install-more
           (lambda args
             (apply (assoc-ref copy:%standard-phases 'install)
                    #:install-plan
                    '(("target/assets/man-pages" "share/man/man1"
                       #:include-regexp ("\\.1$"))
                      ("target/assets/shell-completions/sqv.bash"
                       "share/bash-completion/completions/sqv")
                      ("target/assets/shell-completions/sqv.elv"
                       "share/elvish/lib/sqv")
                      ("target/assets/shell-completions/sqv.fish"
                       "share/fish/vendor_completions.d/")
                      ("target/assets/shell-completions/_sqv"
                       "share/zsh/site-functions/"))
                    args))))))
    (home-page "https://sequoia-pgp.org/")
    (synopsis "Simple OpenPGP signature verification program")
    (description "@code{sqv} verifies detached OpenPGP signatures.  It is a
replacement for @code{gpgv}.  Unlike @code{gpgv}, it can take additional
constraints on the signature into account.

This Guix package is built to use the nettle cryptographic library.")
    (license license:lgpl2.0+)))

(define-public sequoia-wot-tools
  (package
    (name "sequoia-wot-tools")
    (version "0.15.0")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
              (url "https://gitlab.com/sequoia-pgp/sequoia-wot")
              (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "03wa4l582hx0qq28pkhrf0pagckyx6df01pb4chyngadk49q1xn7"))))
    (build-system cargo-build-system)
    (arguments
     (list
       #:features '(list "sequoia-openpgp/crypto-nettle")
       #:cargo-package-crates ''("tools")
       #:cargo-test-flags '(list "--" "--skip=gpg_trust_roots")
       #:install-source? #f
       #:cargo-install-paths ''("tools")
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'install 'install-more
             (lambda* (#:key outputs #:allow-other-keys)
               (let* ((out   (assoc-ref outputs "out"))
                      (share (string-append out "/share"))
                      (man1  (string-append share "/man/man1")))
                 (for-each (lambda (file)
                             (install-file file man1))
                           (find-files "target/release" "\\.1$"))
                 (mkdir-p (string-append out "/etc/bash_completion.d"))
                 (mkdir-p (string-append share "/fish/vendor_completions.d"))
                 (mkdir-p (string-append share "/elvish/lib"))
                 (copy-file (car (find-files "target/release" "sq-wot.bash"))
                            (string-append out "/etc/bash_completion.d/sq-wot"))
                 (copy-file (car (find-files "target/release" "sq-wot.fish"))
                            (string-append
                              share "/fish/vendor_completions.d/sq-wot.fish"))
                 (copy-file (car (find-files "target/release" "sq-wot.elv"))
                            (string-append share "/elvish/lib/sq-wot"))
                 (install-file (car (find-files "target/release" "_sq-wot"))
                               (string-append
                                 share "/zsh/site-functions"))))))))
    (inputs
     (cons* nettle openssl sqlite (cargo-inputs 'sequoia-wot-tools)))
    (native-inputs
     (list clang pkg-config))
    (home-page "https://sequoia-pgp.org/")
    (synopsis "Implementation of OpenPGP's web of trust")
    (description
     "This package provides an implementation of @code{OpenPGP's} web of trust.

This Guix package is built to use the nettle cryptographic library.")
    (license license:lgpl2.0+)))

;;

(define-public sequoia
  (package
    (name "sequoia")
    (version "2.0.0")
    (source #f)
    (build-system trivial-build-system)
    (arguments
     (list
      #:modules '((guix build utils)
                  (guix build union)
                  (guix build gnu-build-system)
                  (guix build gremlin)
                  (guix elf))
      #:builder
      #~(begin
          (use-modules (guix build utils)
                       (guix build union)
                       (guix build gnu-build-system)
                       (ice-9 match))
          (let ((make-dynamic-linker-cache
                 (assoc-ref %standard-phases 'make-dynamic-linker-cache))
                (ld.so.cache
                 (string-append #$output "/etc/ld.so.cache")))
            (match %build-inputs
                   (((names . directories) ...)
                    (union-build #$output directories)))
            (delete-file ld.so.cache)
            (setenv "PATH"
                    (string-append (getenv "PATH") ":" #$glibc "/sbin"))
            (make-dynamic-linker-cache #:outputs %outputs)))))
    (inputs
     (list ;glibc ;; for ldconfig in make-dynamic-linker-cache
           sequoia-sq
           sequoia-sqv
           sequoia-wot-tools))
    (home-page "https://sequoia-pgp.org")
    (synopsis "New OpenPGP implementation (meta-package)")
    (description "Sequoia is a new OpenPGP implementation, written in Rust,
consisting of several Rust crates/packages.  This Guix meta-package combines
these packages into a single one for convenience.  Anyhow, you should not
depend other packages on this one avoid excessive compile-times for users.")
    (license license:lgpl2.0+)))