diff options
Diffstat (limited to 'gnu/packages/golang-crypto.scm')
-rw-r--r-- | gnu/packages/golang-crypto.scm | 539 |
1 files changed, 468 insertions, 71 deletions
diff --git a/gnu/packages/golang-crypto.scm b/gnu/packages/golang-crypto.scm index 273879b47a..a9c8b68d4e 100644 --- a/gnu/packages/golang-crypto.scm +++ b/gnu/packages/golang-crypto.scm @@ -1,25 +1,28 @@ ;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2017-2020 Leo Famulari <leo@famulari.name> ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz> ;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2019 Vagrant Cascadian <vagrant@debian.org> -;;; Copyright © 2019, 2020 Leo Famulari <leo@famulari.name> ;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com> +;;; Copyright © 2020, 2022 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2021 Arun Isaac <arunisaac@systemreboot.net> +;;; Copyright © 2021 BonfaceKilz <me@bonfacemunyoki.com> ;;; Copyright © 2021 Collin J. Doering <collin@rekahsoft.ca> ;;; Copyright © 2021 LibreMiami <packaging-guix@libremiami.org> ;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name> ;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev> ;;; Copyright © 2021 Vagrant Cascadian <vagrant@debian.org> ;;; Copyright © 2022 (unmatched-parenthesis <paren@disroot.org> -;;; Copyright © 2022 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2022 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2022, 2023 Nicolas Graves <ngraves@ngraves.fr> -;;; Copyright © 2023 Artyom V. Poptsov <poptsov.artyom@gmail.com> ;;; Copyright © 2023 Benjamin <benjamin@uvy.fr> ;;; Copyright © 2023 Clément Lassieur <clement@lassieur.org> ;;; Copyright © 2023 Felix Lechner <felix.lechner@lease-up.com> ;;; Copyright © 2023 Jack Hill <jackhill@jackhill.us> +;;; Copyright © 2023, 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com> +;;; Copyright © 2024 Jesse Eisses <jesse@eisses.email> ;;; Copyright © 2024 Troy Figiel <troy@troyfigiel.com> +;;; Copyright © 2024 Jean Simard <woshilapin@tuziwo.info> ;;; ;;; This file is part of GNU Guix. ;;; @@ -44,12 +47,14 @@ #:use-module (guix packages) #:use-module (guix utils) #:use-module (gnu packages) + #:use-module (gnu packages gnupg) #:use-module (gnu packages golang) #:use-module (gnu packages golang-build) #:use-module (gnu packages golang-check) #:use-module (gnu packages golang-compression) #:use-module (gnu packages golang-web) #:use-module (gnu packages golang-xyz) + #:use-module (gnu packages password-utils) #:use-module (gnu packages specifications)) ;;; Commentary: @@ -62,10 +67,63 @@ ;;; ;;; Code: +;;; +;;; Libraries: +;;; + +(define-public go-c2sp-org-cctv-age + (package + (name "go-c2sp-org-cctv-age") + (version "0.0.0-20240306222714-3ec4d716e805") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/C2SP/CCTV") + (commit (go-version->git-ref version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "00bk05ca94lm3b029ycwj0krmg2gfjv1c3pc7dvq9gmwwzr564v5")) + (modules '((guix build utils))) + (snippet + #~(begin + ;; Sub folders containing different projects with their own + ;; licenses. + (for-each delete-file-recursively + (list "ML-KEM" "RFC6979" "ed25519" "jq255")))))) + (build-system go-build-system) + (arguments + (list + #:import-path "c2sp.org/CCTV/age" + #:unpack-path "c2sp.org/CCTV")) + (propagated-inputs + (list go-golang-org-x-crypto)) + (home-page "https://c2sp.org/CCTV/age") + (synopsis "Community Cryptography Test Vectors") + (description + "This package provides a large set of test vectors for the age file +encryption format, as well as a framework to easily generate them. + +The test suite can be applied to any age implementation, regardless of the +language it's implemented in, and the level of abstraction of its +interface. For the simplest, most universal integration, the implementation +can just attempt to decrypt the test files, check the operation only succeeds +if expect is success, and compare the decrypted payload. Test vectors +involving unimplemented features (such as passphrase encryption or armoring) +can be ignored.") + ;; age/internal/LICENSE: Redistribution and use in source and binary + ;; forms, with or without modification, are permitted provided that the + ;; following conditions are met + ;; + ;; age/README: The vectors in the testdata folder are available under the + ;; terms of the Zero-Clause BSD (reproduced below), CC0 1.0, or Unlicense + ;; license, to your choice. + (license license:cc0))) + (define-public go-filippo-io-age (package (name "go-filippo-io-age") - (version "1.1.1") + (version "1.2.0") (source (origin (method git-fetch) @@ -74,10 +132,41 @@ (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1k1dv1jkr72qpk5g363mhrg9hnf5c9qgv4l16l13m4yh08jp271d")))) + (base32 "1dms32lxqgjipmlisng7dmy1sdw0qscj43x9lmpadyzbzc64lhrv")))) (build-system go-build-system) - (arguments `(#:import-path "filippo.io/age")) - (inputs + (arguments + (list + #:import-path "filippo.io/age" + #:phases + #~(modify-phases %standard-phases + ;; FIXME: src/c2sp.org/CCTV/age/age.go:13:12: pattern testdata: + ;; cannot embed directory testdata: contains no embeddable files + ;; + ;; This happens due to Golang can't determine the valid directory of + ;; the module which is sourced during setup environment phase, but + ;; easy resolved after coping to expected directory "vendor" within + ;; the current package, see details in Golang source: + ;; + ;; - URL: <https://github.com/golang/go/blob/> + ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454 + ;; - file: src/cmd/go/internal/load/pkg.go#L2059 + (add-before 'build 'copy-input-to-vendor-directory + (lambda* (#:key import-path #:allow-other-keys) + (with-directory-excursion (string-append "src/" import-path) + (mkdir "vendor") + (copy-recursively + (string-append + #$(this-package-native-input "go-c2sp-org-cctv-age") + "/src/c2sp.org") + "vendor/c2sp.org")))) + (add-before 'install 'remove-vendor-directory + (lambda* (#:key import-path #:allow-other-keys) + (with-directory-excursion (string-append "src/" import-path) + (delete-file-recursively "vendor"))))))) + (native-inputs + (list go-c2sp-org-cctv-age + go-github-com-rogpeppe-go-internal)) + (propagated-inputs (list go-golang-org-x-sys go-golang-org-x-term go-golang-org-x-crypto @@ -91,24 +180,6 @@ It features small explicit keys, no configuration options, and Unix-style composability.") (license license:bsd-3))) -(define-public age - (package - (inherit go-filippo-io-age) - (name "age") - (arguments - `(#:import-path "filippo.io/age/cmd/age" - #:unpack-path "filippo.io/age" - #:install-source? #f)))) - -(define-public age-keygen - (package - (inherit go-filippo-io-age) - (name "age-keygen") - (arguments - `(#:import-path "filippo.io/age/cmd/age-keygen" - #:unpack-path "filippo.io/age" - #:install-source? #f)))) - (define-public go-filippo-io-edwards25519 (package (name "go-filippo-io-edwards25519") @@ -132,9 +203,9 @@ Go, exposing the necessary APIs to build a wide array of higher-level primitives.") (license license:bsd-3))) -(define-public go-github-com-99designs-go-keyring +(define-public go-github-com-99designs-keyring (package - (name "go-github-com-99designs-go-keyring") + (name "go-github-com-99designs-keyring") (version "1.2.2") (source (origin @@ -146,6 +217,30 @@ primitives.") (sha256 (base32 "0mkvy7scyq07rkqhabfmkd8imcm4h9y7zj9palj04znpihpixa5m")))) (build-system go-build-system) + (arguments + (list + #:import-path "github.com/99designs/keyring" + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'disable-failing-tests + (lambda* (#:key tests? unpack-path #:allow-other-keys) + (with-directory-excursion (string-append "src/" unpack-path) + (substitute* (find-files "." "\\_test.go$") + ;; Disable test requring running DBus. + (("TestLibSecretKeysWhenEmpty") + "OffTestLibSecretKeysWhenEmpty") + (("TestLibSecretKeysWhenNotEmpty") + "OffTestLibSecretKeysWhenNotEmpty") + (("TestLibSecretGetWhenEmpty") + "OffTestLibSecretGetWhenEmpty") + (("TestLibSecretGetWhenNotEmpty") + "OffTestLibSecretGetWhenNotEmpty") + (("TestLibSecretRemoveWhenEmpty") + "OffTestLibSecretRemoveWhenEmpty") + (("TestLibSecretRemoveWhenNotEmpty") + "OffTestLibSecretRemoveWhenNotEmpty")))))))) + (native-inputs + (list gnupg go-github-com-stretchr-testify password-store)) (propagated-inputs (list go-github-com-dvsekhvalnov-jose2go go-github-com-godbus-dbus @@ -154,9 +249,7 @@ primitives.") go-github-com-mtibben-percent go-golang-org-x-sys go-golang-org-x-term)) - (arguments - '(#:import-path "github.com/99designs/keyring" - #:tests? #f)) ;XXX: tests require Vagrant + (home-page "https://github.com/99designs/keyring") (synopsis "Go library providing a uniform interface for various secure credential stores") (description @@ -167,7 +260,6 @@ workstations. Currently Keyring supports the following backends: macOS/OSX Keychain, Windows pcredential store, Pass, Secret Service, KDE Wallet, Encrypted File.") - (home-page "https://github.com/99designs/keyring") (license license:expat))) (define-public go-github-com-aead-chacha20 @@ -290,6 +382,34 @@ the Ristretto prime-order group built from Edwards25519.") (define-public go-github-com-cespare-xxhash (package (name "go-github-com-cespare-xxhash") + (version "1.1.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/cespare/xxhash") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1qyzlcdcayavfazvi03izx83fvip8h36kis44zr2sg7xf6sx6l4x")))) + (build-system go-build-system) + (arguments + (list + #:import-path "github.com/cespare/xxhash")) + (propagated-inputs + (list go-github-com-spaolacci-murmur3 + go-github-com-oneofone-xxhash)) + (home-page "https://github.com/cespare/xxhash") + (synopsis "Go implementation of xxHash") + (description + "Package xxhash implements the 64-bit variant of @code{xxHash} (XXH64) as +described at @url{https://xxhash.com/}.") + (license license:expat))) + +(define-public go-github-com-cespare-xxhash-v2 + (package + (inherit go-github-com-cespare-xxhash) + (name "go-github-com-cespare-xxhash-v2") (version "2.1.2") (source (origin @@ -302,10 +422,9 @@ the Ristretto prime-order group built from Edwards25519.") (base32 "1f3wyr9msnnz94szrkmnfps9wm40s5sp9i4ak0kl92zcrkmpy29a")) (modules '((guix build utils))) (snippet '(delete-file-recursively "xxhashbench")))) - (build-system go-build-system) (arguments (list - #:import-path "github.com/cespare/xxhash" + #:import-path "github.com/cespare/xxhash/v2" #:phases #~(modify-phases %standard-phases (replace 'check @@ -314,11 +433,43 @@ the Ristretto prime-order group built from Edwards25519.") ;; The tests fail when run with gccgo. (false-if-exception (search-input-file inputs "/bin/gccgo")) (apply (assoc-ref %standard-phases 'check) args))))))) - (home-page "https://github.com/cespare/xxhash/") - (synopsis "Go implementation of xxHash") - (description "This package provides of Go implementation of the 64-bit -xxHash algorithm (XXH64).") - (license license:expat))) + (propagated-inputs '()))) + +(define-public go-github-com-chmduquesne-rollinghash + (let ((commit "9a5199be7309f50c496efc87d29bd08788605ae7") + (revision "1")) + (package + (name "go-github-com-chmduquesne-rollinghash") + (version (git-version "4.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/chmduquesne/rollinghash") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1gkdgsgrmwagwyp4lmd4k11mbwi8f1yw9c9rhnkmav87gy1k84jr")))) + (build-system go-build-system) + (arguments + (list + #:import-path "github.com/chmduquesne/rollinghash/" + #:phases + #~(modify-phases %standard-phases + ;; XXX: Run all tests, workaround for go-build-system's lack of Go + ;; modules support. + (replace 'check + (lambda* (#:key tests? import-path #:allow-other-keys) + (when tests? + (with-directory-excursion (string-append "src/" import-path) + (invoke "go" "test" "-v" "./...")))))))) + (propagated-inputs + (list go-code-cloudfoundry-org-bytefmt)) + (home-page "https://github.com/chmduquesne/rollinghash") + (synopsis "Rolling hashes in Go") + (description + "This package provides a Go implementation of several rolling hashes.") + (license license:expat)))) (define-public go-github-com-cloudflare-circl (package @@ -374,10 +525,36 @@ and encrypting JSON Web Tokens (JWT). It relies only on the standard library.") (license license:expat))) +(define-public go-github-com-emersion-go-bcrypt + (package + (name "go-github-com-emersion-go-bcrypt") + (version "0.0.0-20170822072041-6e724a1baa63") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/emersion/go-bcrypt") + (commit (go-version->git-ref version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1pchrgs05w30iqbh4d6iys4wvlyajsdwchp5mkf59amgsbyjaqgm")))) + (build-system go-build-system) + (arguments + (list + #:import-path "github.com/emersion/go-bcrypt")) + (propagated-inputs + (list go-golang-org-x-crypto)) + (home-page "https://github.com/emersion/go-bcrypt") + (synopsis "Extract of bcrypt from golang.org/x/crypto/bcrypt") + (description + "This package provides an extract @code{bcrypt} from +@code{golang.org/x/crypto/bcrypt}.") + (license license:bsd-3))) + (define-public go-github-com-emersion-go-pgpmail (package (name "go-github-com-emersion-go-pgpmail") - (version "0.2.0") + (version "0.2.1") (source (origin (method git-fetch) @@ -386,17 +563,14 @@ library.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0ar26b0apw5bxn58qfn1a79cxigbmrqm1irh1rb7x57fydihc7wm")))) + (base32 "1fiqpdwxnfba2cgij7j83dfqc0zz4mq95x15wicgm5f3vjr1xg5h")))) (build-system go-build-system) (arguments - (list ;; tests don't support our version of protonmail/go-crypto; see - ;; <https://github.com/emersion/go-pgpmail/issues/12> - #:tests? #f + (list #:import-path "github.com/emersion/go-pgpmail")) (propagated-inputs (list go-github-com-emersion-go-message go-github-com-protonmail-go-crypto - go-golang-org-x-crypto go-golang-org-x-text)) (home-page "https://github.com/emersion/go-pgpmail") (synopsis "PGP mail encryption for Go") @@ -453,10 +627,34 @@ providing bidirectional mapping values to their names, plus enum convenience for values.") (license license:bsd-3))) -(define-public go-github-com-golang-jwt-jwt-v4 +(define-public go-github-com-go-asn1-ber-asn1-ber (package - (name "go-github-com-golang-jwt-jwt-v4") - (version "4.5.0") + (name "go-github-com-go-asn1-ber-asn1-ber") + (version "1.5.7") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/go-asn1-ber/asn1-ber") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0xa1s1q2is9fr02pvrc9sq8zfq9ba6gk64yg1ncglppp30f50q52")))) + (build-system go-build-system) + (arguments + (list + #:import-path "github.com/go-asn1-ber/asn1-ber")) + (home-page "https://github.com/go-asn1-ber/asn1-ber") + (synopsis "ASN.1 BER encoding and decoding in Go") + (description + "This package provides @acronym{Abstract Syntax Notation One, ASN.1} BER +encoding and decoding in the Go language.") + (license license:expat))) + +(define-public go-github-com-golang-jwt-jwt + (package + (name "go-github-com-golang-jwt-jwt") + (version "3.2.2") (source (origin (method git-fetch) @@ -465,11 +663,11 @@ for values.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1m7c9lwlmd0lnn0hyby1rb3f4nwn4xcjgca218frj0hi0krqn8kp")))) + (base32 "0hq8wz11g6kddx9ab0icl5h3k4lrivk1ixappnr5db2ng2wjks9c")))) (build-system go-build-system) (arguments (list - #:import-path "github.com/golang-jwt/jwt/v4")) + #:import-path "github.com/golang-jwt/jwt")) (home-page "https://github.com/golang-jwt/jwt") (synopsis "Go implementation of JSON Web Tokens") (description @@ -480,6 +678,24 @@ JSON Web Tokens. The currently supported signing algorithms are HMAC SHA, RSA, RSA-PSS, and ECDSA, though hooks are present for adding your own.") (license license:expat))) +(define-public go-github-com-golang-jwt-jwt-v4 + (package + (inherit go-github-com-golang-jwt-jwt) + (name "go-github-com-golang-jwt-jwt-v4") + (version "4.5.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/golang-jwt/jwt") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1m7c9lwlmd0lnn0hyby1rb3f4nwn4xcjgca218frj0hi0krqn8kp")))) + (arguments + (list + #:import-path "github.com/golang-jwt/jwt/v4")))) + (define-public go-github-com-golang-jwt-jwt-v5 (package (inherit go-github-com-golang-jwt-jwt-v4) @@ -496,9 +712,50 @@ RSA, RSA-PSS, and ECDSA, though hooks are present for adding your own.") (base32 "0px12zhdmzqjj5zlcr136rcsilpmi4chiz6arxv49q372j4nhmia")))) (arguments (list - #:go go-1.18 #:import-path "github.com/golang-jwt/jwt/v5")))) +(define-public go-github-com-google-go-tpm + (package + (name "go-github-com-google-go-tpm") + (version "0.9.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/google/go-tpm") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1c5j5cvwl45ka93nknmv454ivd7kp9n8yql19gr6z01z0s1ph7sg")))) + (build-system go-build-system) + (arguments + (list + #:go go-1.22 + #:import-path "github.com/google/go-tpm" + #:phases + #~(modify-phases %standard-phases + ;; XXX: Break cycle: + ;; github.com/google/go-tpm/tpm2/transport/simulator/simulator.go -> + ;; github.com/google/go-tpm-tools -> github.com/google/go-tpm. + ;; Consider to add required inputs on dependent package. + (delete 'build) + (delete 'check)))) + (home-page "https://github.com/google/go-tpm") + (synopsis "Go-TPM Legacy TPM 2.0 library") + (description + "This package provides a functionality to communicate directly with a +@acronym{Trusted Platform Module, TPM} device. The libraries don't implement +the entire spec for neither 1.2 nor 2.0. + +Included submodules: +@itemize +@item @code{tpm} - TPM 1.2 client library +@item @code{tpm2} - TPM 2.0 client library. +@item @code{direct} - the prototype \"TPMDirect\" TPM 2.0 API, which is +intended to (eventually) be 1:1 with the TPM 2.0 spec +@end itemize") + (license license:asl2.0))) + ;; It's not public for purpose, as it contains a lot of golang modules which ;; may be inherited from the single source, but the package itself does not ;; have to be installed directly or linked to other packages.. @@ -852,8 +1109,7 @@ Architecture Processors\" by J. Guilford et al.") (base32 "0ydh94083888xl2r4d1grzgqf3c818mkmdpj008jkh6h7m56wc4w")))) (build-system go-build-system) (arguments - (list #:go go-1.21 - #:import-path "github.com/multiformats/go-multihash" + (list #:import-path "github.com/multiformats/go-multihash" #:phases #~(modify-phases %standard-phases (add-after 'unpack 'copy-multibase-specs @@ -883,6 +1139,37 @@ Architecture Processors\" by J. Guilford et al.") (description "Multihash implementation in Go.") (license license:expat))) +(define-public go-github-com-oneofone-xxhash + (package + (name "go-github-com-oneofone-xxhash") + (version "1.2.8") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/OneOfOne/xxhash") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0f98qk83l2fhpclvrgyxsa9b8m4pipf11fah85bnjl01wy4lvybw")))) + (build-system go-build-system) + (arguments + (list + #:import-path "github.com/OneOfOne/xxhash" + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'remove-benchmarks + (lambda* (#:key import-path #:allow-other-keys) + (delete-file-recursively + (string-append "src/" import-path "/benchmarks"))))))) + (home-page "https://github.com/OneOfOne/xxhash") + (synopsis "Go implementation of xxHash") + (description + "This is a native Go implementation of the +@url{https://github.com/Cyan4973/xxHash, xxHash} algorithm, an extremely fast +non-cryptographic hash algorithm, working at speeds close to RAM limits.") + (license license:asl2.0))) + (define-public go-github-com-operatorfoundation-ed25519 (let ((commit "b22b4bd3ddef042eec45f3ee135cd40281fde2b4") (revision "0")) @@ -916,41 +1203,72 @@ Architecture Processors\" by J. Guilford et al.") algorithm.") (license license:bsd-3)))) +(define-public go-github-com-pion-randutil + (package + (name "go-github-com-pion-randutil") + (version "v0.1.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/pion/randutil") + (commit (go-version->git-ref version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "098isjyvyb8jhrrr57xi45g5m35vb1l92dm5wcy7g2q9x55lvxg5")))) + (build-system go-build-system) + (arguments + (list + #:import-path "github.com/pion/randutil")) + (home-page "https://github.com/pion/randutil") + (synopsis "Helper library for cryptographic and mathmatical randoms") + (description + "This package provides primitives for generating random values.") + (license license:expat))) + (define-public go-github-com-protonmail-go-crypto (package (name "go-github-com-protonmail-go-crypto") - (version "0.0.0-20220623141421-5afb4c282135") + (version "1.0.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/ProtonMail/go-crypto") - (commit (go-version->git-ref version)))) + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "05qxdbn8wdk901z5kw2r3jdrag58nxlcsy0p8xd6rq0d71sw94wy")))) + (base32 "11q94983r6zjrdvflpikms4773a9s5vb9gg4qw1rj5800yhhah0n")))) (build-system go-build-system) (arguments - (list #:import-path "github.com/ProtonMail/go-crypto" - #:tests? #f ; Source-only package. - #:phases - #~(modify-phases %standard-phases - ;; Source-only package. - (delete 'build)))) + (list + #:import-path "github.com/ProtonMail/go-crypto" + #:phases + #~(modify-phases %standard-phases + ;; XXX: Workaround for go-build-system's lack of Go modules + ;; support. + (delete 'build) + (replace 'check + (lambda* (#:key tests? import-path #:allow-other-keys) + (when tests? + (with-directory-excursion (string-append "src/" import-path) + (invoke "go" "test" "-v" "./...")))))))) (propagated-inputs - (list go-golang-org-x-crypto)) + (list go-github-com-cloudflare-circl + go-golang-org-x-crypto)) (home-page "https://github.com/ProtonMail/go-crypto") (synopsis "Fork of x/crypto with up-to-date OpenPGP implementation") - (description "This package provides cryptography for Go. This version of -the package is a fork that adds a more up-to-date OpenPGP implementation. It -is completely backwards compatible with @code{golang.org/x/crypto}, the -official package.") + (description + "This package provides cryptography for Go. This version of the package +is a fork that adds a more up-to-date OpenPGP implementation. It is +completely backwards compatible with @code{golang.org/x/crypto}, the official +package.") (license license:bsd-3))) (define-public go-github-com-quic-go-qtls-go1-20 (package (name "go-github-com-quic-go-qtls-go1-20") - (version "0.3.4") + (version "0.4.1") (source (origin (method git-fetch) @@ -959,12 +1277,13 @@ official package.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0fl3yv1w8cygag3lav45vvzb4k9i72p92x13wcq0xn13wxirzirn")))) + (base32 "069rknxpg7d0dmxc4akq2mw7wm5bi0420nshykf2iclvmbcg9ajh")))) (build-system go-build-system) (arguments (list - #:import-path "github.com/quic-go/qtls-go1-20" - #:go go-1.20)) + ;; XXX: panic: qtls.ClientSessionState doesn't match, with Golang 1.20+. + #:go go-1.20 + #:import-path "github.com/quic-go/qtls-go1-20")) (propagated-inputs (list go-golang-org-x-crypto go-golang-org-x-sys)) @@ -990,7 +1309,6 @@ QUIC. For Go 1.20.") (build-system go-build-system) (arguments `(#:import-path "github.com/refraction-networking/utls" - #:go ,go-1.20 #:tests? #f)) ;requires internet access (propagated-inputs (list go-github-com-andybalholm-brotli @@ -1175,6 +1493,34 @@ package is intended for interoperability with the standard library and the possible.") (license license:bsd-3)))) +(define-public go-github-com-youmark-pkcs8 + (package + (name "go-github-com-youmark-pkcs8") + (version "1.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/youmark/pkcs8") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0ckdrwa5rmp2c85936qd9d0gzrnrvqfg0297ansz5frdhg6fc6nq")))) + (build-system go-build-system) + (arguments + (list + #:import-path "github.com/youmark/pkcs8")) + (propagated-inputs + (list go-golang-org-x-crypto)) + (home-page "https://github.com/youmark/pkcs8") + (synopsis "Functions to parse and convert private keys in PKCS#8 format") + (description + "@code{pkcs8} implements functions to process private keys in PKCS#8 +format, as defined in RFC 5208 and RFC 5958. It can handle both unencrypted +PKCS#8 PrivateKeyInfo format and EncryptedPrivateKeyInfo format with +PKCS#5 (v2.0) algorithms.") + (license license:expat))) + (define-public go-lukechampine-com-blake3 (package (name "go-lukechampine-com-blake3") @@ -1223,6 +1569,57 @@ performance for large inputs and outputs.") (description "GoPtLib is a library for writing Tor pluggable transports in Go.") (license license:cc0))) + +;;; +;;; Executables: +;;; + +(define-public age + (package + (inherit go-filippo-io-age) + (name "age") + (arguments + (list + #:install-source? #f + #:import-path "filippo.io/age/cmd/age" + #:unpack-path "filippo.io/age" + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'remove-failing-test-data-files + ;; FIXME: testdata/output_file.txt:49: unknown command "ttyin" + ;; age: error: input and output file are the same: "inputcopy" + ;; age: error: input and output file are the same: "./inputcopy" + ;; age: error: input and output file are the same: "keycopy" + (lambda* (#:key import-path #:allow-other-keys) + (with-directory-excursion (string-append "src/" import-path) + (for-each delete-file + (list "testdata/scrypt.txt" + "testdata/output_file.txt" + "testdata/encrypted_keys.txt" + "testdata/terminal.txt")))))))))) + +(define-public age-keygen + (package + (inherit go-filippo-io-age) + (name "age-keygen") + (arguments + `(#:import-path "filippo.io/age/cmd/age-keygen" + #:unpack-path "filippo.io/age" + #:install-source? #f)))) + +(define-public go-keyring + (package + (inherit go-github-com-99designs-keyring) + (name "go-keyring") + (arguments + (list + #:install-source? #f + #:import-path "github.com/99designs/keyring/cmd/keyring" + #:unpack-path "github.com/99designs/keyring")) + (description + (string-append (package-description go-github-com-99designs-keyring) + " This package provides an command line interface (CLI) +tool.")))) ;;; ;;; Avoid adding new packages to the end of this file. To reduce the chances |