| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 |
|
| 20 | (define-module (gnu packages sequoia)
|
| 21 | #:use-module (guix build-system cargo)
|
| 22 | #:use-module (guix build-system copy)
|
| 23 | #:use-module (guix build-system trivial)
|
| 24 | #:use-module (guix download)
|
| 25 | #:use-module (guix git-download)
|
| 26 | #:use-module ((guix licenses) #:prefix license:)
|
| 27 | #:use-module (guix packages)
|
| 28 | #:use-module (guix gexp)
|
| 29 | #:use-module (guix utils)
|
| 30 | #:use-module (gnu packages)
|
| 31 | #:use-module (gnu packages base) |
| 32 | #:use-module (gnu packages compression)
|
| 33 | #:use-module (gnu packages gnupg)
|
| 34 | #:use-module (gnu packages hardware)
|
| 35 | #:use-module (gnu packages llvm)
|
| 36 | #:use-module (gnu packages multiprecision)
|
| 37 | #:use-module (gnu packages nettle)
|
| 38 | #:use-module (gnu packages pkg-config)
|
| 39 | #:use-module (gnu packages security-token)
|
| 40 | #:use-module (gnu packages serialization)
|
| 41 | #:use-module (gnu packages sqlite)
|
| 42 | #:use-module (gnu packages tls))
|
| 43 |
|
| 44 | (define-public sequoia-chameleon-gnupg
|
| 45 | (package
|
| 46 | (name "sequoia-chameleon-gnupg")
|
| 47 | (version "0.13.1")
|
| 48 | (source
|
| 49 | (origin
|
| 50 | (method url-fetch)
|
| 51 | (uri (crate-uri "sequoia-chameleon-gnupg" version))
|
| 52 | (file-name (string-append name "-" version ".tar.gz"))
|
| 53 | (sha256
|
| 54 | (base32 "1qpanr7ydsr79adbn4bxwgqmhhq4wn7y90lw42a0g6p71x2cg73h"))))
|
| 55 | (build-system cargo-build-system)
|
| 56 | (arguments
|
| 57 | (list
|
| 58 | #:imported-modules (append %copy-build-system-modules
|
| 59 | %cargo-build-system-modules)
|
| 60 | #:modules '((guix build cargo-build-system)
|
| 61 | ((guix build copy-build-system) #:prefix copy:)
|
| 62 | (guix build utils))
|
| 63 | #:install-source? #f
|
| 64 | #:features '(list "crypto-nettle")
|
| 65 | #:cargo-test-flags
|
| 66 | '(list "--"
|
| 67 | |
| 68 | "--skip=gpg::generate_key"
|
| 69 | "--skip=gpg::list_keys"
|
| 70 | "--skip=gpg::migrate::migration_from_secring"
|
| 71 | "--skip=gpg::print_mds"
|
| 72 | "--skip=gpg::quick::add_key_default_default_iso_date"
|
| 73 | "--skip=gpg::quick::generate_key_default_default_iso_date"
|
| 74 | "--skip=gpg::sign"
|
| 75 | "--skip=gpg::verify"
|
| 76 | |
| 77 | "--skip=gpg::decrypt::general_purpose_cv25519"
|
| 78 | "--skip=gpg::decrypt::general_purpose_p256"
|
| 79 | "--skip=gpg::decrypt::general_purpose_p384"
|
| 80 | "--skip=gpg::decrypt::general_purpose_p521"
|
| 81 | "--skip=gpg::decrypt::general_purpose_rsa2k"
|
| 82 | "--skip=gpg::decrypt::general_purpose_rsa3k"
|
| 83 | "--skip=gpg::decrypt::general_purpose_rsa4k"
|
| 84 | "--skip=gpg::decrypt::restricted_agent")
|
| 85 | #:phases
|
| 86 | #~(modify-phases %standard-phases
|
| 87 | (add-after 'unpack 'set-asset-out-dir
|
| 88 | (lambda _
|
| 89 | (setenv "ASSET_OUT_DIR" "target/assets")))
|
| 90 | (add-after 'install 'install-more
|
| 91 | (lambda args
|
| 92 | (apply (assoc-ref copy:%standard-phases 'install)
|
| 93 | #:install-plan
|
| 94 | '(("target/assets/man-pages" "share/man/man1"
|
| 95 | #:include-regexp ("\\.1$"))
|
| 96 | ("target/assets/shell-completions/gpg-sq.bash"
|
| 97 | "share/bash-completion/completions/gpg-sq")
|
| 98 | ("target/assets/shell-completions/gpgv-sq.bash"
|
| 99 | "share/bash-completion/completions/gpgv-sq")
|
| 100 | ("target/assets/shell-completions/gpg-sq.elv"
|
| 101 | "share/elvish/lib/gpg-sq")
|
| 102 | ("target/assets/shell-completions/gpgv-sq.elv"
|
| 103 | "share/elvish/lib/gpgv-sq")
|
| 104 | ("target/assets/shell-completions"
|
| 105 | "share/fish/vendor_completions.d"
|
| 106 | #:include-regexp ("\\.fish$"))
|
| 107 | ("target/assets/shell-completions"
|
| 108 | "share/zsh/site-functions"
|
| 109 | #:include-regexp ("^_gpg")))
|
| 110 | args))))))
|
| 111 | (inputs
|
| 112 | (cons* nettle openssl sqlite (cargo-inputs 'sequoia-chameleon-gnupg)))
|
| 113 | (native-inputs
|
| 114 | (list capnproto clang gnupg pkg-config sequoia-sq))
|
| 115 | (home-page "https://sequoia-pgp.org/")
|
| 116 | (synopsis "Sequoia's reimplementation of the GnuPG interface")
|
| 117 | (description "This package provides Sequoia's reimplementation of the
|
| 118 | @code{GnuPG} interface.
|
| 119 |
|
| 120 | @code{gpg-sq} is Sequoia's alternative implementation of a tool following the
|
| 121 | GnuPG command line interface. It provides a drop-in but not feature-complete
|
| 122 | replacement for the GnuPG project's @code{gpg}.
|
| 123 |
|
| 124 | This Guix package is built to use the nettle cryptographic library.")
|
| 125 | (license license:gpl3+)))
|
| 126 |
|
| 127 | (define-public sequoia-sq
|
| 128 | (package
|
| 129 | (name "sequoia-sq")
|
| 130 | (version "1.4.1")
|
| 131 | (source
|
| 132 | (origin
|
| 133 | (method url-fetch)
|
| 134 | (uri (crate-uri "sequoia-sq" version))
|
| 135 | (file-name (string-append name "-" version ".tar.gz"))
|
| 136 | (sha256
|
| 137 | (base32 "14cck374a6znahiv53zp0rx5smki7wnx7nglwfvz08bw45gb3ilw"))))
|
| 138 | (build-system cargo-build-system)
|
| 139 | (arguments
|
| 140 | `(#:imported-modules ((guix build copy-build-system)
|
| 141 | ,@%cargo-build-system-modules)
|
| 142 | #:modules ((guix build cargo-build-system)
|
| 143 | ((guix build copy-build-system) #:prefix copy:)
|
| 144 | (guix build utils))
|
| 145 | #:install-source? #f
|
| 146 | #:features '("crypto-nettle"
|
| 147 | "sequoia-keystore/gpg-agent"
|
| 148 | "sequoia-keystore/openpgp-card"
|
| 149 | "sequoia-keystore/softkeys")
|
| 150 | #:cargo-test-flags
|
| 151 | (list "--"
|
| 152 | |
| 153 | "--skip=sq_autocrypt_import")
|
| 154 | #:phases
|
| 155 | (modify-phases %standard-phases
|
| 156 | (add-after 'unpack 'set-asset-out-dir
|
| 157 | (lambda _
|
| 158 | (setenv "ASSET_OUT_DIR" "target/assets")))
|
| 159 | |
| 160 | (replace 'install
|
| 161 | (lambda* (#:key outputs features #:allow-other-keys)
|
| 162 | (invoke "cargo" "install" "--offline" "--no-track"
|
| 163 | "--path" "." "--root" (assoc-ref outputs "out")
|
| 164 | "--features" (string-join features))))
|
| 165 | (add-after 'install 'install-more
|
| 166 | (lambda args
|
| 167 | (apply (assoc-ref copy:%standard-phases 'install)
|
| 168 | #:install-plan
|
| 169 | '(("target/assets/man-pages" "share/man/man1"
|
| 170 | #:include-regexp ("\\.1$"))
|
| 171 | ("target/assets/shell-completions/sq.bash"
|
| 172 | "share/bash-completion/completions/sq")
|
| 173 | ("target/assets/shell-completions/sq.elv"
|
| 174 | "share/elvish/lib/sq")
|
| 175 | ("target/assets/shell-completions/sq.fish"
|
| 176 | "share/fish/vendor_completions.d/")
|
| 177 | ("target/assets/shell-completions/_sq"
|
| 178 | "share/zsh/site-functions/"))
|
| 179 | args))))))
|
| 180 | (inputs
|
| 181 | (cons* nettle openssl pcsc-lite sqlite (cargo-inputs 'sequoia-sq)))
|
| 182 | (native-inputs
|
| 183 | (list capnproto clang pkg-config))
|
| 184 | (home-page "https://sequoia-pgp.org/")
|
| 185 | (synopsis "Command-line frontend for Sequoia OpenPGP")
|
| 186 | (description "This package provides the command-line frontend for Sequoia
|
| 187 | OpenPGP.
|
| 188 |
|
| 189 | This Guix package is built to use the nettle cryptographic library and the
|
| 190 | gpg-agent, openpgp-card and softkeys keystore backends.")
|
| 191 | (license license:lgpl2.0+)))
|
| 192 |
|
| 193 | (define-public sequoia-sqv
|
| 194 | (package
|
| 195 | (name "sequoia-sqv")
|
| 196 | (version "1.5.0")
|
| 197 | (source
|
| 198 | (origin
|
| 199 | (method url-fetch)
|
| 200 | (uri (crate-uri "sequoia-sqv" version))
|
| 201 | (file-name (string-append name "-" version ".tar.gz"))
|
| 202 | (sha256
|
| 203 | (base32 "1j0v6lyjdgky3lv2mbp1w06py10d41v0b9cg99jxv538fhi1zsyl"))))
|
| 204 | (build-system cargo-build-system)
|
| 205 | (arguments
|
| 206 | `(#:imported-modules ((guix build copy-build-system)
|
| 207 | ,@%cargo-build-system-modules)
|
| 208 | #:modules ((guix build cargo-build-system)
|
| 209 | ((guix build copy-build-system) #:prefix copy:)
|
| 210 | (guix build utils))
|
| 211 | #:install-source? #f
|
| 212 | #:phases
|
| 213 | (modify-phases %standard-phases
|
| 214 | (add-after 'unpack 'set-asset-out-dir
|
| 215 | (lambda _
|
| 216 | (setenv "ASSET_OUT_DIR" "target/assets")))
|
| 217 | (add-after 'install 'install-more
|
| 218 | (lambda args
|
| 219 | (apply (assoc-ref copy:%standard-phases 'install)
|
| 220 | #:install-plan
|
| 221 | '(("target/assets/man-pages" "share/man/man1"
|
| 222 | #:include-regexp ("\\.1$"))
|
| 223 | ("target/assets/shell-completions/sqv.bash"
|
| 224 | "share/bash-completion/completions/sqv")
|
| 225 | ("target/assets/shell-completions/sqv.elv"
|
| 226 | "share/elvish/lib/sqv")
|
| 227 | ("target/assets/shell-completions/sqv.fish"
|
| 228 | "share/fish/vendor_completions.d/")
|
| 229 | ("target/assets/shell-completions/_sqv"
|
| 230 | "share/zsh/site-functions/"))
|
| 231 | args))))))
|
| 232 | (inputs
|
| 233 | (cons* nettle (cargo-inputs 'sequoia-sqv)))
|
| 234 | (native-inputs
|
| 235 | (list clang pkg-config))
|
| 236 | (home-page "https://sequoia-pgp.org/")
|
| 237 | (synopsis "Simple OpenPGP signature verification program")
|
| 238 | (description "@code{sqv} verifies detached OpenPGP signatures. It is a
|
| 239 | replacement for @code{gpgv}. Unlike @code{gpgv}, it can take additional
|
| 240 | constraints on the signature into account.
|
| 241 |
|
| 242 | This Guix package is built to use the nettle cryptographic library.")
|
| 243 | (license license:lgpl2.0+)))
|
| 244 |
|
| 245 | (define-public sequoia-wot-tools
|
| 246 | (package
|
| 247 | (name "sequoia-wot-tools")
|
| 248 | (version "0.15.3")
|
| 249 | (source
|
| 250 | (origin
|
| 251 | (method git-fetch)
|
| 252 | (uri (git-reference
|
| 253 | (url "https://gitlab.com/sequoia-pgp/sequoia-wot.git/")
|
| 254 | (commit (string-append "v" version))))
|
| 255 | (file-name (git-file-name name version))
|
| 256 | (sha256
|
| 257 | (base32 "12jf356rsaw01w371667dzd6rizl3p4qy2isv4wvdjs00yvjfkcw"))))
|
| 258 | (build-system cargo-build-system)
|
| 259 | (arguments
|
| 260 | (list
|
| 261 | #:features '(list "sequoia-openpgp/crypto-nettle")
|
| 262 | #:cargo-package-crates ''("tools")
|
| 263 | #:install-source? #f
|
| 264 | #:cargo-install-paths ''("tools")
|
| 265 | #:phases
|
| 266 | #~(modify-phases %standard-phases
|
| 267 | (add-after 'install 'install-more
|
| 268 | (lambda* (#:key outputs #:allow-other-keys)
|
| 269 | (let* ((out (assoc-ref outputs "out"))
|
| 270 | (share (string-append out "/share"))
|
| 271 | (man1 (string-append share "/man/man1")))
|
| 272 | (for-each (lambda (file)
|
| 273 | (install-file file man1))
|
| 274 | (find-files "target/release" "\\.1$"))
|
| 275 | (mkdir-p (string-append out "/share/bash-completion/completions"))
|
| 276 | (mkdir-p (string-append share "/fish/vendor_completions.d"))
|
| 277 | (mkdir-p (string-append share "/elvish/lib"))
|
| 278 | (copy-file (car (find-files "target/release" "sq-wot.bash"))
|
| 279 | (string-append
|
| 280 | out "/share/bash-completion/completions/sq-wot"))
|
| 281 | (copy-file (car (find-files "target/release" "sq-wot.fish"))
|
| 282 | (string-append
|
| 283 | share "/fish/vendor_completions.d/sq-wot.fish"))
|
| 284 | (copy-file (car (find-files "target/release" "sq-wot.elv"))
|
| 285 | (string-append share "/elvish/lib/sq-wot"))
|
| 286 | (install-file (car (find-files "target/release" "_sq-wot"))
|
| 287 | (string-append
|
| 288 | share "/zsh/site-functions"))))))))
|
| 289 | (inputs
|
| 290 | (cons* nettle openssl sqlite (cargo-inputs 'sequoia-wot-tools)))
|
| 291 | (native-inputs
|
| 292 | (list clang gnupg pkg-config))
|
| 293 | (home-page "https://sequoia-pgp.org/")
|
| 294 | (synopsis "Implementation of OpenPGP's web of trust")
|
| 295 | (description
|
| 296 | "This package provides an implementation of @code{OpenPGP's} web of trust.
|
| 297 |
|
| 298 | This Guix package is built to use the nettle cryptographic library.")
|
| 299 | (license license:lgpl2.0+)))
|
| 300 |
|
| 301 | |
| 302 |
|
| 303 | |
| 304 | (define-public sequoia
|
| 305 | (package
|
| 306 | (name "sequoia")
|
| 307 | (version "2.4.1")
|
| 308 | (source #f)
|
| 309 | (build-system trivial-build-system)
|
| 310 | (arguments
|
| 311 | (list
|
| 312 | #:modules '((guix build utils)
|
| 313 | (guix build union)
|
| 314 | (guix build gnu-build-system)
|
| 315 | (guix build gremlin)
|
| 316 | (guix elf))
|
| 317 | #:builder
|
| 318 | #~(begin
|
| 319 | (use-modules (guix build utils)
|
| 320 | (guix build union)
|
| 321 | (guix build gnu-build-system)
|
| 322 | (ice-9 match))
|
| 323 | (let ((make-dynamic-linker-cache
|
| 324 | (assoc-ref %standard-phases 'make-dynamic-linker-cache))
|
| 325 | (ld.so.cache
|
| 326 | (string-append #$output "/etc/ld.so.cache")))
|
| 327 | (match %build-inputs
|
| 328 | (((names . directories) ...)
|
| 329 | (union-build #$output directories)))
|
| 330 | (delete-file ld.so.cache)
|
| 331 | (setenv "PATH"
|
| 332 | (string-append (getenv "PATH") ":" #$glibc "/sbin"))
|
| 333 | (make-dynamic-linker-cache #:outputs %outputs)))))
|
| 334 | (inputs
|
| 335 | (list |
| 336 | sequoia-sq
|
| 337 | sequoia-sqv
|
| 338 | sequoia-wot-tools))
|
| 339 | (home-page "https://sequoia-pgp.org")
|
| 340 | (synopsis "New OpenPGP implementation (meta-package)")
|
| 341 | (description "Sequoia is a new OpenPGP implementation, written in Rust,
|
| 342 | consisting of several Rust crates/packages. This Guix meta-package combines
|
| 343 | these packages into a single one for convenience. Anyhow, you should not
|
| 344 | depend other packages on this one avoid excessive compile-times for users.")
|
| 345 | (license license:lgpl2.0+)))
|