From 123ea83f13b742fc168674c16bf7489d2b2e8962 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 27 Dec 2023 13:43:35 +0200 Subject: gnu: rust-rustls: Move to (gnu packages crates-tls). * gnu/packages/crates-io.scm (rust-rustls-0.21, rust-rustls-0.20, rust-rustls-0.19, rust-rustls-0.18, rust-rustls-0.17, rust-rustls-0.16, rust-rustls-0.15, rust-rustls-0.14, rust-rustls-ffi-0.8, rust-rustls-native-certs-0.6, rust-rustls-native-certs-0.5, rust-rustls-native-certs-0.4, rust-rustls-pemfile-2, rust-rustls-pemfile-1, rust-rustls-pemfile-0.2, rust-rustls-pki-types-1, rust-rustls-webpki-0.101, rust-rustls-webpki-0.100): Move from here ... * gnu/packages/crates-tls.scm: ... to here. Change-Id: Ief4208a2f86151447337b9ca037b4b28f753a9f8 --- gnu/packages/crates-tls.scm | 494 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 494 insertions(+) create mode 100644 gnu/packages/crates-tls.scm (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm new file mode 100644 index 0000000000..a6dd512547 --- /dev/null +++ b/gnu/packages/crates-tls.scm @@ -0,0 +1,494 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2020 Hartmut Goebel +;;; Copyright © 2020 Arun Isaac +;;; Copyright © 2020, 2023 Efraim Flashner +;;; Copyright © 2021 Nicolas Goaziou +;;; Copyright © 2021 Alexandru-Sergiu Marton +;;; Copyright © 2022 Aleksandr Vityazev +;;; Copyright © 2022 Ricardo Wurmus +;;; +;;; 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 . + +(define-module (gnu packages crates-tls) + #:use-module (guix build-system cargo) + #:use-module (guix download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix utils) + #:use-module (gnu packages) + #:use-module (gnu packages crates-io) + #:use-module (gnu packages crates-web) + #:use-module (gnu packages rust-apps)) + +(define-public rust-rustls-0.21 + (package + (name "rust-rustls") + (version "0.21.10") + (source (origin + (method url-fetch) + (uri (crate-uri "rustls" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1fmpzk3axnhkd99saqkvraifdfms4pkyi56lkihf8n877j0sdmgr")))) + (build-system cargo-build-system) + (arguments + `(#:tests? #f ; Not all files included. + #:cargo-inputs + (("rust-log" ,rust-log-0.4) + ("rust-ring" ,rust-ring-0.17) + ("rust-rustls-webpki" ,rust-rustls-webpki-0.101) + ("rust-rustversion" ,rust-rustversion-1) + ("rust-sct" ,rust-sct-0.7)) + #:cargo-development-inputs + (("rust-base64" ,rust-base64-0.21) + ("rust-bencher" ,rust-bencher-0.1) + ("rust-env-logger" ,rust-env-logger-0.10) + ("rust-log" ,rust-log-0.4) + ("rust-rustls-pemfile" ,rust-rustls-pemfile-1) + ("rust-webpki-roots" ,rust-webpki-roots-0.25)))) + (home-page "https://github.com/rustls/rustls") + (synopsis "Modern TLS library written in Rust") + (description + "This package provides a modern TLS library written in Rust.") + (license (list license:asl2.0 license:isc license:expat)))) + +(define-public rust-rustls-0.20 + (package + (inherit rust-rustls-0.21) + (name "rust-rustls") + (version "0.20.8") + (source (origin + (method url-fetch) + (uri (crate-uri "rustls" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0bqfymq5bjs1jxg1iw2nn4ab3kzz2lrk8a1vx3s98lhp9p3qzxzz")))) + (arguments + `(#:tests? #f ; Not all files included. + #:cargo-inputs + (("rust-log" ,rust-log-0.4) + ("rust-ring" ,rust-ring-0.16) + ("rust-rustversion" ,rust-rustversion-1) + ("rust-sct" ,rust-sct-0.7) + ("rust-webpki" ,rust-webpki-0.22)) + #:cargo-development-inputs + (("rust-base64" ,rust-base64-0.13) + ("rust-criterion" ,rust-criterion-0.3) + ("rust-env-logger" ,rust-env-logger-0.9) + ("rust-log" ,rust-log-0.4) + ("rust-rustls-pemfile" ,rust-rustls-pemfile-1) + ("rust-webpki-roots" ,rust-webpki-roots-0.22)))))) + +(define-public rust-rustls-0.19 + (package + (inherit rust-rustls-0.20) + (name "rust-rustls") + (version "0.19.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "rustls" version)) + (file-name + (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "02wqas2pcxk75s9l9c9f1r5am7258bmqprh68pnqfvkwz0gx4kq6")))) + (arguments + `(#:skip-build? #t + #:cargo-inputs + (("rust-base64" ,rust-base64-0.13) + ("rust-log" ,rust-log-0.4) + ("rust-ring" ,rust-ring-0.16) + ("rust-sct" ,rust-sct-0.6) + ("rust-webpki" ,rust-webpki-0.21)))))) + +(define-public rust-rustls-0.18 + (package + (inherit rust-rustls-0.19) + (name "rust-rustls") + (version "0.18.1") + (source + (origin + (method url-fetch) + (uri (crate-uri "rustls" version)) + (file-name + (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "108cf3bfw5high066shz9xrfv4jz7djdmnwqs3kwx4wfypf2c4ax")))) + (arguments + `(#:tests? #f ; Not all files included. + #:cargo-inputs + (("rust-base64" ,rust-base64-0.12) + ("rust-log" ,rust-log-0.4) + ("rust-ring" ,rust-ring-0.16) + ("rust-sct" ,rust-sct-0.6) + ("rust-webpki" ,rust-webpki-0.21)) + #:cargo-development-inputs + (("rust-criterion" ,rust-criterion-0.3) + ("rust-env-logger" ,rust-env-logger-0.7) + ("rust-log" ,rust-log-0.4) + ("rust-webpki-roots" ,rust-webpki-roots-0.20)))))) + +(define-public rust-rustls-0.17 + (package + (inherit rust-rustls-0.18) + (name "rust-rustls") + (version "0.17.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "rustls" version)) + (file-name + (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1q8m835viqrf4bbd2fa8rnmaj48fkd984saxf0238hb8blgs7m60")))) + (arguments + `(#:tests? #f ; Not all files included. + #:cargo-inputs + (("rust-base64" ,rust-base64-0.11) + ("rust-log" ,rust-log-0.4) + ("rust-ring" ,rust-ring-0.16) + ("rust-sct" ,rust-sct-0.6) + ("rust-webpki" ,rust-webpki-0.21)) + #:cargo-development-inputs + (("rust-criterion" ,rust-criterion-0.3) + ("rust-env-logger" ,rust-env-logger-0.7) + ("rust-log" ,rust-log-0.4) + ("rust-tempfile" ,rust-tempfile-3) + ("rust-webpki-roots" ,rust-webpki-roots-0.19)))))) + +(define-public rust-rustls-0.16 + (package + (inherit rust-rustls-0.17) + (name "rust-rustls") + (version "0.16.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "rustls" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "17n0fx3fpkg4fhpdplrdhkissnl003kj90vzbqag11vkpyqihnmj")))) + (arguments + `(#:tests? #f ;; 1/114 tests fail (test file not found) + #:cargo-inputs + (("rust-base64" ,rust-base64-0.10) + ("rust-log" ,rust-log-0.4) + ("rust-ring" ,rust-ring-0.16) + ("rust-sct" ,rust-sct-0.6) + ("rust-webpki" ,rust-webpki-0.21)) + #:cargo-development-inputs + (("rust-criterion" ,rust-criterion-0.2) + ("rust-env-logger" ,rust-env-logger-0.6) + ("rust-log" ,rust-log-0.4) + ("rust-tempfile" ,rust-tempfile-3) + ("rust-webpki-roots" ,rust-webpki-roots-0.17)))))) + +(define-public rust-rustls-0.15 + (package + (inherit rust-rustls-0.16) + (name "rust-rustls") + (version "0.15.2") + (source + (origin + (method url-fetch) + (uri (crate-uri "rustls" version)) + (file-name + (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0vh93fhqfbn4ysw4xzkpkpqdz36xixz4mhs1qllgldfq5iay6wgj")))) + (arguments + `(#:tests? #f ; API tests panic + #:cargo-test-flags + '("--release" "--" + "--skip=msgs::message_test::test_read_fuzz_corpus") + #:cargo-inputs + (("rust-base64" ,rust-base64-0.10) + ("rust-log" ,rust-log-0.4) + ("rust-ring" ,rust-ring-0.14) + ("rust-sct" ,rust-sct-0.5) + ("rust-untrusted" ,rust-untrusted-0.6) + ("rust-webpki" ,rust-webpki-0.19)) + #:cargo-development-inputs + (("rust-env-logger" ,rust-env-logger-0.6) + ("rust-log" ,rust-log-0.4) + ("rust-tempfile" ,rust-tempfile-3) + ("rust-webpki-roots" ,rust-webpki-roots-0.16)))))) + +(define-public rust-rustls-0.14 + (package + (inherit rust-rustls-0.18) + (name "rust-rustls") + (version "0.14.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "rustls" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1nal4qca7f7mhwnvx3m824ymdj6qmzfcl64sxmrmpis32dwr2y4b")))) + (arguments + `(#:skip-build? #t + #:cargo-inputs + (("rust-base64" ,rust-base64-0.9) + ("rust-log" ,rust-log-0.4) + ("rust-ring" ,rust-ring-0.13) + ("rust-sct" ,rust-sct-0.4) + ("rust-untrusted" ,rust-untrusted-0.6) + ("rust-webpki" ,rust-webpki-0.18)))))) + +(define-public rust-rustls-ffi-0.8 + (package + (name "rust-rustls-ffi") + (version "0.8.2") + (source (origin + (method url-fetch) + (uri (crate-uri "rustls-ffi" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "06kqrvm1d5ps9pml26zdd2hm8hh20j6svwvqibpnx7m5rh3jg9cx")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs + (("rust-libc" ,rust-libc-0.2) + ("rust-log" ,rust-log-0.4) + ("rust-num-enum" ,rust-num-enum-0.5) + ("rust-rustls" ,rust-rustls-0.20) + ("rust-rustls-pemfile" ,rust-rustls-pemfile-0.2) + ("rust-sct" ,rust-sct-0.7) + ("rust-webpki" ,rust-webpki-0.22)) + #:cargo-development-inputs + (("rust-cbindgen" ,rust-cbindgen-0.26)) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'adjust-cbindgen-requirement + ;; The Cargo.toml in the git repository doesn't specify + ;; a version requirement for cbindgen. + (lambda _ + (substitute* "Cargo.toml" + (("0\\.19\\.0") "*"))))))) + (home-page "https://github.com/rustls/rustls-ffi") + (synopsis "Rustls bindings for non-Rust languages") + (description "Rustls bindings for non-Rust languages") + (license (list license:asl2.0 license:isc license:expat)))) + +(define-public rust-rustls-native-certs-0.6 + (package + (name "rust-rustls-native-certs") + (version "0.6.3") + (source + (origin + (method url-fetch) + (uri (crate-uri "rustls-native-certs" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "007zind70rd5rfsrkdcfm8vn09j8sg02phg9334kark6rdscxam9")))) + (build-system cargo-build-system) + (arguments + `(#:tests? #f ; Tests want network access. + #:cargo-inputs + (("rust-openssl-probe" ,rust-openssl-probe-0.1) + ("rust-rustls-pemfile" ,rust-rustls-pemfile-1) + ("rust-schannel" ,rust-schannel-0.1) + ("rust-security-framework" ,rust-security-framework-2)) + #:cargo-development-inputs + (("rust-ring" ,rust-ring-0.16) + ("rust-rustls" ,rust-rustls-0.21) + ("rust-rustls-webpki" ,rust-rustls-webpki-0.100) + ("rust-serial-test" ,rust-serial-test-2) + ("rust-untrusted" ,rust-untrusted-0.7) + ("rust-webpki-roots" ,rust-webpki-roots-0.23) + ("rust-x509-parser" ,rust-x509-parser-0.15)))) + (home-page "https://github.com/ctz/rustls-native-certs") + (synopsis "Use the platform native certificate store with rustls") + (description "@code{rustls-native-certs} allows rustls to use the platform +native certificate store.") + (license + (list license:asl2.0 license:isc license:expat)))) + +(define-public rust-rustls-native-certs-0.5 + (package + (inherit rust-rustls-native-certs-0.6) + (name "rust-rustls-native-certs") + (version "0.5.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "rustls-native-certs" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "14i0bbbigk6r6262hvc51vz4dvqk1f3vg2f264wfvn2vi30vf1ss")))) + (arguments + `(#:skip-build? #t + #:cargo-inputs + (("rust-openssl-probe" ,rust-openssl-probe-0.1) + ("rust-rustls" ,rust-rustls-0.19) + ("rust-schannel" ,rust-schannel-0.1) + ("rust-security-framework" ,rust-security-framework-2)))))) + +(define-public rust-rustls-native-certs-0.4 + (package + (inherit rust-rustls-native-certs-0.5) + (name "rust-rustls-native-certs") + (version "0.4.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "rustls-native-certs" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1f2rkvdkz92qcmwryyqiw9phkqkf95g4962ljpfq5nkjfsd477b2")))) + (arguments + `(#:tests? #f ; Tests want network access + #:cargo-inputs + (("rust-openssl-probe" ,rust-openssl-probe-0.1) + ("rust-rustls" ,rust-rustls-0.18) + ("rust-schannel" ,rust-schannel-0.1) + ("rust-security-framework" + ,rust-security-framework-1)) + #:cargo-development-inputs + (("rust-ring" ,rust-ring-0.16) + ("rust-untrusted" ,rust-untrusted-0.7) + ("rust-webpki" ,rust-webpki-0.21) + ("rust-webpki-roots" ,rust-webpki-roots-0.20)))))) + +(define-public rust-rustls-pemfile-2 + (package + (name "rust-rustls-pemfile") + (version "2.0.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "rustls-pemfile" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1x34xidvzn4br2vl8f8xwmhgbjv4lmlb0ggv5whlnk4yl87rir1m")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs (("rust-base64" ,rust-base64-0.21) + ("rust-rustls-pki-types" ,rust-rustls-pki-types-1)) + #:cargo-development-inputs (("rust-bencher" ,rust-bencher-0.1)))) + (home-page "https://github.com/rustls/pemfile") + (synopsis "Basic parser for PEM formatted keys and certificates") + (description "This package provides a very basic parser for the +PEM-encodings commonly used to store keys and certificates at rest.") + (license (list license:asl2.0 license:isc license:expat)))) + +(define-public rust-rustls-pemfile-1 + (package + (inherit rust-rustls-pemfile-2) + (name "rust-rustls-pemfile") + (version "1.0.3") + (source + (origin + (method url-fetch) + (uri (crate-uri "rustls-pemfile" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1cplx6hgkr32nq31p3613b2sj7csrrq3zp6znx9vc1qx9c4qff9d")))) + (arguments + `(#:cargo-inputs + (("rust-base64" ,rust-base64-0.21)) + #:cargo-development-inputs + (("rust-bencher" ,rust-bencher-0.1)))))) + +(define-public rust-rustls-pemfile-0.2 + (package + (inherit rust-rustls-pemfile-1) + (name "rust-rustls-pemfile") + (version "0.2.1") + (source + (origin + (method url-fetch) + (uri (crate-uri "rustls-pemfile" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1jfi97lqnnnnxhmfy6ygrsp0x70m8wsdpaw45svvz1qc6vmymssy")))) + (arguments + `(#:cargo-inputs + (("rust-base64" ,rust-base64-0.13)) + #:cargo-development-inputs + (("rust-criterion" ,rust-criterion-0.3)))))) + +(define-public rust-rustls-pki-types-1 + (package + (name "rust-rustls-pki-types") + (version "1.0.1") + (source + (origin + (method url-fetch) + (uri (crate-uri "rustls-pki-types" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "16rkx6gn5l2zximxy8fx9h2vzks1hfxi5z5cd9y97r0fl853wrz7")))) + (build-system cargo-build-system) + (home-page "https://github.com/rustls/pki-types") + (synopsis "Shared types for the rustls PKI ecosystem") + (description "Shared types for the rustls PKI ecosystem.") + (license (list license:expat license:asl2.0)))) + +(define-public rust-rustls-webpki-0.101 + (package + (name "rust-rustls-webpki") + (version "0.101.7") + (source (origin + (method url-fetch) + (uri (crate-uri "rustls-webpki" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0rapfhpkqp75552i8r0y7f4vq7csb4k7gjjans0df73sxv8paqlb")))) + (build-system cargo-build-system) + (arguments + `(#:tests? #f ; Not all files included. + #:cargo-inputs + (("rust-ring" ,rust-ring-0.17) + ("rust-untrusted" ,rust-untrusted-0.9)) + #:cargo-development-inputs + (("rust-base64" ,rust-base64-0.21) + ("rust-bencher" ,rust-bencher-0.1) + ("rust-once-cell" ,rust-once-cell-1) + ("rust-rcgen" ,rust-rcgen-0.11) + ("rust-serde" ,rust-serde-1) + ("rust-serde-json" ,rust-serde-json-1)))) + (home-page "https://github.com/rustls/webpki") + (synopsis "Web PKI X.509 Certificate Verification") + (description "Web PKI X.509 Certificate Verification.") + (license license:isc))) + +(define-public rust-rustls-webpki-0.100 + (package + (inherit rust-rustls-webpki-0.101) + (name "rust-rustls-webpki") + (version "0.100.1") + (source (origin + (method url-fetch) + (uri (crate-uri "rustls-webpki" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0sxlgpcczd1wihmnbgv5qz00jim32dap5wzq2rwcm39xxpapq86n")))) + (arguments + `(#:tests? #f ; Not all files included. + #:cargo-inputs + (("rust-ring" ,rust-ring-0.16) + ("rust-untrusted" ,rust-untrusted-0.7)) + #:cargo-development-inputs (("rust-base64" ,rust-base64-0.13)))))) + -- cgit v1.2.3 From 139ce3e8195fca64c5521de6f11b7ae203764d8b Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 27 Dec 2023 13:47:05 +0200 Subject: gnu: rust-async-tls-0.10: Move to (gnu packages crates-tls). * gnu/packages/crates-io.scm (rust-async-tls-0.10): Move from here ... * gnu/packages/crates-tls.scm: ... to here. Change-Id: I171b67bbecf09bf41e32a79adfb40a421ffefdd7 --- gnu/packages/crates-io.scm | 26 -------------------------- gnu/packages/crates-tls.scm | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 26 deletions(-) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index 113fd1da7a..075f44a4ef 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -4864,32 +4864,6 @@ crate.") (("rust-crossbeam" ,rust-crossbeam-0.7) ("rust-futures" ,rust-futures-0.3)))))) -(define-public rust-async-tls-0.10 - (package - (name "rust-async-tls") - (version "0.10.2") - (source - (origin - (method url-fetch) - (uri (crate-uri "async-tls" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 "126by0la2wvfadazfnmw7b6ch07dk9ggny94a3vvzgk2qdpqn3fx")))) - (build-system cargo-build-system) - (arguments - `(#:skip-build? #t - #:cargo-inputs - (("rust-futures-core" ,rust-futures-core-0.3) - ("rust-futures-io" ,rust-futures-io-0.3) - ("rust-rustls" ,rust-rustls-0.19) - ("rust-webpki" ,rust-webpki-0.21) - ("rust-webpki-roots" ,rust-webpki-roots-0.21)))) - (home-page "https://github.com/async-std/async-tls") - (synopsis "Asynchronous TLS/SSL streams using Rustls") - (description - "This package provides asynchronous TLS/SSL streams using Rustls.") - (license (list license:expat license:asl2.0)))) - (define-public rust-async-trait-0.1 (package (name "rust-async-trait") diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index a6dd512547..54643760c0 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -33,6 +33,32 @@ #:use-module (gnu packages crates-web) #:use-module (gnu packages rust-apps)) +(define-public rust-async-tls-0.10 + (package + (name "rust-async-tls") + (version "0.10.2") + (source + (origin + (method url-fetch) + (uri (crate-uri "async-tls" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "126by0la2wvfadazfnmw7b6ch07dk9ggny94a3vvzgk2qdpqn3fx")))) + (build-system cargo-build-system) + (arguments + `(#:skip-build? #t + #:cargo-inputs + (("rust-futures-core" ,rust-futures-core-0.3) + ("rust-futures-io" ,rust-futures-io-0.3) + ("rust-rustls" ,rust-rustls-0.19) + ("rust-webpki" ,rust-webpki-0.21) + ("rust-webpki-roots" ,rust-webpki-roots-0.21)))) + (home-page "https://github.com/async-std/async-tls") + (synopsis "Asynchronous TLS/SSL streams using Rustls") + (description + "This package provides asynchronous TLS/SSL streams using Rustls.") + (license (list license:expat license:asl2.0)))) + (define-public rust-rustls-0.21 (package (name "rust-rustls") -- cgit v1.2.3 From 212b96ff5772e65c25a0fe088943e3fde49e6aae Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 27 Dec 2023 14:08:56 +0200 Subject: gnu: rust-async-native-tls-0.3: Move to (gnu packages crates-tls). * gnu/packages/crates-io.scm (rust-async-native-tls-0.3): Move from here ... * gnu/packages/crates-tls.scm: ... to here. Change-Id: Ib3289faa91bffed89cd965caede96145e0d17411 --- gnu/packages/crates-io.scm | 27 --------------------------- gnu/packages/crates-tls.scm | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 27 deletions(-) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index c36721348c..a9bff9dc64 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -4489,33 +4489,6 @@ primitives: @end itemize") (license (list license:asl2.0 license:expat)))) -(define-public rust-async-native-tls-0.3 - (package - (name "rust-async-native-tls") - (version "0.3.3") - (source - (origin - (method url-fetch) - (uri (crate-uri "async-native-tls" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 "0cwv4vbrvcbv58b51y1azfbszzgzhrzxx92q5nl6hk6kkf97m7ly")))) - (build-system cargo-build-system) - (arguments - `(#:skip-build? #true ;XXX: build when rust-async-std-1 is packaged - #:cargo-inputs - (;;("rust-async-std" ,rust-async-std-1) - ("rust-native-tls" ,rust-native-tls-0.2) - ("rust-thiserror" ,rust-thiserror-1) - ("rust-tokio" ,rust-tokio-0.2) - ("rust-url" ,rust-url-2)) - #:cargo-development-inputs - (("rust-threadpool" ,rust-threadpool-1)))) - (home-page "https://docs.rs/crate/async-native-tls/") - (synopsis "Native TLS using futures") - (description "Native TLS using futures") - (license (list license:expat license:asl2.0)))) - (define-public rust-async-net-1 (package (name "rust-async-net") diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index 54643760c0..bc13eb9357 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -33,6 +33,33 @@ #:use-module (gnu packages crates-web) #:use-module (gnu packages rust-apps)) +(define-public rust-async-native-tls-0.3 + (package + (name "rust-async-native-tls") + (version "0.3.3") + (source + (origin + (method url-fetch) + (uri (crate-uri "async-native-tls" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0cwv4vbrvcbv58b51y1azfbszzgzhrzxx92q5nl6hk6kkf97m7ly")))) + (build-system cargo-build-system) + (arguments + `(#:skip-build? #true ;XXX: build when rust-async-std-1 is packaged + #:cargo-inputs + (;;("rust-async-std" ,rust-async-std-1) + ("rust-native-tls" ,rust-native-tls-0.2) + ("rust-thiserror" ,rust-thiserror-1) + ("rust-tokio" ,rust-tokio-0.2) + ("rust-url" ,rust-url-2)) + #:cargo-development-inputs + (("rust-threadpool" ,rust-threadpool-1)))) + (home-page "https://docs.rs/crate/async-native-tls/") + (synopsis "Native TLS using futures") + (description "Native TLS using futures.") + (license (list license:expat license:asl2.0)))) + (define-public rust-async-tls-0.10 (package (name "rust-async-tls") -- cgit v1.2.3 From 095a65b7e02740f8ba0401f03b15f18fcafcff22 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 27 Dec 2023 14:16:12 +0200 Subject: gnu: rust-tls-parser-0.11: Move to (gnu packages crates-tls). * gnu/packages/crates-io.scm (rust-tls-parser-0.11): Move from here ... * gnu/packages/crates-tls.scm: ... to here. Change-Id: Ib16d93596ad374a51b21f2762d8cf1da7cc21eda --- gnu/packages/crates-io.scm | 38 -------------------------------------- gnu/packages/crates-tls.scm | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 38 deletions(-) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index 92419bfa48..2305b40289 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -40044,44 +40044,6 @@ non-interactive protocols can be implemented as if they were interactive.") (description "This package provides thousand separators for numerals.") (license (list license:expat license:asl2.0)))) -(define-public rust-tls-parser-0.11 - (package - (name "rust-tls-parser") - (version "0.11.0") - (source - (origin - (method url-fetch) - (uri (crate-uri "tls-parser" version)) - (file-name - (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "1q0vd41sjf6pbcygp5bqlpqrxbqdd0qsqi4sm5zbzvb4vvi0d4j0")) - (snippet - #~(begin (use-modules (guix build utils)) - ;; Accept newer versions of rust-clap. - (substitute* "Cargo.toml" - (("~2\\.33") "^2.33")))))) - (build-system cargo-build-system) - (arguments - `(#:tests? #f ;; requires assets not included in crates.io tarball - #:cargo-inputs - (("rust-cookie-factory" ,rust-cookie-factory-0.3) - ("rust-enum-primitive" ,rust-enum-primitive-0.1) - ("rust-nom" ,rust-nom-7) - ("rust-nom-derive" ,rust-nom-derive-0.10) - ("rust-phf" ,rust-phf-0.10) - ("rust-phf-codegen" ,rust-phf-codegen-0.10) - ("rust-rusticata-macros" ,rust-rusticata-macros-4)) - #:cargo-development-inputs - (("rust-clap" ,rust-clap-2) - ("rust-hex-literal" ,rust-hex-literal-0.3) - ("rust-pretty-assertions" ,rust-pretty-assertions-0.7)))) - (home-page "https://github.com/rusticata/tls-parser") - (synopsis "Parser for the TLS protocol") - (description "This package provides a Rust parser for the TLS protocol.") - (license (list license:expat license:asl2.0)))) - (define-public rust-twox-hash-1 (package (name "rust-twox-hash") diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index bc13eb9357..a461f2ae84 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -27,6 +27,7 @@ #:use-module (guix 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 crates-io) @@ -545,3 +546,40 @@ PEM-encodings commonly used to store keys and certificates at rest.") ("rust-untrusted" ,rust-untrusted-0.7)) #:cargo-development-inputs (("rust-base64" ,rust-base64-0.13)))))) +(define-public rust-tls-parser-0.11 + (package + (name "rust-tls-parser") + (version "0.11.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "tls-parser" version)) + (file-name + (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1q0vd41sjf6pbcygp5bqlpqrxbqdd0qsqi4sm5zbzvb4vvi0d4j0")) + (snippet + #~(begin (use-modules (guix build utils)) + ;; Accept newer versions of rust-clap. + (substitute* "Cargo.toml" + (("~2\\.33") "^2.33")))))) + (build-system cargo-build-system) + (arguments + `(#:tests? #f ;; requires assets not included in crates.io tarball + #:cargo-inputs + (("rust-cookie-factory" ,rust-cookie-factory-0.3) + ("rust-enum-primitive" ,rust-enum-primitive-0.1) + ("rust-nom" ,rust-nom-7) + ("rust-nom-derive" ,rust-nom-derive-0.10) + ("rust-phf" ,rust-phf-0.10) + ("rust-phf-codegen" ,rust-phf-codegen-0.10) + ("rust-rusticata-macros" ,rust-rusticata-macros-4)) + #:cargo-development-inputs + (("rust-clap" ,rust-clap-2) + ("rust-hex-literal" ,rust-hex-literal-0.3) + ("rust-pretty-assertions" ,rust-pretty-assertions-0.7)))) + (home-page "https://github.com/rusticata/tls-parser") + (synopsis "Parser for the TLS protocol") + (description "This package provides a Rust parser for the TLS protocol.") + (license (list license:expat license:asl2.0)))) -- cgit v1.2.3 From 99cff4d661a979cd03a417d1df23cd77d798dc60 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 27 Dec 2023 14:19:59 +0200 Subject: gnu: rust-native-tls: Move to (gnu packages crates-tls). * gnu/packages/crates-io.scm (rust-native-tls-0.2, rust-native-tls-0.1): Move from here ... * gnu/packages/crates-tls.scm: ... to here. Change-Id: I4104a0d75b5e4531203afb32432f3786d622b4c3 --- gnu/packages/crates-io.scm | 62 ---------------------------------------- gnu/packages/crates-tls.scm | 69 +++++++++++++++++++++++++++++++++++++++++++-- gnu/packages/sequoia.scm | 1 + gnu/packages/web.scm | 3 +- 4 files changed, 70 insertions(+), 65 deletions(-) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index 2305b40289..cb4c99b410 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -41981,68 +41981,6 @@ linear algebra library.") (description "This package provides a NodeJS N-API raw binding.") (license license:expat))) -(define-public rust-native-tls-0.2 - (package - (name "rust-native-tls") - (version "0.2.11") - (source - (origin - (method url-fetch) - (uri (crate-uri "native-tls" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 "0bmrlg0fmzxaycjpkgkchi93av07v2yf9k33gc12ca9gqdrn28h7")))) - (build-system cargo-build-system) - (arguments - `(#:tests? #f ; tests require network access - #:cargo-inputs - (("rust-lazy-static" ,rust-lazy-static-1) - ("rust-libc" ,rust-libc-0.2) - ("rust-log" ,rust-log-0.4) - ("rust-openssl" ,rust-openssl-0.10) - ("rust-openssl-probe" ,rust-openssl-probe-0.1) - ("rust-openssl-sys" ,rust-openssl-sys-0.9) - ("rust-schannel" ,rust-schannel-0.1) - ("rust-security-framework" ,rust-security-framework-2) - ("rust-security-framework-sys" ,rust-security-framework-sys-2) - ("rust-tempfile" ,rust-tempfile-3)) - #:cargo-development-inputs - (("rust-tempfile" ,rust-tempfile-3) - ("rust-test-cert-gen" ,rust-test-cert-gen-0.7)))) - (native-inputs - (list pkg-config)) - (inputs - (list openssl)) - (home-page "https://github.com/sfackler/rust-native-tls") - (synopsis "Wrapper over a platform's native TLS implementation") - (description - "This package provides a wrapper over a platform's native TLS -implementation.") - (license (list license:expat license:asl2.0)))) - -(define-public rust-native-tls-0.1 - (package - (inherit rust-native-tls-0.2) - (name "rust-native-tls") - (version "0.1.5") - (source - (origin - (method url-fetch) - (uri (crate-uri "native-tls" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 "1h7v80nlskyr7b1gsg4ivlpm6pilj6ybgvcwadj7ips3igfblkgp")))) - (arguments - `(#:skip-build? #t - #:cargo-inputs - (("rust-lazy-static" ,rust-lazy-static-0.2) - ("rust-libc" ,rust-libc-0.2) - ("rust-openssl" ,rust-openssl-0.9) - ("rust-schannel" ,rust-schannel-0.1) - ("rust-security-framework" ,rust-security-framework-0.1) - ("rust-security-framework-sys" ,rust-security-framework-sys-0.1) - ("rust-tempdir" ,rust-tempdir-0.3)))))) - (define-public rust-natord-1 (package (name "rust-natord") diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index a461f2ae84..29ad87c486 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -1,8 +1,9 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2020 Hartmut Goebel ;;; Copyright © 2020 Arun Isaac +;;; Copyright © 2020 Valentin Ignatev ;;; Copyright © 2020, 2023 Efraim Flashner -;;; Copyright © 2021 Nicolas Goaziou +;;; Copyright © 2020, 2021 Nicolas Goaziou ;;; Copyright © 2021 Alexandru-Sergiu Marton ;;; Copyright © 2022 Aleksandr Vityazev ;;; Copyright © 2022 Ricardo Wurmus @@ -32,7 +33,9 @@ #:use-module (gnu packages) #:use-module (gnu packages crates-io) #:use-module (gnu packages crates-web) - #:use-module (gnu packages rust-apps)) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages rust-apps) + #:use-module (gnu packages tls)) (define-public rust-async-native-tls-0.3 (package @@ -87,6 +90,68 @@ "This package provides asynchronous TLS/SSL streams using Rustls.") (license (list license:expat license:asl2.0)))) +(define-public rust-native-tls-0.2 + (package + (name "rust-native-tls") + (version "0.2.11") + (source + (origin + (method url-fetch) + (uri (crate-uri "native-tls" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0bmrlg0fmzxaycjpkgkchi93av07v2yf9k33gc12ca9gqdrn28h7")))) + (build-system cargo-build-system) + (arguments + `(#:tests? #f ; tests require network access + #:cargo-inputs + (("rust-lazy-static" ,rust-lazy-static-1) + ("rust-libc" ,rust-libc-0.2) + ("rust-log" ,rust-log-0.4) + ("rust-openssl" ,rust-openssl-0.10) + ("rust-openssl-probe" ,rust-openssl-probe-0.1) + ("rust-openssl-sys" ,rust-openssl-sys-0.9) + ("rust-schannel" ,rust-schannel-0.1) + ("rust-security-framework" ,rust-security-framework-2) + ("rust-security-framework-sys" ,rust-security-framework-sys-2) + ("rust-tempfile" ,rust-tempfile-3)) + #:cargo-development-inputs + (("rust-tempfile" ,rust-tempfile-3) + ("rust-test-cert-gen" ,rust-test-cert-gen-0.7)))) + (native-inputs + (list pkg-config)) + (inputs + (list openssl)) + (home-page "https://github.com/sfackler/rust-native-tls") + (synopsis "Wrapper over a platform's native TLS implementation") + (description + "This package provides a wrapper over a platform's native TLS +implementation.") + (license (list license:expat license:asl2.0)))) + +(define-public rust-native-tls-0.1 + (package + (inherit rust-native-tls-0.2) + (name "rust-native-tls") + (version "0.1.5") + (source + (origin + (method url-fetch) + (uri (crate-uri "native-tls" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1h7v80nlskyr7b1gsg4ivlpm6pilj6ybgvcwadj7ips3igfblkgp")))) + (arguments + `(#:skip-build? #t + #:cargo-inputs + (("rust-lazy-static" ,rust-lazy-static-0.2) + ("rust-libc" ,rust-libc-0.2) + ("rust-openssl" ,rust-openssl-0.9) + ("rust-schannel" ,rust-schannel-0.1) + ("rust-security-framework" ,rust-security-framework-0.1) + ("rust-security-framework-sys" ,rust-security-framework-sys-0.1) + ("rust-tempdir" ,rust-tempdir-0.3)))))) + (define-public rust-rustls-0.21 (package (name "rust-rustls") diff --git a/gnu/packages/sequoia.scm b/gnu/packages/sequoia.scm index e049638ef7..ea90340897 100644 --- a/gnu/packages/sequoia.scm +++ b/gnu/packages/sequoia.scm @@ -28,6 +28,7 @@ #:use-module (gnu packages) #:use-module (gnu packages base) ; glibc #:use-module (gnu packages crates-io) + #:use-module (gnu packages crates-tls) #:use-module (gnu packages crates-web) #:use-module (gnu packages llvm) #:use-module (gnu packages multiprecision) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 11bceb1da7..91f96759af 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -119,8 +119,9 @@ #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages cpp) - #:use-module (gnu packages crates-gtk) #:use-module (gnu packages crates-io) + #:use-module (gnu packages crates-gtk) + #:use-module (gnu packages crates-tls) #:use-module (gnu packages curl) #:use-module (gnu packages cyrus-sasl) #:use-module (gnu packages databases) -- cgit v1.2.3 From 18526761648f8165777e2ef18d91ee3e3c7c8623 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 27 Dec 2023 15:19:33 +0200 Subject: gnu: rust-schannel-0.1: Move to (gnu packages crates-windows). * gnu/packages/crates-io.scm (rust-schannel-0.1): Move from here ... * gnu/packages/crates-windows.scm: ... to here. Change-Id: If83411c1a155d69fc92953900231e02da3d7443a --- gnu/packages/crates-io.scm | 24 ------------------------ gnu/packages/crates-tls.scm | 1 + gnu/packages/crates-windows.scm | 24 ++++++++++++++++++++++++ 3 files changed, 25 insertions(+), 24 deletions(-) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index 5948238cd3..800e7d4e70 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -61895,30 +61895,6 @@ encodable types.") single-cell matrices.") (license license:bsd-3))) -(define-public rust-schannel-0.1 - (package - (name "rust-schannel") - (version "0.1.21") - (source - (origin - (method url-fetch) - (uri (crate-uri "schannel" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "1cxivcbczzfv4295pqi5s80kr7nhs7xc0i40zf43b7q5qw3gng3i")))) - (build-system cargo-build-system) - (arguments - `(#:skip-build? #t - #:cargo-inputs - (("rust-windows-sys" ,rust-windows-sys-0.42)))) - (home-page "https://github.com/steffengy/schannel-rs") - (synopsis "Rust bindings to the Windows SChannel APIs") - (description - "Rust bindings to the Windows SChannel APIs providing TLS client and -server functionality.") - (license license:expat))) - (define-public rust-scheduled-thread-pool-0.2 (package (name "rust-scheduled-thread-pool") diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index 29ad87c486..30f9084c2c 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -33,6 +33,7 @@ #:use-module (gnu packages) #:use-module (gnu packages crates-io) #:use-module (gnu packages crates-web) + #:use-module (gnu packages crates-windows) #:use-module (gnu packages pkg-config) #:use-module (gnu packages rust-apps) #:use-module (gnu packages tls)) diff --git a/gnu/packages/crates-windows.scm b/gnu/packages/crates-windows.scm index 362953b763..3dc6e7b50e 100644 --- a/gnu/packages/crates-windows.scm +++ b/gnu/packages/crates-windows.scm @@ -545,6 +545,30 @@ for MinGW-w64 and MSVC (cross-)compile targets.") #:cargo-development-inputs (("rust-doc-comment" ,rust-doc-comment-0.3)))))) +(define-public rust-schannel-0.1 + (package + (name "rust-schannel") + (version "0.1.21") + (source + (origin + (method url-fetch) + (uri (crate-uri "schannel" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1cxivcbczzfv4295pqi5s80kr7nhs7xc0i40zf43b7q5qw3gng3i")))) + (build-system cargo-build-system) + (arguments + `(#:skip-build? #t + #:cargo-inputs + (("rust-windows-sys" ,rust-windows-sys-0.42)))) + (home-page "https://github.com/steffengy/schannel-rs") + (synopsis "Rust bindings to the Windows SChannel APIs") + (description + "Rust bindings to the Windows SChannel APIs providing TLS client and +server functionality.") + (license license:expat))) + (define-public rust-windows-0.48 (package (name "rust-windows") -- cgit v1.2.3 From cf0af0603193d9454119792620f63a930b54d190 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 4 Jan 2024 20:35:15 +0200 Subject: gnu: rust-security-framework: Move to (gnu packages crates-apple). * gnu/packages/crates-io.scm (rust-security-framework-2, rust-security-framework-1, rust-security-framework-0.3, rust-security-framework-0.2, rust-security-framework-0.1, rust-security-framework-sys-2, rust-security-framework-sys-1, rust-security-framework-sys-0.3, rust-security-framework-sys-0.2, rust-security-framework-sys-0.1): Move from here ... * gnu/packages/crates-apple.scm: ... to here. Change-Id: Ic3fed59019265d19f8c0efa992566691a6a807f6 --- gnu/packages/crates-apple.scm | 233 ++++++++++++++++++++++++++++++++++++++++++ gnu/packages/crates-io.scm | 233 ------------------------------------------ gnu/packages/crates-tls.scm | 1 + 3 files changed, 234 insertions(+), 233 deletions(-) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-apple.scm b/gnu/packages/crates-apple.scm index f3965a0928..03de10a853 100644 --- a/gnu/packages/crates-apple.scm +++ b/gnu/packages/crates-apple.scm @@ -681,3 +681,236 @@ representation and parsing.") "This package provides a very small library for finding out if a key is currently pressed on macOS.") (license license:expat))) + +(define-public rust-security-framework-2 + (package + (name "rust-security-framework") + (version "2.9.2") + (source + (origin + (method url-fetch) + (uri (crate-uri "security-framework" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1pplxk15s5yxvi2m1sz5xfmjibp96cscdcl432w9jzbk0frlzdh5")))) + (build-system cargo-build-system) + (arguments + `(#:tests? #f ;missing files + #:cargo-inputs + (("rust-bitflags" ,rust-bitflags-1) + ("rust-core-foundation" ,rust-core-foundation-0.9) + ("rust-core-foundation-sys" ,rust-core-foundation-sys-0.8) + ("rust-libc" ,rust-libc-0.2) + ("rust-log" ,rust-log-0.4) + ("rust-num-bigint" ,rust-num-bigint-0.4) + ("rust-security-framework-sys" ,rust-security-framework-sys-2)) + #:cargo-development-inputs + (("rust-env-logger" ,rust-env-logger-0.10) + ("rust-hex" ,rust-hex-0.4) + ("rust-tempdir" ,rust-tempdir-0.3) + ("rust-time" ,rust-time-0.3) + ("rust-x509-parser" ,rust-x509-parser-0.15)))) + (home-page "https://lib.rs/crates/security_framework") + (synopsis "@code{Security.framework} bindings for macOS and iOS") + (description "This package provides @code{Security.framework} bindings for +macOS and iOS.") + (license (list license:expat license:asl2.0)))) + +(define-public rust-security-framework-1 + (package + (inherit rust-security-framework-2) + (name "rust-security-framework") + (version "1.0.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "security-framework" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0axwlax65j1f79rsm4ylc8rc6p2knbi3dgnpbdq7a1bzh5k2hl5d")))) + (arguments + `(#:tests? #f ; Not all files included + #:cargo-inputs + (("rust-bitflags" ,rust-bitflags-1) + ("rust-core-foundation" ,rust-core-foundation-0.7) + ("rust-core-foundation-sys" ,rust-core-foundation-sys-0.7) + ("rust-libc" ,rust-libc-0.2) + ("rust-security-framework-sys" ,rust-security-framework-sys-1)) + #:cargo-development-inputs + (("rust-hex" ,rust-hex-0.4) + ("rust-tempdir" ,rust-tempdir-0.3)))))) + +(define-public rust-security-framework-0.3 + (package + (inherit rust-security-framework-1) + (name "rust-security-framework") + (version "0.3.4") + (source + (origin + (method url-fetch) + (uri (crate-uri "security-framework" version)) + (file-name + (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1pqn79cl9njnnhsmjvvphkzx8is5jhfd8bhxpllgvrgggjfl5wlf")))) + (arguments + `(#:tests? #f ; Some test files not included in release. + #:cargo-inputs + (("rust-core-foundation" ,rust-core-foundation-0.6) + ("rust-core-foundation-sys" ,rust-core-foundation-sys-0.6) + ("rust-libc" ,rust-libc-0.2) + ("rust-security-framework-sys" ,rust-security-framework-sys-0.3)) + #:cargo-development-inputs + (("rust-hex" ,rust-hex-0.4) + ("rust-tempdir" ,rust-tempdir-0.3)))))) + +(define-public rust-security-framework-0.2 + (package + (inherit rust-security-framework-0.3) + (name "rust-security-framework") + (version "0.2.4") + (source + (origin + (method url-fetch) + (uri (crate-uri "security-framework" version)) + (file-name + (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0gw3xxg8yzbjb4ny5cy07gky177c1nbgpxqjsw3hfzpfgrxji9bz")))) + (arguments + `(#:skip-build? #t ; MacOS specific + #:cargo-inputs + (("rust-core-foundation" + ,rust-core-foundation-0.6) + ("rust-core-foundation-sys" + ,rust-core-foundation-sys-0.6) + ("rust-libc" ,rust-libc-0.2) + ("rust-security-framework-sys" + ,rust-security-framework-sys-0.2)) + #:cargo-development-inputs + (("rust-hex" ,rust-hex-0.3) + ("rust-tempdir" ,rust-tempdir-0.3)))))) + +(define-public rust-security-framework-0.1 + (package + (inherit rust-security-framework-0.2) + (name "rust-security-framework") + (version "0.1.16") + (source + (origin + (method url-fetch) + (uri (crate-uri "security-framework" version)) + (file-name + (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0ci39ax08h2ngrl1yf1ra9smivhjs6xarmg7kp6fxracqpllx96z")))) + (arguments + `(#:skip-build? #t ; MacOS specific + #:cargo-inputs + (("rust-core-foundation" ,rust-core-foundation-0.2) + ("rust-core-foundation-sys" ,rust-core-foundation-sys-0.2) + ("rust-libc" ,rust-libc-0.2) + ("rust-security-framework-sys" ,rust-security-framework-sys-0.1)) + #:cargo-development-inputs + (("rust-hex" ,rust-hex-0.2) + ("rust-tempdir" ,rust-tempdir-0.3)))))) + +(define-public rust-security-framework-sys-2 + (package + (name "rust-security-framework-sys") + (version "2.9.1") + (source + (origin + (method url-fetch) + (uri (crate-uri "security-framework-sys" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0yhciwlsy9dh0ps1gw3197kvyqx1bvc4knrhiznhid6kax196cp9")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs + (("rust-core-foundation-sys" ,rust-core-foundation-sys-0.8) + ("rust-libc" ,rust-libc-0.2)))) + (home-page "https://lib.rs/crates/security-framework-sys") + (synopsis "Low-level FFI bindings to Apple @code{Security.framework}") + (description "This package provides low level FFI bindings to Apple +@code{Security.framework}.") + (license (list license:expat license:asl2.0)))) + +(define-public rust-security-framework-sys-1 + (package + (inherit rust-security-framework-sys-2) + (name "rust-security-framework-sys") + (version "1.0.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "security-framework-sys" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1iynsjz53lqkkw4zbq8l99xn799chbx90lsmrlfnsyxii14v1kji")))) + (arguments + `(#:cargo-inputs + (("rust-core-foundation-sys" ,rust-core-foundation-sys-0.7) + ("rust-libc" ,rust-libc-0.2)))))) + +(define-public rust-security-framework-sys-0.3 + (package + (inherit rust-security-framework-sys-1) + (name "rust-security-framework-sys") + (version "0.3.3") + (source + (origin + (method url-fetch) + (uri (crate-uri "security-framework-sys" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "15gqhhi206lzynd0pcbswxhvqc4p9bmpl2h9qnwfnpb16zy96573")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs + (("rust-core-foundation-sys" ,rust-core-foundation-sys-0.6)))))) + +(define-public rust-security-framework-sys-0.2 + (package + (inherit rust-security-framework-sys-0.3) + (name "rust-security-framework-sys") + (version "0.2.4") + (source + (origin + (method url-fetch) + (uri (crate-uri "security-framework-sys" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "07zv0szz2kfy1hn251h0qsq0q9i1zia768d8vzril1g6xarj7mcj")))) + (arguments + `(#:skip-build? #t ; MacOS specific + #:cargo-inputs + (("rust-core-foundation-sys" ,rust-core-foundation-sys-0.6) + ("rust-libc" ,rust-libc-0.2)))))) + +(define-public rust-security-framework-sys-0.1 + (package + (inherit rust-security-framework-sys-0.2) + (name "rust-security-framework-sys") + (version "0.1.16") + (source + (origin + (method url-fetch) + (uri (crate-uri "security-framework-sys" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1bdy87gvmahiiyfzghsdg2dkhznww3p3d3r676qs0y32hcg648al")))) + (arguments + `(#:skip-build? #t ; MacOS specific + #:cargo-inputs + (("rust-core-foundation-sys" ,rust-core-foundation-sys-0.2) + ("rust-libc" ,rust-libc-0.2)))))) diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index 0750b19784..f0cecfc039 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -63124,239 +63124,6 @@ SECG elliptic curve group secp256k1 and related utilities.") @code{libsecp256k1} library.") (license license:cc0))) -(define-public rust-security-framework-2 - (package - (name "rust-security-framework") - (version "2.9.2") - (source - (origin - (method url-fetch) - (uri (crate-uri "security-framework" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 "1pplxk15s5yxvi2m1sz5xfmjibp96cscdcl432w9jzbk0frlzdh5")))) - (build-system cargo-build-system) - (arguments - `(#:tests? #f ;missing files - #:cargo-inputs - (("rust-bitflags" ,rust-bitflags-1) - ("rust-core-foundation" ,rust-core-foundation-0.9) - ("rust-core-foundation-sys" ,rust-core-foundation-sys-0.8) - ("rust-libc" ,rust-libc-0.2) - ("rust-log" ,rust-log-0.4) - ("rust-num-bigint" ,rust-num-bigint-0.4) - ("rust-security-framework-sys" ,rust-security-framework-sys-2)) - #:cargo-development-inputs - (("rust-env-logger" ,rust-env-logger-0.10) - ("rust-hex" ,rust-hex-0.4) - ("rust-tempdir" ,rust-tempdir-0.3) - ("rust-time" ,rust-time-0.3) - ("rust-x509-parser" ,rust-x509-parser-0.15)))) - (home-page "https://lib.rs/crates/security_framework") - (synopsis "@code{Security.framework} bindings for macOS and iOS") - (description "This package provides @code{Security.framework} bindings for -macOS and iOS.") - (license (list license:expat license:asl2.0)))) - -(define-public rust-security-framework-1 - (package - (inherit rust-security-framework-2) - (name "rust-security-framework") - (version "1.0.0") - (source - (origin - (method url-fetch) - (uri (crate-uri "security-framework" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "0axwlax65j1f79rsm4ylc8rc6p2knbi3dgnpbdq7a1bzh5k2hl5d")))) - (arguments - `(#:tests? #f ; Not all files included - #:cargo-inputs - (("rust-bitflags" ,rust-bitflags-1) - ("rust-core-foundation" ,rust-core-foundation-0.7) - ("rust-core-foundation-sys" ,rust-core-foundation-sys-0.7) - ("rust-libc" ,rust-libc-0.2) - ("rust-security-framework-sys" ,rust-security-framework-sys-1)) - #:cargo-development-inputs - (("rust-hex" ,rust-hex-0.4) - ("rust-tempdir" ,rust-tempdir-0.3)))))) - -(define-public rust-security-framework-0.3 - (package - (inherit rust-security-framework-1) - (name "rust-security-framework") - (version "0.3.4") - (source - (origin - (method url-fetch) - (uri (crate-uri "security-framework" version)) - (file-name - (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "1pqn79cl9njnnhsmjvvphkzx8is5jhfd8bhxpllgvrgggjfl5wlf")))) - (arguments - `(#:tests? #f ; Some test files not included in release. - #:cargo-inputs - (("rust-core-foundation" ,rust-core-foundation-0.6) - ("rust-core-foundation-sys" ,rust-core-foundation-sys-0.6) - ("rust-libc" ,rust-libc-0.2) - ("rust-security-framework-sys" ,rust-security-framework-sys-0.3)) - #:cargo-development-inputs - (("rust-hex" ,rust-hex-0.4) - ("rust-tempdir" ,rust-tempdir-0.3)))))) - -(define-public rust-security-framework-0.2 - (package - (inherit rust-security-framework-0.3) - (name "rust-security-framework") - (version "0.2.4") - (source - (origin - (method url-fetch) - (uri (crate-uri "security-framework" version)) - (file-name - (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "0gw3xxg8yzbjb4ny5cy07gky177c1nbgpxqjsw3hfzpfgrxji9bz")))) - (arguments - `(#:skip-build? #t ; MacOS specific - #:cargo-inputs - (("rust-core-foundation" - ,rust-core-foundation-0.6) - ("rust-core-foundation-sys" - ,rust-core-foundation-sys-0.6) - ("rust-libc" ,rust-libc-0.2) - ("rust-security-framework-sys" - ,rust-security-framework-sys-0.2)) - #:cargo-development-inputs - (("rust-hex" ,rust-hex-0.3) - ("rust-tempdir" ,rust-tempdir-0.3)))))) - -(define-public rust-security-framework-0.1 - (package - (inherit rust-security-framework-0.2) - (name "rust-security-framework") - (version "0.1.16") - (source - (origin - (method url-fetch) - (uri (crate-uri "security-framework" version)) - (file-name - (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "0ci39ax08h2ngrl1yf1ra9smivhjs6xarmg7kp6fxracqpllx96z")))) - (arguments - `(#:skip-build? #t ; MacOS specific - #:cargo-inputs - (("rust-core-foundation" ,rust-core-foundation-0.2) - ("rust-core-foundation-sys" ,rust-core-foundation-sys-0.2) - ("rust-libc" ,rust-libc-0.2) - ("rust-security-framework-sys" ,rust-security-framework-sys-0.1)) - #:cargo-development-inputs - (("rust-hex" ,rust-hex-0.2) - ("rust-tempdir" ,rust-tempdir-0.3)))))) - -(define-public rust-security-framework-sys-2 - (package - (name "rust-security-framework-sys") - (version "2.9.1") - (source - (origin - (method url-fetch) - (uri (crate-uri "security-framework-sys" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 "0yhciwlsy9dh0ps1gw3197kvyqx1bvc4knrhiznhid6kax196cp9")))) - (build-system cargo-build-system) - (arguments - `(#:cargo-inputs - (("rust-core-foundation-sys" ,rust-core-foundation-sys-0.8) - ("rust-libc" ,rust-libc-0.2)))) - (home-page "https://lib.rs/crates/security-framework-sys") - (synopsis "Low-level FFI bindings to Apple @code{Security.framework}") - (description "This package provides low level FFI bindings to Apple -@code{Security.framework}.") - (license (list license:expat license:asl2.0)))) - -(define-public rust-security-framework-sys-1 - (package - (inherit rust-security-framework-sys-2) - (name "rust-security-framework-sys") - (version "1.0.0") - (source - (origin - (method url-fetch) - (uri (crate-uri "security-framework-sys" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "1iynsjz53lqkkw4zbq8l99xn799chbx90lsmrlfnsyxii14v1kji")))) - (arguments - `(#:cargo-inputs - (("rust-core-foundation-sys" ,rust-core-foundation-sys-0.7) - ("rust-libc" ,rust-libc-0.2)))))) - -(define-public rust-security-framework-sys-0.3 - (package - (inherit rust-security-framework-sys-1) - (name "rust-security-framework-sys") - (version "0.3.3") - (source - (origin - (method url-fetch) - (uri (crate-uri "security-framework-sys" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "15gqhhi206lzynd0pcbswxhvqc4p9bmpl2h9qnwfnpb16zy96573")))) - (build-system cargo-build-system) - (arguments - `(#:cargo-inputs - (("rust-core-foundation-sys" ,rust-core-foundation-sys-0.6)))))) - -(define-public rust-security-framework-sys-0.2 - (package - (inherit rust-security-framework-sys-0.3) - (name "rust-security-framework-sys") - (version "0.2.4") - (source - (origin - (method url-fetch) - (uri (crate-uri "security-framework-sys" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "07zv0szz2kfy1hn251h0qsq0q9i1zia768d8vzril1g6xarj7mcj")))) - (arguments - `(#:skip-build? #t ; MacOS specific - #:cargo-inputs - (("rust-core-foundation-sys" ,rust-core-foundation-sys-0.6) - ("rust-libc" ,rust-libc-0.2)))))) - -(define-public rust-security-framework-sys-0.1 - (package - (inherit rust-security-framework-sys-0.2) - (name "rust-security-framework-sys") - (version "0.1.16") - (source - (origin - (method url-fetch) - (uri (crate-uri "security-framework-sys" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "1bdy87gvmahiiyfzghsdg2dkhznww3p3d3r676qs0y32hcg648al")))) - (arguments - `(#:skip-build? #t ; MacOS specific - #:cargo-inputs - (("rust-core-foundation-sys" ,rust-core-foundation-sys-0.2) - ("rust-libc" ,rust-libc-0.2)))))) - (define-public rust-selectors-0.24 (package (name "rust-selectors") diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index 30f9084c2c..f227f67723 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -31,6 +31,7 @@ #:use-module (guix gexp) #:use-module (guix utils) #:use-module (gnu packages) + #:use-module (gnu packages crates-apple) #:use-module (gnu packages crates-io) #:use-module (gnu packages crates-web) #:use-module (gnu packages crates-windows) -- cgit v1.2.3 From 3f7772c447b57300ad253b877a4cbbe5b4a9f237 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 4 Jan 2024 22:30:08 +0200 Subject: gnu: Remove rust-native-tls-0.1. * gnu/packages/crates-tls.scm (rust-native-tls-0.1): Delete variable. Change-Id: Idba61e8a83704488c13bb4ec827b2f1b48305390 --- gnu/packages/crates-tls.scm | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index f227f67723..8b246336a1 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -131,29 +131,6 @@ implementation.") (license (list license:expat license:asl2.0)))) -(define-public rust-native-tls-0.1 - (package - (inherit rust-native-tls-0.2) - (name "rust-native-tls") - (version "0.1.5") - (source - (origin - (method url-fetch) - (uri (crate-uri "native-tls" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 "1h7v80nlskyr7b1gsg4ivlpm6pilj6ybgvcwadj7ips3igfblkgp")))) - (arguments - `(#:skip-build? #t - #:cargo-inputs - (("rust-lazy-static" ,rust-lazy-static-0.2) - ("rust-libc" ,rust-libc-0.2) - ("rust-openssl" ,rust-openssl-0.9) - ("rust-schannel" ,rust-schannel-0.1) - ("rust-security-framework" ,rust-security-framework-0.1) - ("rust-security-framework-sys" ,rust-security-framework-sys-0.1) - ("rust-tempdir" ,rust-tempdir-0.3)))))) - (define-public rust-rustls-0.21 (package (name "rust-rustls") -- cgit v1.2.3 From bc06321eed4b5ed023a99416914da866cfab0341 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 21 Jan 2024 15:35:27 +0200 Subject: gnu: rust-ring: Move to (gnu packages crates-crypto). * gnu/packages/crates-io.scm (rust-ring-0.17, rust-ring-0.16, rust-ring-0.14, rust-ring-0.13): Move from here ... * gnu/packages/crates-crypto.scm: ... to here. Change-Id: I5137593364889a410962e40034a8c95aa627c664 --- gnu/packages/crates-crypto.scm | 827 +++++++++++++++++++++++++++++++++++++++++ gnu/packages/crates-io.scm | 822 ---------------------------------------- gnu/packages/crates-tls.scm | 1 + 3 files changed, 828 insertions(+), 822 deletions(-) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-crypto.scm b/gnu/packages/crates-crypto.scm index fd3096b2dc..dff09af97d 100644 --- a/gnu/packages/crates-crypto.scm +++ b/gnu/packages/crates-crypto.scm @@ -35,19 +35,26 @@ (define-module (gnu packages crates-crypto) #:use-module (guix build-system cargo) #: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 assembly) + #:use-module (gnu packages base) + #:use-module (gnu packages compression) #:use-module (gnu packages crates-apple) #:use-module (gnu packages crates-io) #:use-module (gnu packages crates-windows) #:use-module (gnu packages crypto) + #:use-module (gnu packages golang) #:use-module (gnu packages llvm) #:use-module (gnu packages multiprecision) #:use-module (gnu packages nettle) + #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages python) #:use-module (gnu packages tls)) ;;; @@ -2049,3 +2056,823 @@ Digital Signature Algorithm} (ECDSA).") ("rust-hmac" ,rust-hmac-0.12) ("rust-zeroize" ,rust-zeroize-1)) #:cargo-development-inputs (("rust-sha2" ,rust-sha2-0.10)))))) + +(define computed-origin-method (@@ (guix packages) computed-origin-method)) +(define rust-ring-0.17-sources + (let* ((version "0.17.7") + (upstream-source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/briansmith/ring") + (commit "2be687bebdf76648ce85109d40c015412e14b0da"))) + (file-name (git-file-name "rust-ring" version)) + (sha256 + (base32 "1i3b7sha8yj990v2s5yk2a5dx3v4x9b8ckzm6bgiyi6wk4vnid69")) + (patches (search-patches "rust-ring-0.17-ring-core.patch"))))) + (origin + (method computed-origin-method) + (file-name (string-append "rust-ring-" version ".tar.gz")) + (sha256 #f) + (uri + (delay + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (set-path-environment-variable + "PATH" '("bin") + (list #+(canonical-package gzip) + #+(canonical-package tar) + #+perl + #+nasm + #+go + #+clang ; clang-format + #+python-minimal)) + (setenv "HOME" (getcwd)) + (copy-recursively #+upstream-source + (string-append "ring-" #$version)) + (with-directory-excursion (string-append "ring-" #$version) + (begin + ;; It turns out Guix's nasm works just fine here. + (substitute* "build.rs" + (("./target/tools/windows/nasm/nasm") "nasm")) + ;; Files which would be deleted in a snippet: + (delete-file "crypto/curve25519/curve25519_tables.h") + (delete-file "crypto/fipsmodule/ec/p256-nistz-table.h") + (delete-file "crypto/fipsmodule/ec/p256_table.h") + ;; This file causes problems during the 'package phase and + ;; is not distributed with the packaged crate. + (substitute* "Cargo.toml" + (("\"bench\",") "")) + (delete-file "bench/Cargo.toml") + ;; Files to be generated in the sources: + (format #t "Generating the missing files ...~%") + (force-output) + (with-directory-excursion "crypto/curve25519" + (with-output-to-file "curve25519_tables.h" + (lambda _ (invoke "python3" "make_curve25519_tables.py"))) + ;; As seen in git between 0.17.0 and 0.17.1. + (substitute* "curve25519_tables.h" + (("static const uint8_t k25519Precomp") + "const uint8_t k25519Precomp"))) + (with-directory-excursion "crypto/fipsmodule/ec" + (invoke "go" "run" "make_tables.go") + (invoke "go" "run" "make_ec_scalar_base_mult_tests.go")) + (format #t "Generating the pregenerated files ...~%") + (force-output) + (mkdir-p "pregenerated/tmp/ring_core_generated") + + ;; We generate all the files which upstream would normally be + ;; generate by using 'RING_PREGENERATE_ASM=1 cargo build + ;; --target-dir=target/pregenerate_asm' in order to not include + ;; a dependency on cargo when generating the sources. + (define (prefix script) + (string-append + "pregenerated/" + (string-drop-right + (string-drop script + (string-index-right script #\/)) 3))) + + (for-each + (lambda (script) + (invoke "perl" script "ios64" + (string-append (prefix script) "-ios64.S")) + (invoke "perl" script "linux64" + (string-append (prefix script) "-linux64.S")) + (invoke "perl" script "win64" + (string-append (prefix script) "-win64.S"))) + '("crypto/fipsmodule/aes/asm/aesv8-armx.pl" + "crypto/fipsmodule/modes/asm/ghashv8-armx.pl" + "crypto/chacha/asm/chacha-armv8.pl" + "crypto/cipher_extra/asm/chacha20_poly1305_armv8.pl" + "crypto/fipsmodule/aes/asm/vpaes-armv8.pl" + "crypto/fipsmodule/bn/asm/armv8-mont.pl" + "crypto/fipsmodule/ec/asm/p256-armv8-asm.pl" + "crypto/fipsmodule/modes/asm/ghash-neon-armv8.pl" + "crypto/fipsmodule/sha/asm/sha512-armv8.pl")) + + (for-each + (lambda (arch) + (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-armv8.pl" + arch (string-append + "pregenerated/sha256-armv8-" arch ".S"))) + '("ios64" "linux64" "win64")) + + (for-each + (lambda (script) + (invoke "perl" script "linux32" + (string-append (prefix script) "-linux32.S"))) + '("crypto/fipsmodule/aes/asm/aesv8-armx.pl" + "crypto/fipsmodule/modes/asm/ghashv8-armx.pl" + "crypto/fipsmodule/aes/asm/bsaes-armv7.pl" + "crypto/fipsmodule/aes/asm/vpaes-armv7.pl" + "crypto/fipsmodule/bn/asm/armv4-mont.pl" + "crypto/chacha/asm/chacha-armv4.pl" + "crypto/fipsmodule/modes/asm/ghash-armv4.pl" + "crypto/fipsmodule/sha/asm/sha256-armv4.pl" + "crypto/fipsmodule/sha/asm/sha512-armv4.pl")) + + (for-each + (lambda (script) + (invoke "perl" script "elf" + "-fPIC" "-DOPENSSL_IA32_SSE2" + (string-append (prefix script) "-elf.S")) + (invoke "perl" script "win32n" + "-fPIC" "-DOPENSSL_IA32_SSE2" + (string-append + "pregenerated/tmp/" + (string-drop (prefix script) 13) "-win32n.asm"))) + '("crypto/fipsmodule/aes/asm/aesni-x86.pl" + "crypto/fipsmodule/aes/asm/vpaes-x86.pl" + "crypto/fipsmodule/bn/asm/x86-mont.pl" + "crypto/chacha/asm/chacha-x86.pl" + "crypto/fipsmodule/modes/asm/ghash-x86.pl")) + + (for-each + (lambda (script) + (invoke "perl" script "elf" + (string-append (prefix script) "-elf.S")) + (invoke "perl" script "macosx" + (string-append (prefix script) "-macosx.S")) + (invoke "perl" script "nasm" + (string-append + "pregenerated/tmp/" + (string-drop (prefix script) 13) "-nasm.asm"))) + '("crypto/chacha/asm/chacha-x86_64.pl" + "crypto/fipsmodule/aes/asm/aesni-x86_64.pl" + "crypto/fipsmodule/aes/asm/vpaes-x86_64.pl" + "crypto/fipsmodule/bn/asm/x86_64-mont.pl" + "crypto/fipsmodule/bn/asm/x86_64-mont5.pl" + "crypto/fipsmodule/ec/asm/p256-x86_64-asm.pl" + "crypto/fipsmodule/modes/asm/aesni-gcm-x86_64.pl" + "crypto/fipsmodule/modes/asm/ghash-x86_64.pl" + "crypto/fipsmodule/sha/asm/sha512-x86_64.pl" + "crypto/cipher_extra/asm/chacha20_poly1305_x86_64.pl")) + + (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-x86_64.pl" + "elf" "pregenerated/sha256-x86_64-elf.S") + + (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-x86_64.pl" + "macosx" "pregenerated/sha256-x86_64-macosx.S") + + (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-x86_64.pl" + "nasm" "pregenerated/tmp/sha256-x86_64-nasm.asm") + + ;; TODO: Extract ring_core_generated/prefix_symbols_nasm.inc + ;; and ring_core_generated/prefix_symbols_asm.h from build.rs. + + (for-each + (lambda (script) + (invoke "nasm" "-o" (string-append (prefix script) "o") + "-f" "win32" "-i" "include/" "-i" "pregenerated/tmp/" + "-Xgnu" "-gcv8" script)) + (find-files "pregenerated/tmp" "win32n\\.asm")) + + (for-each + (lambda (script) + (invoke "nasm" "-o" (string-append (prefix script) "o") + "-f" "win64" "-i" "include/" "-i" "pregenerated/tmp/" + "-Xgnu" "-gcv8" script)) + (find-files "pregenerated/tmp" "nasm\\.asm")) + + (format #t "Creating the tarball ...~%") + (force-output) + ;; The other option is to use cargo package --allow-dirty + (with-directory-excursion "../" + (invoke "tar" "czf" #$output + ;; avoid non-determinism in the archive + "--sort=name" "--mtime=@0" + "--owner=root:0" "--group=root:0" + (string-append "ring-" #$version)))))))))))) + +(define-public rust-ring-0.17 + (package + (name "rust-ring") + (version "0.17.7") + (source rust-ring-0.17-sources) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs (("rust-cc" ,rust-cc-1) + ("rust-getrandom" ,rust-getrandom-0.2) + ("rust-libc" ,rust-libc-0.2) + ("rust-spin" ,rust-spin-0.9) + ("rust-untrusted" ,rust-untrusted-0.9) + ("rust-windows-sys" ,rust-windows-sys-0.48)) + #:cargo-development-inputs + (("rust-libc" ,rust-libc-0.2) + ("rust-wasm-bindgen-test" ,rust-wasm-bindgen-test-0.3)))) + (home-page "https://github.com/briansmith/ring") + (synopsis "Safe, fast, small crypto using Rust") + (description "This package provided safe, fast, small crypto using Rust.") + (license (list license:isc license:openssl)))) + +(define rust-ring-0.16-sources + (let* ((version "0.16.20") + (upstream-source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/briansmith/ring") + (commit "9cc0d45f4d8521f467bb3a621e74b1535e118188"))) + (file-name (git-file-name "rust-ring" version)) + (sha256 + (base32 "1aps05i5308ka03968glnnqr4kdkk2x4ghlg5vrqhl78jm6ivvby"))))) + (origin + (method computed-origin-method) + (file-name (string-append "rust-ring-" version ".tar.gz")) + (sha256 #f) + (uri + (delay + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (set-path-environment-variable + "PATH" '("bin") + (list #+(canonical-package gzip) + #+(canonical-package tar) + #+perl + #+nasm + #+go + #+clang ; clang-format + #+python2-minimal)) + (setenv "HOME" (getcwd)) + (copy-recursively #+upstream-source + (string-append "ring-" #$version)) + (with-directory-excursion (string-append "ring-" #$version) + (begin + ;; It turns out Guix's nasm works just fine here. + (substitute* "build.rs" + (("./target/tools/nasm") "nasm")) + ;; Files which would be deleted in a snippet: + (delete-file "crypto/curve25519/curve25519_tables.h") + (delete-file "crypto/fipsmodule/ec/ecp_nistz256_table.inl") + ;; Files to be generated in the sources: + (format #t "Generating the missing files ...~%") + (force-output) + (with-directory-excursion "crypto/curve25519" + (with-output-to-file "curve25519_tables.h" + (lambda _ (invoke "python" "make_curve25519_tables.py")))) + (with-directory-excursion "crypto/fipsmodule/ec" + (with-output-to-file "ecp_nistz256_table.inl" + (lambda _ (invoke "go" "run" "make_p256-x86_64-table.go")))) + (format #t "Generating the pregenerated files ...~%") + (force-output) + (mkdir-p "pregenerated/tmp") + + ;; We generate all the files which upstream would normally be + ;; generate by using '(cd pregenerate_asm && cargo clean && + ;; cargo build) ./pregenerate_asm/target/debug/pregenerate_asm' + ;; in order to not include a dependency on cargo when + ;; generating the sources. + (define (prefix script) + (string-append + "pregenerated/" + (string-drop-right + (string-drop script + (string-index-right script #\/)) 3))) + + (for-each + (lambda (script) + (invoke "perl" script "elf" + (string-append (prefix script) "-elf.S")) + (invoke "perl" script "macosx" + (string-append (prefix script) "-macosx.S")) + (invoke "perl" script "nasm" + (string-append + "pregenerated/tmp/" + (string-drop (prefix script) 13) "-nasm.asm"))) + '("crypto/fipsmodule/aes/asm/aesni-x86_64.pl" + "crypto/fipsmodule/aes/asm/vpaes-x86_64.pl" + "crypto/fipsmodule/bn/asm/x86_64-mont.pl" + "crypto/fipsmodule/bn/asm/x86_64-mont5.pl" + "crypto/chacha/asm/chacha-x86_64.pl" + "crypto/fipsmodule/ec/asm/p256-x86_64-asm.pl" + "crypto/fipsmodule/modes/asm/aesni-gcm-x86_64.pl" + "crypto/fipsmodule/modes/asm/ghash-x86_64.pl" + "crypto/fipsmodule/sha/asm/sha512-x86_64.pl" + "crypto/cipher_extra/asm/chacha20_poly1305_x86_64.pl")) + + (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-x86_64.pl" + "elf" "pregenerated/sha256-x86_64-elf.S") + + (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-x86_64.pl" + "macosx" "pregenerated/sha256-x86_64-macosx.S") + + (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-x86_64.pl" + "nasm" "pregenerated/tmp/sha256-x86_64-nasm.asm") + + (for-each + (lambda (script) + (invoke "nasm" "-o" (string-append (prefix script) "obj") + "-f" "win64" "-Xgnu" "-gcv8" script)) + (find-files "pregenerated/tmp" "\\.asm")) + + (for-each + (lambda (script) + (invoke "perl" script "ios64" + (string-append (prefix script) "-ios64.S")) + (invoke "perl" script "linux64" + (string-append (prefix script) "-linux64.S"))) + '("crypto/fipsmodule/aes/asm/aesv8-armx.pl" + "crypto/fipsmodule/modes/asm/ghashv8-armx.pl" + "crypto/fipsmodule/aes/asm/vpaes-armv8.pl" + "crypto/fipsmodule/bn/asm/armv8-mont.pl" + "crypto/chacha/asm/chacha-armv8.pl" + "crypto/fipsmodule/ec/asm/ecp_nistz256-armv8.pl" + "crypto/fipsmodule/modes/asm/ghash-neon-armv8.pl" + "crypto/fipsmodule/sha/asm/sha512-armv8.pl")) + + (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-armv8.pl" + "ios64" "pregenerated/sha256-armv8-ios64.S") + + (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-armv8.pl" + "linux64" "pregenerated/sha256-armv8-linux64.S") + + (for-each + (lambda (script) + (invoke "perl" script "elf" + "-fPIC" "-DOPENSSL_IA32_SSE2" + (string-append (prefix script) "-elf.S")) + (invoke "perl" script "macosx" + "-fPIC" "-DOPENSSL_IA32_SSE2" + (string-append (prefix script) "-macosx.S")) + (invoke "perl" script "win32n" + "-fPIC" "-DOPENSSL_IA32_SSE2" + (string-append + "pregenerated/tmp/" + (string-drop (prefix script) 13) "-win32n.asm"))) + '("crypto/fipsmodule/aes/asm/aesni-x86.pl" + "crypto/fipsmodule/aes/asm/vpaes-x86.pl" + "crypto/fipsmodule/bn/asm/x86-mont.pl" + "crypto/chacha/asm/chacha-x86.pl" + "crypto/fipsmodule/ec/asm/ecp_nistz256-x86.pl" + "crypto/fipsmodule/modes/asm/ghash-x86.pl")) + + (for-each + (lambda (script) + (invoke "nasm" "-o" (string-append (prefix script) "obj") + "-f" "win32" "-Xgnu" "-gcv8" script)) + (find-files "pregenerated/tmp" "-win32n\\.asm")) + + (for-each + (lambda (script) + (invoke "perl" script "ios32" + (string-append (prefix script) "-ios32.S")) + (invoke "perl" script "linux32" + (string-append (prefix script) "-linux32.S"))) + '("crypto/fipsmodule/aes/asm/aesv8-armx.pl" + "crypto/fipsmodule/modes/asm/ghashv8-armx.pl" + "crypto/fipsmodule/aes/asm/bsaes-armv7.pl" + "crypto/fipsmodule/aes/asm/vpaes-armv7.pl" + "crypto/fipsmodule/bn/asm/armv4-mont.pl" + "crypto/chacha/asm/chacha-armv4.pl" + "crypto/fipsmodule/ec/asm/ecp_nistz256-armv4.pl" + "crypto/fipsmodule/modes/asm/ghash-armv4.pl" + "crypto/fipsmodule/sha/asm/sha256-armv4.pl" + "crypto/fipsmodule/sha/asm/sha512-armv4.pl")) + + (format #t "Creating the tarball ...~%") + (force-output) + ;; The other option is to use cargo package --allow-dirty + (with-directory-excursion "../" + (invoke "tar" "czf" #$output + ;; avoid non-determinism in the archive + "--sort=name" "--mtime=@0" + "--owner=root:0" "--group=root:0" + (string-append "ring-" #$version)))))))))))) + +(define-public rust-ring-0.16 + (package + (inherit rust-ring-0.17) + (name "rust-ring") + (version "0.16.20") + (source rust-ring-0.16-sources) + (arguments + `(#:cargo-inputs + (("rust-libc" ,rust-libc-0.2) + ("rust-once-cell" ,rust-once-cell-1) + ("rust-spin" ,rust-spin-0.5) + ("rust-untrusted" ,rust-untrusted-0.7) + ("rust-web-sys" ,rust-web-sys-0.3) + ("rust-winapi" ,rust-winapi-0.3) + ;; build dependencies + ("rust-cc" ,rust-cc-1)) + #:cargo-development-inputs + (("rust-libc" ,rust-libc-0.2) + ("rust-wasm-bindgen-test" ,rust-wasm-bindgen-test-0.3)))) + ;; For a mostly complete list of supported systems see: + ;; https://github.com/briansmith/ring/blob/main/.github/workflows/ci.yml#L170 + (supported-systems (list "aarch64-linux" "armhf-linux" + "i686-linux" "x86_64-linux")))) + +(define rust-ring-0.14-sources + (let* ((version "0.14.6") + (upstream-source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/briansmith/ring") + (commit "ef85df478152aa3fe06c811309379efa08f8a529"))) + (file-name (git-file-name "rust-ring" version)) + (sha256 + (base32 "12dgw2spvmkdypgzymw3bxpv4bbpnlq8s10sdggral31x597n6xx"))))) + (origin + (method computed-origin-method) + (file-name (string-append "rust-ring-" version ".tar.gz")) + (sha256 #f) + (uri + (delay + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (set-path-environment-variable + "PATH" '("bin") + (list #+(canonical-package gzip) + #+(canonical-package tar) + #+perl + #+yasm + #+go + #+clang ; clang-format + #+python2-minimal)) + (setenv "HOME" (getcwd)) + (copy-recursively #+upstream-source + (string-append "ring-" #$version)) + (with-directory-excursion (string-append "ring-" #$version) + (begin + ;; It turns out Guix's yasm works just fine here. + (substitute* "build.rs" + (("yasm.exe") "yasm")) + ;; Files which would be deleted in a snippet: + (delete-file "third_party/fiat/curve25519_tables.h") + (delete-file "crypto/fipsmodule/ec/ecp_nistz256_table.inl") + (delete-file "util/ar/testdata/linux/libsample.a") + (delete-file "util/ar/testdata/mac/libsample.a") + (delete-file "util/ar/testdata/windows/sample.lib") + ;; Fix the doc tests. + (substitute* "src/ec/curve25519/ed25519/verification.rs" + ((";;") ";")) + ;; Files to be generated in the sources: + (format #t "Generating the missing files ...~%") + (force-output) + (with-directory-excursion "third_party/fiat" + (with-output-to-file "curve25519_tables.h" + (lambda _ (invoke "python" "make_curve25519_tables.py")))) + (with-directory-excursion "crypto/fipsmodule/ec" + ;; This one seems to have been changed elsewhere in the + ;; sources but not in the script generating the definition. + (substitute* "make_p256-x86_64-table.go" + (("ecp_nistz256_precomputed") "GFp_nistz256_precomputed")) + (with-output-to-file "ecp_nistz256_table.inl" + (lambda _ (invoke "go" "run" "make_p256-x86_64-table.go")))) + (format #t "Generating the pregenerated files ...~%") + (force-output) + (mkdir-p "pregenerated/tmp") + + ;; We generate all the files which upstream would normally be + ;; generate by using '(cd pregenerate_asm && cargo clean && + ;; cargo build) ./pregenerate_asm/target/debug/pregenerate_asm' + ;; in order to not include a dependency on cargo when + ;; generating the sources. + (define (prefix script) + (string-append + "pregenerated/" + (string-drop-right + (string-drop script + (string-index-right script #\/)) 3))) + + (for-each + (lambda (script) + (invoke "perl" script "elf" + (string-append (prefix script) "-elf.S")) + (invoke "perl" script "macosx" + (string-append (prefix script) "-macosx.S")) + (invoke "perl" script "nasm" + (string-append + "pregenerated/tmp/" + (string-drop (prefix script) 13) "-nasm.asm"))) + '("crypto/fipsmodule/aes/asm/aes-x86_64.pl" + "crypto/fipsmodule/aes/asm/aesni-x86_64.pl" + "crypto/fipsmodule/aes/asm/vpaes-x86_64.pl" + "crypto/fipsmodule/bn/asm/x86_64-mont.pl" + "crypto/fipsmodule/bn/asm/x86_64-mont5.pl" + "crypto/chacha/asm/chacha-x86_64.pl" + "crypto/fipsmodule/ec/asm/p256-x86_64-asm.pl" + "crypto/fipsmodule/modes/asm/aesni-gcm-x86_64.pl" + "crypto/fipsmodule/modes/asm/ghash-x86_64.pl" + "crypto/poly1305/asm/poly1305-x86_64.pl" + "crypto/fipsmodule/sha/asm/sha512-x86_64.pl")) + + (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-x86_64.pl" + "elf" "pregenerated/sha256-x86_64-elf.S") + + (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-x86_64.pl" + "macosx" "pregenerated/sha256-x86_64-macosx.S") + + (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-x86_64.pl" + "nasm" "pregenerated/tmp/sha256-x86_64-nasm.asm") + + (for-each + (lambda (script) + (invoke "yasm" "-X" "vc" "--dformat=cv8" + "--oformat=win64" "--machine=amd64" "-o" + (string-append (prefix script) "obj") script)) + (find-files "pregenerated/tmp" "\\.asm")) + + (for-each + (lambda (script) + (invoke "perl" script "ios64" + (string-append (prefix script) "-ios64.S")) + (invoke "perl" script "linux64" + (string-append (prefix script) "-linux64.S"))) + '("crypto/fipsmodule/aes/asm/aesv8-armx.pl" + "crypto/fipsmodule/modes/asm/ghashv8-armx.pl" + "crypto/fipsmodule/bn/asm/armv8-mont.pl" + "crypto/chacha/asm/chacha-armv8.pl" + "crypto/fipsmodule/ec/asm/ecp_nistz256-armv8.pl" + "crypto/poly1305/asm/poly1305-armv8.pl" + "crypto/fipsmodule/sha/asm/sha512-armv8.pl")) + + (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-armv8.pl" + "ios64" "pregenerated/sha256-armv8-ios64.S") + + (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-armv8.pl" + "linux64" "pregenerated/sha256-armv8-linux64.S") + + (for-each + (lambda (script) + (invoke "perl" script "elf" + "-fPIC" "-DOPENSSL_IA32_SSE2" + (string-append (prefix script) "-elf.S")) + (invoke "perl" script "macosx" + "-fPIC" "-DOPENSSL_IA32_SSE2" + (string-append (prefix script) "-macosx.S")) + (invoke "perl" script "win32n" + "-fPIC" "-DOPENSSL_IA32_SSE2" + (string-append + "pregenerated/tmp/" + (string-drop (prefix script) 13) "-win32n.asm"))) + '("crypto/fipsmodule/aes/asm/aes-586.pl" + "crypto/fipsmodule/aes/asm/aesni-x86.pl" + "crypto/fipsmodule/aes/asm/vpaes-x86.pl" + "crypto/fipsmodule/bn/asm/x86-mont.pl" + "crypto/chacha/asm/chacha-x86.pl" + "crypto/fipsmodule/ec/asm/ecp_nistz256-x86.pl" + "crypto/fipsmodule/modes/asm/ghash-x86.pl" + "crypto/poly1305/asm/poly1305-x86.pl" + "crypto/fipsmodule/sha/asm/sha256-586.pl" + "crypto/fipsmodule/sha/asm/sha512-586.pl")) + + (for-each + (lambda (script) + (invoke "yasm" "-X" "vc" "--dformat=cv8" + "--oformat=win32" "--machine=x86" "-o" + (string-append (prefix script) "obj") script)) + (find-files "pregenerated/tmp" "-win32n\\.asm")) + + (for-each + (lambda (script) + (invoke "perl" script "ios32" + (string-append (prefix script) "-ios32.S")) + (invoke "perl" script "linux32" + (string-append (prefix script) "-linux32.S"))) + '("crypto/fipsmodule/aes/asm/aesv8-armx.pl" + "crypto/fipsmodule/modes/asm/ghashv8-armx.pl" + "crypto/fipsmodule/aes/asm/aes-armv4.pl" + "crypto/fipsmodule/aes/asm/bsaes-armv7.pl" + "crypto/fipsmodule/bn/asm/armv4-mont.pl" + "crypto/chacha/asm/chacha-armv4.pl" + "crypto/fipsmodule/ec/asm/ecp_nistz256-armv4.pl" + "crypto/fipsmodule/modes/asm/ghash-armv4.pl" + "crypto/poly1305/asm/poly1305-armv4.pl" + "crypto/fipsmodule/sha/asm/sha256-armv4.pl" + "crypto/fipsmodule/sha/asm/sha512-armv4.pl")) + + (format #t "Creating the tarball ...~%") + (force-output) + ;; The other option is to use cargo package --allow-dirty + (with-directory-excursion "../" + (invoke "tar" "czf" #$output + ;; avoid non-determinism in the archive + "--sort=name" "--mtime=@0" + "--owner=root:0" "--group=root:0" + (string-append "ring-" #$version)))))))))))) +(define-public rust-ring-0.14 + (package + (inherit rust-ring-0.16) + (name "rust-ring") + (version "0.14.6") + (source rust-ring-0.14-sources) + (arguments + `(#:cargo-inputs + (("rust-cc" ,rust-cc-1) + ("rust-lazy-static" ,rust-lazy-static-1) + ("rust-libc" ,rust-libc-0.2) + ("rust-spin" ,rust-spin-0.5) + ("rust-untrusted" ,rust-untrusted-0.6) + ("rust-winapi" ,rust-winapi-0.3)))))) + +(define rust-ring-0.13-sources + (let* ((version "0.13.5") + (upstream-source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/briansmith/ring") + (commit "704e4216a397bd830479bcd6d7dd67fc62cdbe67"))) + (file-name (git-file-name "rust-ring" version)) + (sha256 + (base32 "0iqwf8i2i0a46ymrqss1ngbd2lqphk0mw74c65pxb8skyn2n7csi"))))) + (origin + (method computed-origin-method) + (file-name (string-append "rust-ring-" version ".tar.gz")) + (sha256 #f) + (uri + (delay + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (set-path-environment-variable + "PATH" '("bin") + (list #+(canonical-package gzip) + #+(canonical-package tar) + #+perl + #+yasm + #+go + #+clang ; clang-format + #+python2-minimal)) + (setenv "HOME" (getcwd)) + (copy-recursively #+upstream-source + (string-append "ring-" #$version)) + (with-directory-excursion (string-append "ring-" #$version) + (begin + ;; Make some adjustments for newer versions of rust + ;; error: `...` range patterns are deprecated + (substitute* "src/digest/sha1.rs" + (("0\\.\\.\\.") "0..=")) + (substitute* "build.rs" + (("out_dir\\.clone\\(\\)") "out_dir") + (("libs\\.into_iter\\(\\)") "libs.iter()")) + ;; It turns out Guix's yasm works just fine here. + (substitute* "build.rs" + (("yasm.exe") "yasm")) + ;; Files which would be deleted in a snippet: + (delete-file "third_party/fiat/curve25519_tables.h") + (delete-file "crypto/fipsmodule/ec/ecp_nistz256_table.inl") + ;; Files to be generated in the sources: + (format #t "Generating the missing files ...~%") + (force-output) + (with-directory-excursion "third_party/fiat" + (with-output-to-file "curve25519_tables.h" + (lambda _ (invoke "python" "make_curve25519_tables.py")))) + (with-directory-excursion "crypto/fipsmodule/ec" + ;; This one seems to have been changed elsewhere in the + ;; sources but not in the script generating the definition. + (substitute* "make_p256-x86_64-table.go" + (("ecp_nistz256_precomputed") "GFp_nistz256_precomputed")) + (with-output-to-file "ecp_nistz256_table.inl" + (lambda _ (invoke "go" "run" "make_p256-x86_64-table.go")))) + (format #t "Generating the pregenerated files ...~%") + (force-output) + (mkdir-p "pregenerated/tmp") + + ;; We generate all the files which upstream would normally be + ;; generate by using '(cd pregenerate_asm && cargo clean && + ;; cargo build) ./pregenerate_asm/target/debug/pregenerate_asm' + ;; in order to not include a dependency on cargo when + ;; generating the sources. + (define (prefix script) + (string-append + "pregenerated/" + (string-drop-right + (string-drop script + (string-index-right script #\/)) 3))) + + (for-each + (lambda (script) + (invoke "perl" script "elf" + (string-append (prefix script) "-elf.S")) + (invoke "perl" script "macosx" + (string-append (prefix script) "-macosx.S")) + (invoke "perl" script "nasm" + (string-append + "pregenerated/tmp/" + (string-drop (prefix script) 13) "-nasm.asm"))) + '("crypto/fipsmodule/aes/asm/aes-x86_64.pl" + "crypto/fipsmodule/aes/asm/aesni-x86_64.pl" + "crypto/fipsmodule/aes/asm/vpaes-x86_64.pl" + "crypto/fipsmodule/bn/asm/x86_64-mont.pl" + "crypto/fipsmodule/bn/asm/x86_64-mont5.pl" + "crypto/chacha/asm/chacha-x86_64.pl" + "crypto/fipsmodule/ec/asm/p256-x86_64-asm.pl" + "crypto/fipsmodule/modes/asm/aesni-gcm-x86_64.pl" + "crypto/fipsmodule/modes/asm/ghash-x86_64.pl" + "crypto/poly1305/asm/poly1305-x86_64.pl" + "crypto/fipsmodule/sha/asm/sha512-x86_64.pl")) + + (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-x86_64.pl" + "elf" "pregenerated/sha256-x86_64-elf.S") + + (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-x86_64.pl" + "macosx" "pregenerated/sha256-x86_64-macosx.S") + + (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-x86_64.pl" + "nasm" "pregenerated/tmp/sha256-x86_64-nasm.asm") + + (for-each + (lambda (script) + (invoke "yasm" "-X" "vc" "--dformat=cv8" + "--oformat=win64" "--machine=amd64" "-o" + (string-append (prefix script) "obj") script)) + (find-files "pregenerated/tmp" "\\.asm")) + + (for-each + (lambda (script) + (invoke "perl" script "ios64" + (string-append (prefix script) "-ios64.S")) + (invoke "perl" script "linux64" + (string-append (prefix script) "-linux64.S"))) + '("crypto/fipsmodule/aes/asm/aesv8-armx.pl" + "crypto/fipsmodule/modes/asm/ghashv8-armx.pl" + "crypto/fipsmodule/bn/asm/armv8-mont.pl" + "crypto/chacha/asm/chacha-armv8.pl" + "crypto/fipsmodule/ec/asm/ecp_nistz256-armv8.pl" + "crypto/poly1305/asm/poly1305-armv8.pl" + "crypto/fipsmodule/sha/asm/sha512-armv8.pl")) + + (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-armv8.pl" + "ios64" "pregenerated/sha256-armv8-ios64.S") + + (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-armv8.pl" + "linux64" "pregenerated/sha256-armv8-linux64.S") + + (for-each + (lambda (script) + (invoke "perl" script "elf" + "-fPIC" "-DOPENSSL_IA32_SSE2" + (string-append (prefix script) "-elf.S")) + (invoke "perl" script "macosx" + "-fPIC" "-DOPENSSL_IA32_SSE2" + (string-append (prefix script) "-macosx.S")) + (invoke "perl" script "win32n" + "-fPIC" "-DOPENSSL_IA32_SSE2" + (string-append + "pregenerated/tmp/" + (string-drop (prefix script) 13) "-win32n.asm"))) + '("crypto/fipsmodule/aes/asm/aes-586.pl" + "crypto/fipsmodule/aes/asm/aesni-x86.pl" + "crypto/fipsmodule/aes/asm/vpaes-x86.pl" + "crypto/fipsmodule/bn/asm/x86-mont.pl" + "crypto/chacha/asm/chacha-x86.pl" + "crypto/fipsmodule/ec/asm/ecp_nistz256-x86.pl" + "crypto/fipsmodule/modes/asm/ghash-x86.pl" + "crypto/poly1305/asm/poly1305-x86.pl" + "crypto/fipsmodule/sha/asm/sha256-586.pl" + "crypto/fipsmodule/sha/asm/sha512-586.pl")) + + (for-each + (lambda (script) + (invoke "yasm" "-X" "vc" "--dformat=cv8" + "--oformat=win32" "--machine=x86" "-o" + (string-append (prefix script) "obj") script)) + (find-files "pregenerated/tmp" "-win32n\\.asm")) + + (for-each + (lambda (script) + (invoke "perl" script "ios32" + (string-append (prefix script) "-ios32.S")) + (invoke "perl" script "linux32" + (string-append (prefix script) "-linux32.S"))) + '("crypto/fipsmodule/aes/asm/aesv8-armx.pl" + "crypto/fipsmodule/modes/asm/ghashv8-armx.pl" + "crypto/fipsmodule/aes/asm/aes-armv4.pl" + "crypto/fipsmodule/aes/asm/bsaes-armv7.pl" + "crypto/fipsmodule/bn/asm/armv4-mont.pl" + "crypto/chacha/asm/chacha-armv4.pl" + "crypto/fipsmodule/ec/asm/ecp_nistz256-armv4.pl" + "crypto/fipsmodule/modes/asm/ghash-armv4.pl" + "crypto/poly1305/asm/poly1305-armv4.pl" + "crypto/fipsmodule/sha/asm/sha256-armv4.pl" + "crypto/fipsmodule/sha/asm/sha512-armv4.pl")) + + (format #t "Creating the tarball ...~%") + (force-output) + ;; The other option is to use cargo package --allow-dirty + (with-directory-excursion "../" + (invoke "tar" "czf" #$output + ;; avoid non-determinism in the archive + "--sort=name" "--mtime=@0" + "--owner=root:0" "--group=root:0" + (string-append "ring-" #$version)))))))))))) +(define-public rust-ring-0.13 + (package + (inherit rust-ring-0.14) + (name "rust-ring") + (version "0.13.5") + (source rust-ring-0.13-sources) + (arguments + `(#:cargo-inputs + (("rust-lazy-static" ,rust-lazy-static-1) + ("rust-libc" ,rust-libc-0.2) + ("rust-untrusted" ,rust-untrusted-0.6) + ;; build dependencies + ("rust-cc" ,rust-cc-1)))))) diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index 1316d9d273..7aafde0d3d 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -64,7 +64,6 @@ #:use-module (guix utils) #:use-module (gnu packages) #:use-module (gnu packages admin) - #:use-module (gnu packages assembly) #:use-module (gnu packages audio) #:use-module (gnu packages autotools) #:use-module (gnu packages avahi) @@ -89,7 +88,6 @@ #:use-module (gnu packages gettext) #:use-module (gnu packages gl) #:use-module (gnu packages glib) - #:use-module (gnu packages golang) #:use-module (gnu packages icu4c) #:use-module (gnu packages image) #:use-module (gnu packages jemalloc) @@ -56880,826 +56878,6 @@ functionality as retain but gives mutable borrow to the predicate.") MIME Message Headers.") (license license:expat))) -(define computed-origin-method (@@ (guix packages) computed-origin-method)) -(define rust-ring-0.17-sources - (let* ((version "0.17.7") - (upstream-source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/briansmith/ring") - (commit "2be687bebdf76648ce85109d40c015412e14b0da"))) - (file-name (git-file-name "rust-ring" version)) - (sha256 - (base32 "1i3b7sha8yj990v2s5yk2a5dx3v4x9b8ckzm6bgiyi6wk4vnid69")) - (patches (search-patches "rust-ring-0.17-ring-core.patch"))))) - (origin - (method computed-origin-method) - (file-name (string-append "rust-ring-" version ".tar.gz")) - (sha256 #f) - (uri - (delay - (with-imported-modules '((guix build utils)) - #~(begin - (use-modules (guix build utils)) - (set-path-environment-variable - "PATH" '("bin") - (list #+(canonical-package gzip) - #+(canonical-package tar) - #+perl - #+nasm - #+go - #+clang ; clang-format - #+python-minimal)) - (setenv "HOME" (getcwd)) - (copy-recursively #+upstream-source - (string-append "ring-" #$version)) - (with-directory-excursion (string-append "ring-" #$version) - (begin - ;; It turns out Guix's nasm works just fine here. - (substitute* "build.rs" - (("./target/tools/windows/nasm/nasm") "nasm")) - ;; Files which would be deleted in a snippet: - (delete-file "crypto/curve25519/curve25519_tables.h") - (delete-file "crypto/fipsmodule/ec/p256-nistz-table.h") - (delete-file "crypto/fipsmodule/ec/p256_table.h") - ;; This file causes problems during the 'package phase and - ;; is not distributed with the packaged crate. - (substitute* "Cargo.toml" - (("\"bench\",") "")) - (delete-file "bench/Cargo.toml") - ;; Files to be generated in the sources: - (format #t "Generating the missing files ...~%") - (force-output) - (with-directory-excursion "crypto/curve25519" - (with-output-to-file "curve25519_tables.h" - (lambda _ (invoke "python3" "make_curve25519_tables.py"))) - ;; As seen in git between 0.17.0 and 0.17.1. - (substitute* "curve25519_tables.h" - (("static const uint8_t k25519Precomp") - "const uint8_t k25519Precomp"))) - (with-directory-excursion "crypto/fipsmodule/ec" - (invoke "go" "run" "make_tables.go") - (invoke "go" "run" "make_ec_scalar_base_mult_tests.go")) - (format #t "Generating the pregenerated files ...~%") - (force-output) - (mkdir-p "pregenerated/tmp/ring_core_generated") - - ;; We generate all the files which upstream would normally be - ;; generate by using 'RING_PREGENERATE_ASM=1 cargo build - ;; --target-dir=target/pregenerate_asm' in order to not include - ;; a dependency on cargo when generating the sources. - (define (prefix script) - (string-append - "pregenerated/" - (string-drop-right - (string-drop script - (string-index-right script #\/)) 3))) - - (for-each - (lambda (script) - (invoke "perl" script "ios64" - (string-append (prefix script) "-ios64.S")) - (invoke "perl" script "linux64" - (string-append (prefix script) "-linux64.S")) - (invoke "perl" script "win64" - (string-append (prefix script) "-win64.S"))) - '("crypto/fipsmodule/aes/asm/aesv8-armx.pl" - "crypto/fipsmodule/modes/asm/ghashv8-armx.pl" - "crypto/chacha/asm/chacha-armv8.pl" - "crypto/cipher_extra/asm/chacha20_poly1305_armv8.pl" - "crypto/fipsmodule/aes/asm/vpaes-armv8.pl" - "crypto/fipsmodule/bn/asm/armv8-mont.pl" - "crypto/fipsmodule/ec/asm/p256-armv8-asm.pl" - "crypto/fipsmodule/modes/asm/ghash-neon-armv8.pl" - "crypto/fipsmodule/sha/asm/sha512-armv8.pl")) - - (for-each - (lambda (arch) - (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-armv8.pl" - arch (string-append - "pregenerated/sha256-armv8-" arch ".S"))) - '("ios64" "linux64" "win64")) - - (for-each - (lambda (script) - (invoke "perl" script "linux32" - (string-append (prefix script) "-linux32.S"))) - '("crypto/fipsmodule/aes/asm/aesv8-armx.pl" - "crypto/fipsmodule/modes/asm/ghashv8-armx.pl" - "crypto/fipsmodule/aes/asm/bsaes-armv7.pl" - "crypto/fipsmodule/aes/asm/vpaes-armv7.pl" - "crypto/fipsmodule/bn/asm/armv4-mont.pl" - "crypto/chacha/asm/chacha-armv4.pl" - "crypto/fipsmodule/modes/asm/ghash-armv4.pl" - "crypto/fipsmodule/sha/asm/sha256-armv4.pl" - "crypto/fipsmodule/sha/asm/sha512-armv4.pl")) - - (for-each - (lambda (script) - (invoke "perl" script "elf" - "-fPIC" "-DOPENSSL_IA32_SSE2" - (string-append (prefix script) "-elf.S")) - (invoke "perl" script "win32n" - "-fPIC" "-DOPENSSL_IA32_SSE2" - (string-append - "pregenerated/tmp/" - (string-drop (prefix script) 13) "-win32n.asm"))) - '("crypto/fipsmodule/aes/asm/aesni-x86.pl" - "crypto/fipsmodule/aes/asm/vpaes-x86.pl" - "crypto/fipsmodule/bn/asm/x86-mont.pl" - "crypto/chacha/asm/chacha-x86.pl" - "crypto/fipsmodule/modes/asm/ghash-x86.pl")) - - (for-each - (lambda (script) - (invoke "perl" script "elf" - (string-append (prefix script) "-elf.S")) - (invoke "perl" script "macosx" - (string-append (prefix script) "-macosx.S")) - (invoke "perl" script "nasm" - (string-append - "pregenerated/tmp/" - (string-drop (prefix script) 13) "-nasm.asm"))) - '("crypto/chacha/asm/chacha-x86_64.pl" - "crypto/fipsmodule/aes/asm/aesni-x86_64.pl" - "crypto/fipsmodule/aes/asm/vpaes-x86_64.pl" - "crypto/fipsmodule/bn/asm/x86_64-mont.pl" - "crypto/fipsmodule/bn/asm/x86_64-mont5.pl" - "crypto/fipsmodule/ec/asm/p256-x86_64-asm.pl" - "crypto/fipsmodule/modes/asm/aesni-gcm-x86_64.pl" - "crypto/fipsmodule/modes/asm/ghash-x86_64.pl" - "crypto/fipsmodule/sha/asm/sha512-x86_64.pl" - "crypto/cipher_extra/asm/chacha20_poly1305_x86_64.pl")) - - (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-x86_64.pl" - "elf" "pregenerated/sha256-x86_64-elf.S") - - (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-x86_64.pl" - "macosx" "pregenerated/sha256-x86_64-macosx.S") - - (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-x86_64.pl" - "nasm" "pregenerated/tmp/sha256-x86_64-nasm.asm") - - ;; TODO: Extract ring_core_generated/prefix_symbols_nasm.inc - ;; and ring_core_generated/prefix_symbols_asm.h from build.rs. - - (for-each - (lambda (script) - (invoke "nasm" "-o" (string-append (prefix script) "o") - "-f" "win32" "-i" "include/" "-i" "pregenerated/tmp/" - "-Xgnu" "-gcv8" script)) - (find-files "pregenerated/tmp" "win32n\\.asm")) - - (for-each - (lambda (script) - (invoke "nasm" "-o" (string-append (prefix script) "o") - "-f" "win64" "-i" "include/" "-i" "pregenerated/tmp/" - "-Xgnu" "-gcv8" script)) - (find-files "pregenerated/tmp" "nasm\\.asm")) - - (format #t "Creating the tarball ...~%") - (force-output) - ;; The other option is to use cargo package --allow-dirty - (with-directory-excursion "../" - (invoke "tar" "czf" #$output - ;; avoid non-determinism in the archive - "--sort=name" "--mtime=@0" - "--owner=root:0" "--group=root:0" - (string-append "ring-" #$version)))))))))))) - -(define-public rust-ring-0.17 - (package - (name "rust-ring") - (version "0.17.7") - (source rust-ring-0.17-sources) - (build-system cargo-build-system) - (arguments - `(#:cargo-inputs (("rust-cc" ,rust-cc-1) - ("rust-getrandom" ,rust-getrandom-0.2) - ("rust-libc" ,rust-libc-0.2) - ("rust-spin" ,rust-spin-0.9) - ("rust-untrusted" ,rust-untrusted-0.9) - ("rust-windows-sys" ,rust-windows-sys-0.48)) - #:cargo-development-inputs - (("rust-libc" ,rust-libc-0.2) - ("rust-wasm-bindgen-test" ,rust-wasm-bindgen-test-0.3)))) - (home-page "https://github.com/briansmith/ring") - (synopsis "Safe, fast, small crypto using Rust") - (description "This package provided safe, fast, small crypto using Rust.") - (license (list license:isc license:openssl)))) - -(define rust-ring-0.16-sources - (let* ((version "0.16.20") - (upstream-source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/briansmith/ring") - (commit "9cc0d45f4d8521f467bb3a621e74b1535e118188"))) - (file-name (git-file-name "rust-ring" version)) - (sha256 - (base32 "1aps05i5308ka03968glnnqr4kdkk2x4ghlg5vrqhl78jm6ivvby"))))) - (origin - (method computed-origin-method) - (file-name (string-append "rust-ring-" version ".tar.gz")) - (sha256 #f) - (uri - (delay - (with-imported-modules '((guix build utils)) - #~(begin - (use-modules (guix build utils)) - (set-path-environment-variable - "PATH" '("bin") - (list #+(canonical-package gzip) - #+(canonical-package tar) - #+perl - #+nasm - #+go - #+clang ; clang-format - #+python2-minimal)) - (setenv "HOME" (getcwd)) - (copy-recursively #+upstream-source - (string-append "ring-" #$version)) - (with-directory-excursion (string-append "ring-" #$version) - (begin - ;; It turns out Guix's nasm works just fine here. - (substitute* "build.rs" - (("./target/tools/nasm") "nasm")) - ;; Files which would be deleted in a snippet: - (delete-file "crypto/curve25519/curve25519_tables.h") - (delete-file "crypto/fipsmodule/ec/ecp_nistz256_table.inl") - ;; Files to be generated in the sources: - (format #t "Generating the missing files ...~%") - (force-output) - (with-directory-excursion "crypto/curve25519" - (with-output-to-file "curve25519_tables.h" - (lambda _ (invoke "python" "make_curve25519_tables.py")))) - (with-directory-excursion "crypto/fipsmodule/ec" - (with-output-to-file "ecp_nistz256_table.inl" - (lambda _ (invoke "go" "run" "make_p256-x86_64-table.go")))) - (format #t "Generating the pregenerated files ...~%") - (force-output) - (mkdir-p "pregenerated/tmp") - - ;; We generate all the files which upstream would normally be - ;; generate by using '(cd pregenerate_asm && cargo clean && - ;; cargo build) ./pregenerate_asm/target/debug/pregenerate_asm' - ;; in order to not include a dependency on cargo when - ;; generating the sources. - (define (prefix script) - (string-append - "pregenerated/" - (string-drop-right - (string-drop script - (string-index-right script #\/)) 3))) - - (for-each - (lambda (script) - (invoke "perl" script "elf" - (string-append (prefix script) "-elf.S")) - (invoke "perl" script "macosx" - (string-append (prefix script) "-macosx.S")) - (invoke "perl" script "nasm" - (string-append - "pregenerated/tmp/" - (string-drop (prefix script) 13) "-nasm.asm"))) - '("crypto/fipsmodule/aes/asm/aesni-x86_64.pl" - "crypto/fipsmodule/aes/asm/vpaes-x86_64.pl" - "crypto/fipsmodule/bn/asm/x86_64-mont.pl" - "crypto/fipsmodule/bn/asm/x86_64-mont5.pl" - "crypto/chacha/asm/chacha-x86_64.pl" - "crypto/fipsmodule/ec/asm/p256-x86_64-asm.pl" - "crypto/fipsmodule/modes/asm/aesni-gcm-x86_64.pl" - "crypto/fipsmodule/modes/asm/ghash-x86_64.pl" - "crypto/fipsmodule/sha/asm/sha512-x86_64.pl" - "crypto/cipher_extra/asm/chacha20_poly1305_x86_64.pl")) - - (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-x86_64.pl" - "elf" "pregenerated/sha256-x86_64-elf.S") - - (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-x86_64.pl" - "macosx" "pregenerated/sha256-x86_64-macosx.S") - - (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-x86_64.pl" - "nasm" "pregenerated/tmp/sha256-x86_64-nasm.asm") - - (for-each - (lambda (script) - (invoke "nasm" "-o" (string-append (prefix script) "obj") - "-f" "win64" "-Xgnu" "-gcv8" script)) - (find-files "pregenerated/tmp" "\\.asm")) - - (for-each - (lambda (script) - (invoke "perl" script "ios64" - (string-append (prefix script) "-ios64.S")) - (invoke "perl" script "linux64" - (string-append (prefix script) "-linux64.S"))) - '("crypto/fipsmodule/aes/asm/aesv8-armx.pl" - "crypto/fipsmodule/modes/asm/ghashv8-armx.pl" - "crypto/fipsmodule/aes/asm/vpaes-armv8.pl" - "crypto/fipsmodule/bn/asm/armv8-mont.pl" - "crypto/chacha/asm/chacha-armv8.pl" - "crypto/fipsmodule/ec/asm/ecp_nistz256-armv8.pl" - "crypto/fipsmodule/modes/asm/ghash-neon-armv8.pl" - "crypto/fipsmodule/sha/asm/sha512-armv8.pl")) - - (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-armv8.pl" - "ios64" "pregenerated/sha256-armv8-ios64.S") - - (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-armv8.pl" - "linux64" "pregenerated/sha256-armv8-linux64.S") - - (for-each - (lambda (script) - (invoke "perl" script "elf" - "-fPIC" "-DOPENSSL_IA32_SSE2" - (string-append (prefix script) "-elf.S")) - (invoke "perl" script "macosx" - "-fPIC" "-DOPENSSL_IA32_SSE2" - (string-append (prefix script) "-macosx.S")) - (invoke "perl" script "win32n" - "-fPIC" "-DOPENSSL_IA32_SSE2" - (string-append - "pregenerated/tmp/" - (string-drop (prefix script) 13) "-win32n.asm"))) - '("crypto/fipsmodule/aes/asm/aesni-x86.pl" - "crypto/fipsmodule/aes/asm/vpaes-x86.pl" - "crypto/fipsmodule/bn/asm/x86-mont.pl" - "crypto/chacha/asm/chacha-x86.pl" - "crypto/fipsmodule/ec/asm/ecp_nistz256-x86.pl" - "crypto/fipsmodule/modes/asm/ghash-x86.pl")) - - (for-each - (lambda (script) - (invoke "nasm" "-o" (string-append (prefix script) "obj") - "-f" "win32" "-Xgnu" "-gcv8" script)) - (find-files "pregenerated/tmp" "-win32n\\.asm")) - - (for-each - (lambda (script) - (invoke "perl" script "ios32" - (string-append (prefix script) "-ios32.S")) - (invoke "perl" script "linux32" - (string-append (prefix script) "-linux32.S"))) - '("crypto/fipsmodule/aes/asm/aesv8-armx.pl" - "crypto/fipsmodule/modes/asm/ghashv8-armx.pl" - "crypto/fipsmodule/aes/asm/bsaes-armv7.pl" - "crypto/fipsmodule/aes/asm/vpaes-armv7.pl" - "crypto/fipsmodule/bn/asm/armv4-mont.pl" - "crypto/chacha/asm/chacha-armv4.pl" - "crypto/fipsmodule/ec/asm/ecp_nistz256-armv4.pl" - "crypto/fipsmodule/modes/asm/ghash-armv4.pl" - "crypto/fipsmodule/sha/asm/sha256-armv4.pl" - "crypto/fipsmodule/sha/asm/sha512-armv4.pl")) - - (format #t "Creating the tarball ...~%") - (force-output) - ;; The other option is to use cargo package --allow-dirty - (with-directory-excursion "../" - (invoke "tar" "czf" #$output - ;; avoid non-determinism in the archive - "--sort=name" "--mtime=@0" - "--owner=root:0" "--group=root:0" - (string-append "ring-" #$version)))))))))))) - -(define-public rust-ring-0.16 - (package - (inherit rust-ring-0.17) - (name "rust-ring") - (version "0.16.20") - (source rust-ring-0.16-sources) - (arguments - `(#:cargo-inputs - (("rust-libc" ,rust-libc-0.2) - ("rust-once-cell" ,rust-once-cell-1) - ("rust-spin" ,rust-spin-0.5) - ("rust-untrusted" ,rust-untrusted-0.7) - ("rust-web-sys" ,rust-web-sys-0.3) - ("rust-winapi" ,rust-winapi-0.3) - ;; build dependencies - ("rust-cc" ,rust-cc-1)) - #:cargo-development-inputs - (("rust-libc" ,rust-libc-0.2) - ("rust-wasm-bindgen-test" ,rust-wasm-bindgen-test-0.3)))) - ;; For a mostly complete list of supported systems see: - ;; https://github.com/briansmith/ring/blob/main/.github/workflows/ci.yml#L170 - (supported-systems (list "aarch64-linux" "armhf-linux" - "i686-linux" "x86_64-linux")))) - -(define rust-ring-0.14-sources - (let* ((version "0.14.6") - (upstream-source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/briansmith/ring") - (commit "ef85df478152aa3fe06c811309379efa08f8a529"))) - (file-name (git-file-name "rust-ring" version)) - (sha256 - (base32 "12dgw2spvmkdypgzymw3bxpv4bbpnlq8s10sdggral31x597n6xx"))))) - (origin - (method computed-origin-method) - (file-name (string-append "rust-ring-" version ".tar.gz")) - (sha256 #f) - (uri - (delay - (with-imported-modules '((guix build utils)) - #~(begin - (use-modules (guix build utils)) - (set-path-environment-variable - "PATH" '("bin") - (list #+(canonical-package gzip) - #+(canonical-package tar) - #+perl - #+yasm - #+go - #+clang ; clang-format - #+python2-minimal)) - (setenv "HOME" (getcwd)) - (copy-recursively #+upstream-source - (string-append "ring-" #$version)) - (with-directory-excursion (string-append "ring-" #$version) - (begin - ;; It turns out Guix's yasm works just fine here. - (substitute* "build.rs" - (("yasm.exe") "yasm")) - ;; Files which would be deleted in a snippet: - (delete-file "third_party/fiat/curve25519_tables.h") - (delete-file "crypto/fipsmodule/ec/ecp_nistz256_table.inl") - (delete-file "util/ar/testdata/linux/libsample.a") - (delete-file "util/ar/testdata/mac/libsample.a") - (delete-file "util/ar/testdata/windows/sample.lib") - ;; Fix the doc tests. - (substitute* "src/ec/curve25519/ed25519/verification.rs" - ((";;") ";")) - ;; Files to be generated in the sources: - (format #t "Generating the missing files ...~%") - (force-output) - (with-directory-excursion "third_party/fiat" - (with-output-to-file "curve25519_tables.h" - (lambda _ (invoke "python" "make_curve25519_tables.py")))) - (with-directory-excursion "crypto/fipsmodule/ec" - ;; This one seems to have been changed elsewhere in the - ;; sources but not in the script generating the definition. - (substitute* "make_p256-x86_64-table.go" - (("ecp_nistz256_precomputed") "GFp_nistz256_precomputed")) - (with-output-to-file "ecp_nistz256_table.inl" - (lambda _ (invoke "go" "run" "make_p256-x86_64-table.go")))) - (format #t "Generating the pregenerated files ...~%") - (force-output) - (mkdir-p "pregenerated/tmp") - - ;; We generate all the files which upstream would normally be - ;; generate by using '(cd pregenerate_asm && cargo clean && - ;; cargo build) ./pregenerate_asm/target/debug/pregenerate_asm' - ;; in order to not include a dependency on cargo when - ;; generating the sources. - (define (prefix script) - (string-append - "pregenerated/" - (string-drop-right - (string-drop script - (string-index-right script #\/)) 3))) - - (for-each - (lambda (script) - (invoke "perl" script "elf" - (string-append (prefix script) "-elf.S")) - (invoke "perl" script "macosx" - (string-append (prefix script) "-macosx.S")) - (invoke "perl" script "nasm" - (string-append - "pregenerated/tmp/" - (string-drop (prefix script) 13) "-nasm.asm"))) - '("crypto/fipsmodule/aes/asm/aes-x86_64.pl" - "crypto/fipsmodule/aes/asm/aesni-x86_64.pl" - "crypto/fipsmodule/aes/asm/vpaes-x86_64.pl" - "crypto/fipsmodule/bn/asm/x86_64-mont.pl" - "crypto/fipsmodule/bn/asm/x86_64-mont5.pl" - "crypto/chacha/asm/chacha-x86_64.pl" - "crypto/fipsmodule/ec/asm/p256-x86_64-asm.pl" - "crypto/fipsmodule/modes/asm/aesni-gcm-x86_64.pl" - "crypto/fipsmodule/modes/asm/ghash-x86_64.pl" - "crypto/poly1305/asm/poly1305-x86_64.pl" - "crypto/fipsmodule/sha/asm/sha512-x86_64.pl")) - - (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-x86_64.pl" - "elf" "pregenerated/sha256-x86_64-elf.S") - - (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-x86_64.pl" - "macosx" "pregenerated/sha256-x86_64-macosx.S") - - (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-x86_64.pl" - "nasm" "pregenerated/tmp/sha256-x86_64-nasm.asm") - - (for-each - (lambda (script) - (invoke "yasm" "-X" "vc" "--dformat=cv8" - "--oformat=win64" "--machine=amd64" "-o" - (string-append (prefix script) "obj") script)) - (find-files "pregenerated/tmp" "\\.asm")) - - (for-each - (lambda (script) - (invoke "perl" script "ios64" - (string-append (prefix script) "-ios64.S")) - (invoke "perl" script "linux64" - (string-append (prefix script) "-linux64.S"))) - '("crypto/fipsmodule/aes/asm/aesv8-armx.pl" - "crypto/fipsmodule/modes/asm/ghashv8-armx.pl" - "crypto/fipsmodule/bn/asm/armv8-mont.pl" - "crypto/chacha/asm/chacha-armv8.pl" - "crypto/fipsmodule/ec/asm/ecp_nistz256-armv8.pl" - "crypto/poly1305/asm/poly1305-armv8.pl" - "crypto/fipsmodule/sha/asm/sha512-armv8.pl")) - - (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-armv8.pl" - "ios64" "pregenerated/sha256-armv8-ios64.S") - - (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-armv8.pl" - "linux64" "pregenerated/sha256-armv8-linux64.S") - - (for-each - (lambda (script) - (invoke "perl" script "elf" - "-fPIC" "-DOPENSSL_IA32_SSE2" - (string-append (prefix script) "-elf.S")) - (invoke "perl" script "macosx" - "-fPIC" "-DOPENSSL_IA32_SSE2" - (string-append (prefix script) "-macosx.S")) - (invoke "perl" script "win32n" - "-fPIC" "-DOPENSSL_IA32_SSE2" - (string-append - "pregenerated/tmp/" - (string-drop (prefix script) 13) "-win32n.asm"))) - '("crypto/fipsmodule/aes/asm/aes-586.pl" - "crypto/fipsmodule/aes/asm/aesni-x86.pl" - "crypto/fipsmodule/aes/asm/vpaes-x86.pl" - "crypto/fipsmodule/bn/asm/x86-mont.pl" - "crypto/chacha/asm/chacha-x86.pl" - "crypto/fipsmodule/ec/asm/ecp_nistz256-x86.pl" - "crypto/fipsmodule/modes/asm/ghash-x86.pl" - "crypto/poly1305/asm/poly1305-x86.pl" - "crypto/fipsmodule/sha/asm/sha256-586.pl" - "crypto/fipsmodule/sha/asm/sha512-586.pl")) - - (for-each - (lambda (script) - (invoke "yasm" "-X" "vc" "--dformat=cv8" - "--oformat=win32" "--machine=x86" "-o" - (string-append (prefix script) "obj") script)) - (find-files "pregenerated/tmp" "-win32n\\.asm")) - - (for-each - (lambda (script) - (invoke "perl" script "ios32" - (string-append (prefix script) "-ios32.S")) - (invoke "perl" script "linux32" - (string-append (prefix script) "-linux32.S"))) - '("crypto/fipsmodule/aes/asm/aesv8-armx.pl" - "crypto/fipsmodule/modes/asm/ghashv8-armx.pl" - "crypto/fipsmodule/aes/asm/aes-armv4.pl" - "crypto/fipsmodule/aes/asm/bsaes-armv7.pl" - "crypto/fipsmodule/bn/asm/armv4-mont.pl" - "crypto/chacha/asm/chacha-armv4.pl" - "crypto/fipsmodule/ec/asm/ecp_nistz256-armv4.pl" - "crypto/fipsmodule/modes/asm/ghash-armv4.pl" - "crypto/poly1305/asm/poly1305-armv4.pl" - "crypto/fipsmodule/sha/asm/sha256-armv4.pl" - "crypto/fipsmodule/sha/asm/sha512-armv4.pl")) - - (format #t "Creating the tarball ...~%") - (force-output) - ;; The other option is to use cargo package --allow-dirty - (with-directory-excursion "../" - (invoke "tar" "czf" #$output - ;; avoid non-determinism in the archive - "--sort=name" "--mtime=@0" - "--owner=root:0" "--group=root:0" - (string-append "ring-" #$version)))))))))))) -(define-public rust-ring-0.14 - (package - (inherit rust-ring-0.16) - (name "rust-ring") - (version "0.14.6") - (source rust-ring-0.14-sources) - (arguments - `(#:cargo-inputs - (("rust-cc" ,rust-cc-1) - ("rust-lazy-static" ,rust-lazy-static-1) - ("rust-libc" ,rust-libc-0.2) - ("rust-spin" ,rust-spin-0.5) - ("rust-untrusted" ,rust-untrusted-0.6) - ("rust-winapi" ,rust-winapi-0.3)))))) - -(define rust-ring-0.13-sources - (let* ((version "0.13.5") - (upstream-source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/briansmith/ring") - (commit "704e4216a397bd830479bcd6d7dd67fc62cdbe67"))) - (file-name (git-file-name "rust-ring" version)) - (sha256 - (base32 "0iqwf8i2i0a46ymrqss1ngbd2lqphk0mw74c65pxb8skyn2n7csi"))))) - (origin - (method computed-origin-method) - (file-name (string-append "rust-ring-" version ".tar.gz")) - (sha256 #f) - (uri - (delay - (with-imported-modules '((guix build utils)) - #~(begin - (use-modules (guix build utils)) - (set-path-environment-variable - "PATH" '("bin") - (list #+(canonical-package gzip) - #+(canonical-package tar) - #+perl - #+yasm - #+go - #+clang ; clang-format - #+python2-minimal)) - (setenv "HOME" (getcwd)) - (copy-recursively #+upstream-source - (string-append "ring-" #$version)) - (with-directory-excursion (string-append "ring-" #$version) - (begin - ;; Make some adjustments for newer versions of rust - ;; error: `...` range patterns are deprecated - (substitute* "src/digest/sha1.rs" - (("0\\.\\.\\.") "0..=")) - (substitute* "build.rs" - (("out_dir\\.clone\\(\\)") "out_dir") - (("libs\\.into_iter\\(\\)") "libs.iter()")) - ;; It turns out Guix's yasm works just fine here. - (substitute* "build.rs" - (("yasm.exe") "yasm")) - ;; Files which would be deleted in a snippet: - (delete-file "third_party/fiat/curve25519_tables.h") - (delete-file "crypto/fipsmodule/ec/ecp_nistz256_table.inl") - ;; Files to be generated in the sources: - (format #t "Generating the missing files ...~%") - (force-output) - (with-directory-excursion "third_party/fiat" - (with-output-to-file "curve25519_tables.h" - (lambda _ (invoke "python" "make_curve25519_tables.py")))) - (with-directory-excursion "crypto/fipsmodule/ec" - ;; This one seems to have been changed elsewhere in the - ;; sources but not in the script generating the definition. - (substitute* "make_p256-x86_64-table.go" - (("ecp_nistz256_precomputed") "GFp_nistz256_precomputed")) - (with-output-to-file "ecp_nistz256_table.inl" - (lambda _ (invoke "go" "run" "make_p256-x86_64-table.go")))) - (format #t "Generating the pregenerated files ...~%") - (force-output) - (mkdir-p "pregenerated/tmp") - - ;; We generate all the files which upstream would normally be - ;; generate by using '(cd pregenerate_asm && cargo clean && - ;; cargo build) ./pregenerate_asm/target/debug/pregenerate_asm' - ;; in order to not include a dependency on cargo when - ;; generating the sources. - (define (prefix script) - (string-append - "pregenerated/" - (string-drop-right - (string-drop script - (string-index-right script #\/)) 3))) - - (for-each - (lambda (script) - (invoke "perl" script "elf" - (string-append (prefix script) "-elf.S")) - (invoke "perl" script "macosx" - (string-append (prefix script) "-macosx.S")) - (invoke "perl" script "nasm" - (string-append - "pregenerated/tmp/" - (string-drop (prefix script) 13) "-nasm.asm"))) - '("crypto/fipsmodule/aes/asm/aes-x86_64.pl" - "crypto/fipsmodule/aes/asm/aesni-x86_64.pl" - "crypto/fipsmodule/aes/asm/vpaes-x86_64.pl" - "crypto/fipsmodule/bn/asm/x86_64-mont.pl" - "crypto/fipsmodule/bn/asm/x86_64-mont5.pl" - "crypto/chacha/asm/chacha-x86_64.pl" - "crypto/fipsmodule/ec/asm/p256-x86_64-asm.pl" - "crypto/fipsmodule/modes/asm/aesni-gcm-x86_64.pl" - "crypto/fipsmodule/modes/asm/ghash-x86_64.pl" - "crypto/poly1305/asm/poly1305-x86_64.pl" - "crypto/fipsmodule/sha/asm/sha512-x86_64.pl")) - - (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-x86_64.pl" - "elf" "pregenerated/sha256-x86_64-elf.S") - - (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-x86_64.pl" - "macosx" "pregenerated/sha256-x86_64-macosx.S") - - (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-x86_64.pl" - "nasm" "pregenerated/tmp/sha256-x86_64-nasm.asm") - - (for-each - (lambda (script) - (invoke "yasm" "-X" "vc" "--dformat=cv8" - "--oformat=win64" "--machine=amd64" "-o" - (string-append (prefix script) "obj") script)) - (find-files "pregenerated/tmp" "\\.asm")) - - (for-each - (lambda (script) - (invoke "perl" script "ios64" - (string-append (prefix script) "-ios64.S")) - (invoke "perl" script "linux64" - (string-append (prefix script) "-linux64.S"))) - '("crypto/fipsmodule/aes/asm/aesv8-armx.pl" - "crypto/fipsmodule/modes/asm/ghashv8-armx.pl" - "crypto/fipsmodule/bn/asm/armv8-mont.pl" - "crypto/chacha/asm/chacha-armv8.pl" - "crypto/fipsmodule/ec/asm/ecp_nistz256-armv8.pl" - "crypto/poly1305/asm/poly1305-armv8.pl" - "crypto/fipsmodule/sha/asm/sha512-armv8.pl")) - - (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-armv8.pl" - "ios64" "pregenerated/sha256-armv8-ios64.S") - - (invoke "perl" "crypto/fipsmodule/sha/asm/sha512-armv8.pl" - "linux64" "pregenerated/sha256-armv8-linux64.S") - - (for-each - (lambda (script) - (invoke "perl" script "elf" - "-fPIC" "-DOPENSSL_IA32_SSE2" - (string-append (prefix script) "-elf.S")) - (invoke "perl" script "macosx" - "-fPIC" "-DOPENSSL_IA32_SSE2" - (string-append (prefix script) "-macosx.S")) - (invoke "perl" script "win32n" - "-fPIC" "-DOPENSSL_IA32_SSE2" - (string-append - "pregenerated/tmp/" - (string-drop (prefix script) 13) "-win32n.asm"))) - '("crypto/fipsmodule/aes/asm/aes-586.pl" - "crypto/fipsmodule/aes/asm/aesni-x86.pl" - "crypto/fipsmodule/aes/asm/vpaes-x86.pl" - "crypto/fipsmodule/bn/asm/x86-mont.pl" - "crypto/chacha/asm/chacha-x86.pl" - "crypto/fipsmodule/ec/asm/ecp_nistz256-x86.pl" - "crypto/fipsmodule/modes/asm/ghash-x86.pl" - "crypto/poly1305/asm/poly1305-x86.pl" - "crypto/fipsmodule/sha/asm/sha256-586.pl" - "crypto/fipsmodule/sha/asm/sha512-586.pl")) - - (for-each - (lambda (script) - (invoke "yasm" "-X" "vc" "--dformat=cv8" - "--oformat=win32" "--machine=x86" "-o" - (string-append (prefix script) "obj") script)) - (find-files "pregenerated/tmp" "-win32n\\.asm")) - - (for-each - (lambda (script) - (invoke "perl" script "ios32" - (string-append (prefix script) "-ios32.S")) - (invoke "perl" script "linux32" - (string-append (prefix script) "-linux32.S"))) - '("crypto/fipsmodule/aes/asm/aesv8-armx.pl" - "crypto/fipsmodule/modes/asm/ghashv8-armx.pl" - "crypto/fipsmodule/aes/asm/aes-armv4.pl" - "crypto/fipsmodule/aes/asm/bsaes-armv7.pl" - "crypto/fipsmodule/bn/asm/armv4-mont.pl" - "crypto/chacha/asm/chacha-armv4.pl" - "crypto/fipsmodule/ec/asm/ecp_nistz256-armv4.pl" - "crypto/fipsmodule/modes/asm/ghash-armv4.pl" - "crypto/poly1305/asm/poly1305-armv4.pl" - "crypto/fipsmodule/sha/asm/sha256-armv4.pl" - "crypto/fipsmodule/sha/asm/sha512-armv4.pl")) - - (format #t "Creating the tarball ...~%") - (force-output) - ;; The other option is to use cargo package --allow-dirty - (with-directory-excursion "../" - (invoke "tar" "czf" #$output - ;; avoid non-determinism in the archive - "--sort=name" "--mtime=@0" - "--owner=root:0" "--group=root:0" - (string-append "ring-" #$version)))))))))))) -(define-public rust-ring-0.13 - (package - (inherit rust-ring-0.14) - (name "rust-ring") - (version "0.13.5") - (source rust-ring-0.13-sources) - (arguments - `(#:cargo-inputs - (("rust-lazy-static" ,rust-lazy-static-1) - ("rust-libc" ,rust-libc-0.2) - ("rust-untrusted" ,rust-untrusted-0.6) - ;; build dependencies - ("rust-cc" ,rust-cc-1)))))) - (define-public rust-ringbuf-0.2 (package (name "rust-ringbuf") diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index 8b246336a1..c21d7f3048 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -32,6 +32,7 @@ #:use-module (guix utils) #:use-module (gnu packages) #:use-module (gnu packages crates-apple) + #:use-module (gnu packages crates-crypto) #:use-module (gnu packages crates-io) #:use-module (gnu packages crates-web) #:use-module (gnu packages crates-windows) -- cgit v1.2.3 From 76a4ca82dd061004a703011928262036771e115e Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 21 Jan 2024 20:10:03 +0200 Subject: gnu: rust-rcgen: Move to (gnu packages crates-tls). * gnu/packages/crates-io.scm (rust-rcgen-0.11, rust-rcgen-0.10, rust-rcgen-0.8): Move from here ... * gnu/packages/crates-tls.scm: ... to here. Change-Id: I428c7fe7fdbed8880bd5ddfe80f68b1e92be943a --- gnu/packages/crates-io.scm | 110 ------------------------------------------- gnu/packages/crates-tls.scm | 111 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 111 insertions(+), 110 deletions(-) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index cc0974aeda..506f1f1d75 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -53954,116 +53954,6 @@ Rust.") (description "This package provides core APIs for Rayon.") (license (list license:asl2.0 license:expat)))) -(define-public rust-rcgen-0.11 - (package - (name "rust-rcgen") - (version "0.11.3") - (source (origin - (method url-fetch) - (uri (crate-uri "rcgen" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "1iivv3xycr9mjfmp522xjqj47nsl5amlzzsfpbxpvg53984g7i2j")) - (modules '((guix build utils))) - (snippet - '(begin - ;; Don't use a vendored botan. - (substitute* "Cargo.toml" - ((".*vendored.*") "")))))) - (build-system cargo-build-system) - (arguments - `(#:cargo-inputs - (("rust-pem" ,rust-pem-3) - ("rust-ring" ,rust-ring-0.16) - ("rust-time" ,rust-time-0.3) - ("rust-x509-parser" ,rust-x509-parser-0.15) - ("rust-yasna" ,rust-yasna-0.5) - ("rust-zeroize" ,rust-zeroize-1)) - #:cargo-development-inputs - (("rust-botan" ,rust-botan-0.10) - ("rust-openssl" ,rust-openssl-0.10) - ("rust-rand" ,rust-rand-0.8) - ("rust-rsa" ,rust-rsa-0.9) - ("rust-rustls-webpki" ,rust-rustls-webpki-0.101) - ("rust-x509-parser" ,rust-x509-parser-0.15)))) - (native-inputs - (list pkg-config)) - (inputs - (list botan openssl)) - (home-page "https://github.com/rustls/rcgen") - (synopsis "Rust X.509 certificate generator") - (description "Rust X.509 certificate generator.") - (license (list license:expat license:asl2.0)))) - -(define-public rust-rcgen-0.10 - (package - (inherit rust-rcgen-0.11) - (name "rust-rcgen") - (version "0.10.0") - (source - (origin - (method url-fetch) - (uri (crate-uri "rcgen" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 "0nvqgr697xzdzaavkcwcl59kxw7xfx9zdhdzx49fm3gkwbpq9gpz")) - (snippet - #~(begin (use-modules (guix build utils)) - ;; Don't use a vendored botan. - (substitute* "Cargo.toml" - ((".*vendored.*") "")))))) - (arguments - `(#:cargo-inputs (("rust-pem" ,rust-pem-1) - ("rust-ring" ,rust-ring-0.16) - ("rust-time" ,rust-time-0.3) - ("rust-x509-parser" ,rust-x509-parser-0.14) - ("rust-yasna" ,rust-yasna-0.5) - ("rust-zeroize" ,rust-zeroize-1)) - #:cargo-development-inputs (("rust-botan" ,rust-botan-0.8) - ("rust-openssl" ,rust-openssl-0.10) - ("rust-rand" ,rust-rand-0.8) - ("rust-rsa" ,rust-rsa-0.6) - ("rust-webpki" ,rust-webpki-0.22) - ("rust-x509-parser" ,rust-x509-parser-0.14)))))) - -(define-public rust-rcgen-0.8 - (package - (inherit rust-rcgen-0.11) - (name "rust-rcgen") - (version "0.8.14") - (source (origin - (method url-fetch) - (uri (crate-uri "rcgen" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 "19qvlcz8kl046q85xa40p3xg7l78jganj83hdbawjhs17x0d24ar")) - (modules '((guix build utils))) - (snippet - '(begin - ;; Don't use a vendored botan. - (substitute* "Cargo.toml" - ((".*vendored.*") "")))))) - (arguments - `(#:cargo-test-flags - '("--release" "--" - "--skip=tests::test_dt_to_generalized" - "--skip=tests::test_dt_utc_strip_nanos") - #:cargo-inputs - (("rust-chrono" ,rust-chrono-0.4) - ("rust-pem" ,rust-pem-1) - ("rust-ring" ,rust-ring-0.16) - ("rust-x509-parser" ,rust-x509-parser-0.12) - ("rust-yasna" ,rust-yasna-0.4) - ("rust-zeroize" ,rust-zeroize-1)) - #:cargo-development-inputs - (("rust-botan" ,rust-botan-0.8) - ("rust-openssl" ,rust-openssl-0.10) - ("rust-rand" ,rust-rand-0.8) - ("rust-rsa" ,rust-rsa-0.5) - ("rust-webpki" ,rust-webpki-0.22) - ("rust-x509-parser" ,rust-x509-parser-0.12)))))) - (define-public rust-rctree-0.5 (package (name "rust-rctree") diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index c21d7f3048..99dbf8e013 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -36,6 +36,7 @@ #:use-module (gnu packages crates-io) #:use-module (gnu packages crates-web) #:use-module (gnu packages crates-windows) + #:use-module (gnu packages crypto) #:use-module (gnu packages pkg-config) #:use-module (gnu packages rust-apps) #:use-module (gnu packages tls)) @@ -132,6 +133,116 @@ implementation.") (license (list license:expat license:asl2.0)))) +(define-public rust-rcgen-0.11 + (package + (name "rust-rcgen") + (version "0.11.3") + (source (origin + (method url-fetch) + (uri (crate-uri "rcgen" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1iivv3xycr9mjfmp522xjqj47nsl5amlzzsfpbxpvg53984g7i2j")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Don't use a vendored botan. + (substitute* "Cargo.toml" + ((".*vendored.*") "")))))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs + (("rust-pem" ,rust-pem-3) + ("rust-ring" ,rust-ring-0.16) + ("rust-time" ,rust-time-0.3) + ("rust-x509-parser" ,rust-x509-parser-0.15) + ("rust-yasna" ,rust-yasna-0.5) + ("rust-zeroize" ,rust-zeroize-1)) + #:cargo-development-inputs + (("rust-botan" ,rust-botan-0.10) + ("rust-openssl" ,rust-openssl-0.10) + ("rust-rand" ,rust-rand-0.8) + ("rust-rsa" ,rust-rsa-0.9) + ("rust-rustls-webpki" ,rust-rustls-webpki-0.101) + ("rust-x509-parser" ,rust-x509-parser-0.15)))) + (native-inputs + (list pkg-config)) + (inputs + (list botan openssl)) + (home-page "https://github.com/rustls/rcgen") + (synopsis "Rust X.509 certificate generator") + (description "Rust X.509 certificate generator.") + (license (list license:expat license:asl2.0)))) + +(define-public rust-rcgen-0.10 + (package + (inherit rust-rcgen-0.11) + (name "rust-rcgen") + (version "0.10.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "rcgen" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0nvqgr697xzdzaavkcwcl59kxw7xfx9zdhdzx49fm3gkwbpq9gpz")) + (snippet + #~(begin (use-modules (guix build utils)) + ;; Don't use a vendored botan. + (substitute* "Cargo.toml" + ((".*vendored.*") "")))))) + (arguments + `(#:cargo-inputs (("rust-pem" ,rust-pem-1) + ("rust-ring" ,rust-ring-0.16) + ("rust-time" ,rust-time-0.3) + ("rust-x509-parser" ,rust-x509-parser-0.14) + ("rust-yasna" ,rust-yasna-0.5) + ("rust-zeroize" ,rust-zeroize-1)) + #:cargo-development-inputs (("rust-botan" ,rust-botan-0.8) + ("rust-openssl" ,rust-openssl-0.10) + ("rust-rand" ,rust-rand-0.8) + ("rust-rsa" ,rust-rsa-0.6) + ("rust-webpki" ,rust-webpki-0.22) + ("rust-x509-parser" ,rust-x509-parser-0.14)))))) + +(define-public rust-rcgen-0.8 + (package + (inherit rust-rcgen-0.11) + (name "rust-rcgen") + (version "0.8.14") + (source (origin + (method url-fetch) + (uri (crate-uri "rcgen" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "19qvlcz8kl046q85xa40p3xg7l78jganj83hdbawjhs17x0d24ar")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Don't use a vendored botan. + (substitute* "Cargo.toml" + ((".*vendored.*") "")))))) + (arguments + `(#:cargo-test-flags + '("--release" "--" + "--skip=tests::test_dt_to_generalized" + "--skip=tests::test_dt_utc_strip_nanos") + #:cargo-inputs + (("rust-chrono" ,rust-chrono-0.4) + ("rust-pem" ,rust-pem-1) + ("rust-ring" ,rust-ring-0.16) + ("rust-x509-parser" ,rust-x509-parser-0.12) + ("rust-yasna" ,rust-yasna-0.4) + ("rust-zeroize" ,rust-zeroize-1)) + #:cargo-development-inputs + (("rust-botan" ,rust-botan-0.8) + ("rust-openssl" ,rust-openssl-0.10) + ("rust-rand" ,rust-rand-0.8) + ("rust-rsa" ,rust-rsa-0.5) + ("rust-webpki" ,rust-webpki-0.22) + ("rust-x509-parser" ,rust-x509-parser-0.12)))))) + (define-public rust-rustls-0.21 (package (name "rust-rustls") -- cgit v1.2.3 From f02ea1d9a48cd8e11c9417c38dada03793cd8e89 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 21 Jan 2024 20:14:14 +0200 Subject: gnu: rust-x509-parser: Move to (gnu packages crates-tls). * gnu/packages/crates-io.scm (rust-x509-parser-0.15, rust-x509-parser-0.14, rust-x509-parser-0.12): Move from here ... * gnu/packages/crates-tls.scm: ... to here. Change-Id: If01b17cf9b418e15616f1b80cefe6b071c8a18b0 --- gnu/packages/crates-apple.scm | 3 +- gnu/packages/crates-io.scm | 83 ------------------------------------------- gnu/packages/crates-tls.scm | 83 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 85 insertions(+), 84 deletions(-) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-apple.scm b/gnu/packages/crates-apple.scm index 806d0adc53..df1f2add34 100644 --- a/gnu/packages/crates-apple.scm +++ b/gnu/packages/crates-apple.scm @@ -36,7 +36,8 @@ #:use-module (guix utils) #:use-module (gnu packages) #:use-module (gnu packages crates-graphics) - #:use-module (gnu packages crates-io)) + #:use-module (gnu packages crates-io) + #:use-module (gnu packages crates-tls)) (define-public rust-block-0.1 (package diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index 9c4ec7640b..370b87ea9e 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -79135,89 +79135,6 @@ non-cryptographic hashing algorithm and random number generator.") "This package provides a collection of utility functions.") (license license:expat))) -(define-public rust-x509-parser-0.15 - (package - (name "rust-x509-parser") - (version "0.15.0") - (source (origin - (method url-fetch) - (uri (crate-uri "x509-parser" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "0d7nshccpnybbh8mypirplf4bqxiy36bgh4rrd7jzng19bsw5c5s")))) - (build-system cargo-build-system) - (arguments - `(#:cargo-inputs - (("rust-asn1-rs" ,rust-asn1-rs-0.5) - ("rust-data-encoding" ,rust-data-encoding-2) - ("rust-der-parser" ,rust-der-parser-8) - ("rust-lazy-static" ,rust-lazy-static-1) - ("rust-nom" ,rust-nom-7) - ("rust-oid-registry" ,rust-oid-registry-0.6) - ("rust-ring" ,rust-ring-0.16) - ("rust-rusticata-macros" ,rust-rusticata-macros-4) - ("rust-thiserror" ,rust-thiserror-1) - ("rust-time" ,rust-time-0.3)))) - (home-page "https://github.com/rusticata/x509-parser") - (synopsis "X.509 parser written in pure Rust") - (description "This crate provides a parser for the X.509 v3 format (RFC -5280 certificates).") - (license (list license:expat license:asl2.0)))) - -(define-public rust-x509-parser-0.14 - (package - (inherit rust-x509-parser-0.15) - (name "rust-x509-parser") - (version "0.14.0") - (source - (origin - (method url-fetch) - (uri (crate-uri "x509-parser" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 "1j7b3xxpwik38y9rajglmhis551gj3zz5irw1vj1bqkwnsvvxv70")))) - (arguments - `(#:cargo-inputs (("rust-asn1-rs" ,rust-asn1-rs-0.5) - ("rust-base64" ,rust-base64-0.13) - ("rust-data-encoding" ,rust-data-encoding-2) - ("rust-der-parser" ,rust-der-parser-8) - ("rust-lazy-static" ,rust-lazy-static-1) - ("rust-nom" ,rust-nom-7) - ("rust-oid-registry" ,rust-oid-registry-0.6) - ("rust-ring" ,rust-ring-0.16) - ("rust-rusticata-macros" ,rust-rusticata-macros-4) - ("rust-thiserror" ,rust-thiserror-1) - ("rust-time" ,rust-time-0.3)))))) - -(define-public rust-x509-parser-0.12 - (package - (inherit rust-x509-parser-0.15) - (name "rust-x509-parser") - (version "0.12.0") - (source - (origin - (method url-fetch) - (uri (crate-uri "x509-parser" version)) - (file-name - (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "1vanwazknxwd1kmlp443bpph9qyas021ayqk6iljxdscm0v0ijgz")))) - (arguments - `(#:skip-build? #t - #:cargo-inputs - (("rust-base64" ,rust-base64-0.13) - ("rust-chrono" ,rust-chrono-0.4) - ("rust-data-encoding" ,rust-data-encoding-2) - ("rust-der-parser" ,rust-der-parser-6) - ("rust-lazy-static" ,rust-lazy-static-1) - ("rust-nom" ,rust-nom-7) - ("rust-oid-registry" ,rust-oid-registry-0.2) - ("rust-ring" ,rust-ring-0.16) - ("rust-rusticata-macros" ,rust-rusticata-macros-4) - ("rust-thiserror" ,rust-thiserror-1)))))) - (define-public rust-x86-0.52 (package (name "rust-x86") diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index 99dbf8e013..509c407dd8 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -739,3 +739,86 @@ PEM-encodings commonly used to store keys and certificates at rest.") (synopsis "Parser for the TLS protocol") (description "This package provides a Rust parser for the TLS protocol.") (license (list license:expat license:asl2.0)))) + +(define-public rust-x509-parser-0.15 + (package + (name "rust-x509-parser") + (version "0.15.0") + (source (origin + (method url-fetch) + (uri (crate-uri "x509-parser" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0d7nshccpnybbh8mypirplf4bqxiy36bgh4rrd7jzng19bsw5c5s")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs + (("rust-asn1-rs" ,rust-asn1-rs-0.5) + ("rust-data-encoding" ,rust-data-encoding-2) + ("rust-der-parser" ,rust-der-parser-8) + ("rust-lazy-static" ,rust-lazy-static-1) + ("rust-nom" ,rust-nom-7) + ("rust-oid-registry" ,rust-oid-registry-0.6) + ("rust-ring" ,rust-ring-0.16) + ("rust-rusticata-macros" ,rust-rusticata-macros-4) + ("rust-thiserror" ,rust-thiserror-1) + ("rust-time" ,rust-time-0.3)))) + (home-page "https://github.com/rusticata/x509-parser") + (synopsis "X.509 parser written in pure Rust") + (description "This crate provides a parser for the X.509 v3 format (RFC +5280 certificates).") + (license (list license:expat license:asl2.0)))) + +(define-public rust-x509-parser-0.14 + (package + (inherit rust-x509-parser-0.15) + (name "rust-x509-parser") + (version "0.14.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "x509-parser" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1j7b3xxpwik38y9rajglmhis551gj3zz5irw1vj1bqkwnsvvxv70")))) + (arguments + `(#:cargo-inputs (("rust-asn1-rs" ,rust-asn1-rs-0.5) + ("rust-base64" ,rust-base64-0.13) + ("rust-data-encoding" ,rust-data-encoding-2) + ("rust-der-parser" ,rust-der-parser-8) + ("rust-lazy-static" ,rust-lazy-static-1) + ("rust-nom" ,rust-nom-7) + ("rust-oid-registry" ,rust-oid-registry-0.6) + ("rust-ring" ,rust-ring-0.16) + ("rust-rusticata-macros" ,rust-rusticata-macros-4) + ("rust-thiserror" ,rust-thiserror-1) + ("rust-time" ,rust-time-0.3)))))) + +(define-public rust-x509-parser-0.12 + (package + (inherit rust-x509-parser-0.15) + (name "rust-x509-parser") + (version "0.12.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "x509-parser" version)) + (file-name + (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1vanwazknxwd1kmlp443bpph9qyas021ayqk6iljxdscm0v0ijgz")))) + (arguments + `(#:skip-build? #t + #:cargo-inputs + (("rust-base64" ,rust-base64-0.13) + ("rust-chrono" ,rust-chrono-0.4) + ("rust-data-encoding" ,rust-data-encoding-2) + ("rust-der-parser" ,rust-der-parser-6) + ("rust-lazy-static" ,rust-lazy-static-1) + ("rust-nom" ,rust-nom-7) + ("rust-oid-registry" ,rust-oid-registry-0.2) + ("rust-ring" ,rust-ring-0.16) + ("rust-rusticata-macros" ,rust-rusticata-macros-4) + ("rust-thiserror" ,rust-thiserror-1)))))) -- cgit v1.2.3 From f043dad8526ad5c374785eb865753842a87d6af9 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 22 Jan 2024 08:28:32 +0200 Subject: gnu: rust-der: Move to (gnu packages crates-tls). * gnu/packages/crates-io.scm (rust-der-0.7, rust-der-0.6, rust-der-0.5, rust-der-0.4, rust-der-derive-0.7, rust-der-derive-0.6, rust-der-derive-0.5, rust-der-derive-0.4, rust-der-oid-macro-0.5, rust-der-parser-8, rust-der-parser-7, rust-der-parser-6): Move from here ... * gnu/packages/crates-tls.scm: ... to here. Change-Id: If4f61227b24a94a85c729c4c665c575c36ba710e --- gnu/packages/crates-crypto.scm | 1 + gnu/packages/crates-io.scm | 293 ----------------------------------------- gnu/packages/crates-tls.scm | 293 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 294 insertions(+), 293 deletions(-) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-crypto.scm b/gnu/packages/crates-crypto.scm index 4bff4f9dfe..b750a97817 100644 --- a/gnu/packages/crates-crypto.scm +++ b/gnu/packages/crates-crypto.scm @@ -46,6 +46,7 @@ #:use-module (gnu packages compression) #:use-module (gnu packages crates-apple) #:use-module (gnu packages crates-io) + #:use-module (gnu packages crates-tls) #:use-module (gnu packages crates-windows) #:use-module (gnu packages crypto) #:use-module (gnu packages golang) diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index 370b87ea9e..9cc04ab8f8 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -18125,299 +18125,6 @@ strings.") (description "Demo of proc-macro-hack.") (license (list license:expat license:asl2.0)))) -(define-public rust-der-0.7 - (package - (name "rust-der") - (version "0.7.5") - (source (origin - (method url-fetch) - (uri (crate-uri "der" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "06f2clallhpjc51s3dc7mpcw5ms3jak727qc5yrfg3ncrpzqvr85")))) - (build-system cargo-build-system) - (arguments - `(#:cargo-inputs - (("rust-arbitrary" ,rust-arbitrary-1) - ("rust-const-oid" ,rust-const-oid-0.9) - ("rust-der-derive" ,rust-der-derive-0.7) - ("rust-flagset" ,rust-flagset-0.4) - ("rust-pem-rfc7468" ,rust-pem-rfc7468-0.7) - ("rust-time" ,rust-time-0.3) - ("rust-zeroize" ,rust-zeroize-1)) - #:cargo-development-inputs - (("rust-hex-literal" ,rust-hex-literal-0.4) - ("rust-proptest" ,rust-proptest-1)))) - (home-page "https://github.com/RustCrypto/formats/tree/master/der") - (synopsis - "Implementation of the Distinguished Encoding Rules (DER)") - (description - "This package provides a pure Rust embedded-friendly implementation of -the Distinguished Encoding Rules (DER) for Abstract Syntax Notation One -(ASN.1) as described in ITU X.690 with full support for heapless no_std -targets") - (license (list license:asl2.0 license:expat)))) - -(define-public rust-der-0.6 - (package - (inherit rust-der-0.7) - (name "rust-der") - (version "0.6.1") - (source (origin - (method url-fetch) - (uri (crate-uri "der" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "1pnl3y52m1s6srxpfrfbazf6qilzq8fgksk5dv79nxaybjk6g97i")))) - (arguments - `(#:cargo-inputs - (("rust-const-oid" ,rust-const-oid-0.9) - ("rust-der-derive" ,rust-der-derive-0.6) - ("rust-flagset" ,rust-flagset-0.4) - ("rust-pem-rfc7468" ,rust-pem-rfc7468-0.6) - ("rust-time" ,rust-time-0.3) - ("rust-zeroize" ,rust-zeroize-1)) - #:cargo-development-inputs - (("rust-hex-literal" ,rust-hex-literal-0.3) - ("rust-proptest" ,rust-proptest-1)))))) - -(define-public rust-der-0.5 - (package - (inherit rust-der-0.7) - (name "rust-der") - (version "0.5.1") - (source - (origin - (method url-fetch) - (uri (crate-uri "der" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 "0p3h7nszn7jhjacpmkjrcyx5g8p3ma1qhxfy3397m7l3fdfq26b9")))) - (arguments - `(#:cargo-inputs (("rust-const-oid" ,rust-const-oid-0.7) - ("rust-crypto-bigint" ,rust-crypto-bigint-0.3) - ("rust-der-derive" ,rust-der-derive-0.5) - ("rust-pem-rfc7468" ,rust-pem-rfc7468-0.3) - ("rust-time" ,rust-time-0.3)) - #:cargo-development-inputs (("rust-hex-literal" ,rust-hex-literal-0.3) - ("rust-proptest" ,rust-proptest-1)))))) - -(define-public rust-der-0.4 - (package - (inherit rust-der-0.7) - (name "rust-der") - (version "0.4.5") - (source - (origin - (method url-fetch) - (uri (crate-uri "der" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 "1x4k0jln8va1657cghl40l6p7hyvr1ixz71v9cd6imwmgp51rdvr")))) - (arguments - `(#:skip-build? - #t ; FIXME - #:cargo-inputs - (("rust-const-oid" ,rust-const-oid-0.6) - ("rust-crypto-bigint" ,rust-crypto-bigint-0.2) - ("rust-der-derive" ,rust-der-derive-0.4)))))) - -(define-public rust-der-derive-0.7 - (package - (name "rust-der-derive") - (version "0.7.1") - (source (origin - (method url-fetch) - (uri (crate-uri "der_derive" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "0cmyza28s52wfb67ymydjmvsc4m3sfp98dv9vprx6ibmdfx94iqi")))) - (build-system cargo-build-system) - (arguments - `(#:cargo-inputs - (("rust-proc-macro-error" ,rust-proc-macro-error-1) - ("rust-proc-macro2" ,rust-proc-macro2-1) - ("rust-quote" ,rust-quote-1) - ("rust-syn" ,rust-syn-2)))) - (home-page "https://github.com/RustCrypto/formats/tree/master/der/derive") - (synopsis - "Custom derive support for the `der` crate's `Choice` and `Sequence` traits") - (description - "This package provides a custom derive support for the `der` crate's -`Choice` and `Sequence` traits.") - (license (list license:asl2.0 license:expat)))) - -(define-public rust-der-derive-0.6 - (package - (inherit rust-der-derive-0.7) - (name "rust-der-derive") - (version "0.6.1") - (source (origin - (method url-fetch) - (uri (crate-uri "der_derive" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "1fg3dv4cjjwd4a6dh62ch2gb477s1pvwh5s8wbg567rsbgdivxwf")))) - (arguments - `(#:cargo-inputs - (("rust-proc-macro-error" ,rust-proc-macro-error-1) - ("rust-proc-macro2" ,rust-proc-macro2-1) - ("rust-quote" ,rust-quote-1) - ("rust-syn" ,rust-syn-1)))))) - -(define-public rust-der-derive-0.5 - (package - (inherit rust-der-derive-0.7) - (name "rust-der-derive") - (version "0.5.0") - (source - (origin - (method url-fetch) - (uri (crate-uri "der_derive" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 "1zw4p6yqklv4i76ms2a0gcmna648337r379d5ljgpbir5cyqylrs")))) - (arguments - `(#:cargo-inputs (("rust-proc-macro-error" ,rust-proc-macro-error-1) - ("rust-proc-macro2" ,rust-proc-macro2-1) - ("rust-quote" ,rust-quote-1) - ("rust-syn" ,rust-syn-1)))))) - -(define-public rust-der-derive-0.4 - (package - (inherit rust-der-derive-0.7) - (name "rust-der-derive") - (version "0.4.1") - (source - (origin - (method url-fetch) - (uri (crate-uri "der_derive" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 "0snv85yfy9iln05qsgbhwr1159gd0jfrgzj5dkrnricdc0y3pvca")))) - (arguments - `(#:skip-build? - #t ; FIXME - #:cargo-inputs - (("rust-proc-macro2" ,rust-proc-macro2-1) - ("rust-quote" ,rust-quote-1) - ("rust-syn" ,rust-syn-1) - ("rust-synstructure" ,rust-synstructure-0.12)))))) - -(define-public rust-der-oid-macro-0.5 - (package - (name "rust-der-oid-macro") - (version "0.5.0") - (source - (origin - (method url-fetch) - (uri (crate-uri "der-oid-macro" version)) - (file-name - (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "0dply8g2p72hfhyymkrkr7fjqy844drj19xbrfkqrp55nq4z4fn7")))) - (build-system cargo-build-system) - (arguments - `(#:skip-build? #t - #:cargo-inputs - (("rust-num-bigint" ,rust-num-bigint-0.4) - ("rust-num-traits" ,rust-num-traits-0.2) - ("rust-syn" ,rust-syn-1)))) - (home-page "https://github.com/rusticata/der-parser") - (synopsis "Macro to encode DER oids at compile time") - (description - "This crate provides a macro to encode DER oids at compile time.") - (license (list license:expat license:asl2.0)))) - -(define-public rust-der-parser-8 - (package - (name "rust-der-parser") - (version "8.2.0") - (source (origin - (method url-fetch) - (uri (crate-uri "der-parser" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "07mnz9y395zyxwj7nam2dbzkqdngfraxp2i7y2714dxmpbxpdmnv")))) - (build-system cargo-build-system) - (arguments - `(#:cargo-inputs - (("rust-asn1-rs" ,rust-asn1-rs-0.5) - ("rust-cookie-factory" ,rust-cookie-factory-0.3) - ("rust-displaydoc" ,rust-displaydoc-0.2) - ("rust-nom" ,rust-nom-7) - ("rust-num-bigint" ,rust-num-bigint-0.4) - ("rust-num-traits" ,rust-num-traits-0.2) - ("rust-rusticata-macros" ,rust-rusticata-macros-4)) - #:cargo-development-inputs - (("rust-hex-literal" ,rust-hex-literal-0.3) - ("rust-pretty-assertions" ,rust-pretty-assertions-1) - ("rust-test-case" ,rust-test-case-3)))) - (home-page "https://github.com/rusticata/der-parser") - (synopsis "BER/DER parser written in pure Rust") - (description "This crate provides a parser for Basic Encoding Rules (BER -[X.690]) and Distinguished Encoding Rules(DER [X.690]), implemented with the -@code{nom} parser combinator framework.") - (license (list license:expat license:asl2.0)))) - -(define-public rust-der-parser-7 - (package - (inherit rust-der-parser-8) - (name "rust-der-parser") - (version "7.0.0") - (source - (origin - (method url-fetch) - (uri (crate-uri "der-parser" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 "10kfa2gzl3x20mwgrd43cyi79xgkqxyzcyrh0xylv4apa33qlfgy")))) - (arguments - `(#:cargo-inputs (("rust-asn1-rs" ,rust-asn1-rs-0.3) - ("rust-cookie-factory" ,rust-cookie-factory-0.3) - ("rust-displaydoc" ,rust-displaydoc-0.2) - ("rust-nom" ,rust-nom-7) - ("rust-num-bigint" ,rust-num-bigint-0.4) - ("rust-num-traits" ,rust-num-traits-0.2) - ("rust-rusticata-macros" ,rust-rusticata-macros-4)) - #:cargo-development-inputs - (("rust-hex-literal" ,rust-hex-literal-0.3) - ("rust-pretty-assertions" ,rust-pretty-assertions-1) - ("rust-test-case" ,rust-test-case-1)))))) - -(define-public rust-der-parser-6 - (package - (inherit rust-der-parser-8) - (name "rust-der-parser") - (version "6.0.0") - (source - (origin - (method url-fetch) - (uri (crate-uri "der-parser" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 "0gn465dncghmj52k8dlkl71wkmlz5zc6jfjgj9ra2knf22ryy1wq")))) - (arguments - `(#:skip-build? #t - #:cargo-inputs - (("rust-bitvec" ,rust-bitvec-0.22) - ("rust-cookie-factory" ,rust-cookie-factory-0.3) - ("rust-der-oid-macro" ,rust-der-oid-macro-0.5) - ("rust-nom" ,rust-nom-7) - ("rust-num-bigint" ,rust-num-bigint-0.4) - ("rust-num-traits" ,rust-num-traits-0.2) - ("rust-rusticata-macros" ,rust-rusticata-macros-4)) - #:cargo-development-inputs - (("rust-hex-literal" ,rust-hex-literal-0.3) - ("rust-pretty-assertions" ,rust-pretty-assertions-0.7) - ("rust-test-case" ,rust-test-case-1)))))) - (define-public rust-deranged-0.3 (package (name "rust-deranged") diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index 509c407dd8..626b12975b 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -94,6 +94,299 @@ "This package provides asynchronous TLS/SSL streams using Rustls.") (license (list license:expat license:asl2.0)))) +(define-public rust-der-0.7 + (package + (name "rust-der") + (version "0.7.5") + (source (origin + (method url-fetch) + (uri (crate-uri "der" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "06f2clallhpjc51s3dc7mpcw5ms3jak727qc5yrfg3ncrpzqvr85")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs + (("rust-arbitrary" ,rust-arbitrary-1) + ("rust-const-oid" ,rust-const-oid-0.9) + ("rust-der-derive" ,rust-der-derive-0.7) + ("rust-flagset" ,rust-flagset-0.4) + ("rust-pem-rfc7468" ,rust-pem-rfc7468-0.7) + ("rust-time" ,rust-time-0.3) + ("rust-zeroize" ,rust-zeroize-1)) + #:cargo-development-inputs + (("rust-hex-literal" ,rust-hex-literal-0.4) + ("rust-proptest" ,rust-proptest-1)))) + (home-page "https://github.com/RustCrypto/formats/tree/master/der") + (synopsis + "Implementation of the Distinguished Encoding Rules (DER)") + (description + "This package provides a pure Rust embedded-friendly implementation of +the Distinguished Encoding Rules (DER) for Abstract Syntax Notation One +(ASN.1) as described in ITU X.690 with full support for heapless no_std +targets") + (license (list license:asl2.0 license:expat)))) + +(define-public rust-der-0.6 + (package + (inherit rust-der-0.7) + (name "rust-der") + (version "0.6.1") + (source (origin + (method url-fetch) + (uri (crate-uri "der" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1pnl3y52m1s6srxpfrfbazf6qilzq8fgksk5dv79nxaybjk6g97i")))) + (arguments + `(#:cargo-inputs + (("rust-const-oid" ,rust-const-oid-0.9) + ("rust-der-derive" ,rust-der-derive-0.6) + ("rust-flagset" ,rust-flagset-0.4) + ("rust-pem-rfc7468" ,rust-pem-rfc7468-0.6) + ("rust-time" ,rust-time-0.3) + ("rust-zeroize" ,rust-zeroize-1)) + #:cargo-development-inputs + (("rust-hex-literal" ,rust-hex-literal-0.3) + ("rust-proptest" ,rust-proptest-1)))))) + +(define-public rust-der-0.5 + (package + (inherit rust-der-0.7) + (name "rust-der") + (version "0.5.1") + (source + (origin + (method url-fetch) + (uri (crate-uri "der" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0p3h7nszn7jhjacpmkjrcyx5g8p3ma1qhxfy3397m7l3fdfq26b9")))) + (arguments + `(#:cargo-inputs (("rust-const-oid" ,rust-const-oid-0.7) + ("rust-crypto-bigint" ,rust-crypto-bigint-0.3) + ("rust-der-derive" ,rust-der-derive-0.5) + ("rust-pem-rfc7468" ,rust-pem-rfc7468-0.3) + ("rust-time" ,rust-time-0.3)) + #:cargo-development-inputs (("rust-hex-literal" ,rust-hex-literal-0.3) + ("rust-proptest" ,rust-proptest-1)))))) + +(define-public rust-der-0.4 + (package + (inherit rust-der-0.7) + (name "rust-der") + (version "0.4.5") + (source + (origin + (method url-fetch) + (uri (crate-uri "der" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1x4k0jln8va1657cghl40l6p7hyvr1ixz71v9cd6imwmgp51rdvr")))) + (arguments + `(#:skip-build? + #t ; FIXME + #:cargo-inputs + (("rust-const-oid" ,rust-const-oid-0.6) + ("rust-crypto-bigint" ,rust-crypto-bigint-0.2) + ("rust-der-derive" ,rust-der-derive-0.4)))))) + +(define-public rust-der-derive-0.7 + (package + (name "rust-der-derive") + (version "0.7.1") + (source (origin + (method url-fetch) + (uri (crate-uri "der_derive" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0cmyza28s52wfb67ymydjmvsc4m3sfp98dv9vprx6ibmdfx94iqi")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs + (("rust-proc-macro-error" ,rust-proc-macro-error-1) + ("rust-proc-macro2" ,rust-proc-macro2-1) + ("rust-quote" ,rust-quote-1) + ("rust-syn" ,rust-syn-2)))) + (home-page "https://github.com/RustCrypto/formats/tree/master/der/derive") + (synopsis + "Custom derive support for the `der` crate's `Choice` and `Sequence` traits") + (description + "This package provides a custom derive support for the `der` crate's +`Choice` and `Sequence` traits.") + (license (list license:asl2.0 license:expat)))) + +(define-public rust-der-derive-0.6 + (package + (inherit rust-der-derive-0.7) + (name "rust-der-derive") + (version "0.6.1") + (source (origin + (method url-fetch) + (uri (crate-uri "der_derive" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1fg3dv4cjjwd4a6dh62ch2gb477s1pvwh5s8wbg567rsbgdivxwf")))) + (arguments + `(#:cargo-inputs + (("rust-proc-macro-error" ,rust-proc-macro-error-1) + ("rust-proc-macro2" ,rust-proc-macro2-1) + ("rust-quote" ,rust-quote-1) + ("rust-syn" ,rust-syn-1)))))) + +(define-public rust-der-derive-0.5 + (package + (inherit rust-der-derive-0.7) + (name "rust-der-derive") + (version "0.5.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "der_derive" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1zw4p6yqklv4i76ms2a0gcmna648337r379d5ljgpbir5cyqylrs")))) + (arguments + `(#:cargo-inputs (("rust-proc-macro-error" ,rust-proc-macro-error-1) + ("rust-proc-macro2" ,rust-proc-macro2-1) + ("rust-quote" ,rust-quote-1) + ("rust-syn" ,rust-syn-1)))))) + +(define-public rust-der-derive-0.4 + (package + (inherit rust-der-derive-0.7) + (name "rust-der-derive") + (version "0.4.1") + (source + (origin + (method url-fetch) + (uri (crate-uri "der_derive" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0snv85yfy9iln05qsgbhwr1159gd0jfrgzj5dkrnricdc0y3pvca")))) + (arguments + `(#:skip-build? + #t ; FIXME + #:cargo-inputs + (("rust-proc-macro2" ,rust-proc-macro2-1) + ("rust-quote" ,rust-quote-1) + ("rust-syn" ,rust-syn-1) + ("rust-synstructure" ,rust-synstructure-0.12)))))) + +(define-public rust-der-oid-macro-0.5 + (package + (name "rust-der-oid-macro") + (version "0.5.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "der-oid-macro" version)) + (file-name + (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0dply8g2p72hfhyymkrkr7fjqy844drj19xbrfkqrp55nq4z4fn7")))) + (build-system cargo-build-system) + (arguments + `(#:skip-build? #t + #:cargo-inputs + (("rust-num-bigint" ,rust-num-bigint-0.4) + ("rust-num-traits" ,rust-num-traits-0.2) + ("rust-syn" ,rust-syn-1)))) + (home-page "https://github.com/rusticata/der-parser") + (synopsis "Macro to encode DER oids at compile time") + (description + "This crate provides a macro to encode DER oids at compile time.") + (license (list license:expat license:asl2.0)))) + +(define-public rust-der-parser-8 + (package + (name "rust-der-parser") + (version "8.2.0") + (source (origin + (method url-fetch) + (uri (crate-uri "der-parser" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "07mnz9y395zyxwj7nam2dbzkqdngfraxp2i7y2714dxmpbxpdmnv")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs + (("rust-asn1-rs" ,rust-asn1-rs-0.5) + ("rust-cookie-factory" ,rust-cookie-factory-0.3) + ("rust-displaydoc" ,rust-displaydoc-0.2) + ("rust-nom" ,rust-nom-7) + ("rust-num-bigint" ,rust-num-bigint-0.4) + ("rust-num-traits" ,rust-num-traits-0.2) + ("rust-rusticata-macros" ,rust-rusticata-macros-4)) + #:cargo-development-inputs + (("rust-hex-literal" ,rust-hex-literal-0.3) + ("rust-pretty-assertions" ,rust-pretty-assertions-1) + ("rust-test-case" ,rust-test-case-3)))) + (home-page "https://github.com/rusticata/der-parser") + (synopsis "BER/DER parser written in pure Rust") + (description "This crate provides a parser for Basic Encoding Rules (BER +[X.690]) and Distinguished Encoding Rules(DER [X.690]), implemented with the +@code{nom} parser combinator framework.") + (license (list license:expat license:asl2.0)))) + +(define-public rust-der-parser-7 + (package + (inherit rust-der-parser-8) + (name "rust-der-parser") + (version "7.0.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "der-parser" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "10kfa2gzl3x20mwgrd43cyi79xgkqxyzcyrh0xylv4apa33qlfgy")))) + (arguments + `(#:cargo-inputs (("rust-asn1-rs" ,rust-asn1-rs-0.3) + ("rust-cookie-factory" ,rust-cookie-factory-0.3) + ("rust-displaydoc" ,rust-displaydoc-0.2) + ("rust-nom" ,rust-nom-7) + ("rust-num-bigint" ,rust-num-bigint-0.4) + ("rust-num-traits" ,rust-num-traits-0.2) + ("rust-rusticata-macros" ,rust-rusticata-macros-4)) + #:cargo-development-inputs + (("rust-hex-literal" ,rust-hex-literal-0.3) + ("rust-pretty-assertions" ,rust-pretty-assertions-1) + ("rust-test-case" ,rust-test-case-1)))))) + +(define-public rust-der-parser-6 + (package + (inherit rust-der-parser-8) + (name "rust-der-parser") + (version "6.0.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "der-parser" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0gn465dncghmj52k8dlkl71wkmlz5zc6jfjgj9ra2knf22ryy1wq")))) + (arguments + `(#:skip-build? #t + #:cargo-inputs + (("rust-bitvec" ,rust-bitvec-0.22) + ("rust-cookie-factory" ,rust-cookie-factory-0.3) + ("rust-der-oid-macro" ,rust-der-oid-macro-0.5) + ("rust-nom" ,rust-nom-7) + ("rust-num-bigint" ,rust-num-bigint-0.4) + ("rust-num-traits" ,rust-num-traits-0.2) + ("rust-rusticata-macros" ,rust-rusticata-macros-4)) + #:cargo-development-inputs + (("rust-hex-literal" ,rust-hex-literal-0.3) + ("rust-pretty-assertions" ,rust-pretty-assertions-0.7) + ("rust-test-case" ,rust-test-case-1)))))) + (define-public rust-native-tls-0.2 (package (name "rust-native-tls") -- cgit v1.2.3 From 4063fbf23df3d79d1e19f5653673e0093795558b Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 22 Jan 2024 08:33:35 +0200 Subject: gnu: rust-oid-registry: Move to (gnu packages crates-tls). * gnu/packages/crates-io.scm (rust-oid-registry-0.6, rust-oid-registry-0.4, rust-oid-registry-0.3, rust-oid-registry-0.2): Move from here ... * gnu/packages/crates-tls.scm: ... to here. Change-Id: I81ae6f37fd22d328a168afd3fd5807e61538afdb --- gnu/packages/crates-io.scm | 67 --------------------------------------------- gnu/packages/crates-tls.scm | 67 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 67 deletions(-) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index 9cc04ab8f8..2d352779ab 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -43316,73 +43316,6 @@ Things in odds may move to more appropriate crates if we find them.") spec in pure Rust.") (license license:expat))) -(define-public rust-oid-registry-0.6 - (package - (name "rust-oid-registry") - (version "0.6.1") - (source (origin - (method url-fetch) - (uri (crate-uri "oid-registry" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "1zwvjp3ad6gzn8g8w2hcn9a2xdap0lkzckhlnwp6rabbzdpz7vcv")))) - (build-system cargo-build-system) - (arguments - `(#:cargo-inputs (("rust-asn1-rs" ,rust-asn1-rs-0.5)))) - (home-page "https://github.com/rusticata/oid-registry") - (synopsis "Object Identifier (OID) database") - (description "This crate is a helper crate, containing a database of -OID objects. These objects are intended for use when manipulating ASN.1 -grammars and BER/DER encodings, for example.") - (license (list license:expat license:asl2.0)))) - -(define-public rust-oid-registry-0.4 - (package - (inherit rust-oid-registry-0.6) - (name "rust-oid-registry") - (version "0.4.0") - (source - (origin - (method url-fetch) - (uri (crate-uri "oid-registry" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 "0akbah3j8231ayrp2l1y5d9zmvbvqcsj0sa6s6dz6h85z8bhgqiq")))) - (arguments - `(#:cargo-inputs (("rust-asn1-rs" ,rust-asn1-rs-0.3)))))) - -(define-public rust-oid-registry-0.3 - (package - (inherit rust-oid-registry-0.6) - (name "rust-oid-registry") - (version "0.3.0") - (source - (origin - (method url-fetch) - (uri (crate-uri "oid-registry" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 "1jxr4nqpcsgirl53yndhfhch1gzddkjh27z0p7rbsr2xngcpyj9n")))) - (arguments - `(#:cargo-inputs (("rust-asn1-rs" ,rust-asn1-rs-0.3)))))) - -(define-public rust-oid-registry-0.2 - (package - (inherit rust-oid-registry-0.4) - (name "rust-oid-registry") - (version "0.2.0") - (source (origin - (method url-fetch) - (uri (crate-uri "oid-registry" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "058qip5j5y0i95ckmw67mp73372rq16ci0lcczyq9irv76r4qmgy")))) - (arguments - `(#:skip-build? #t - #:cargo-inputs (("rust-der-parser" ,rust-der-parser-6)))))) - (define-public rust-onig-6 (package (name "rust-onig") diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index 626b12975b..ad4f3ab2d7 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -426,6 +426,73 @@ targets") implementation.") (license (list license:expat license:asl2.0)))) +(define-public rust-oid-registry-0.6 + (package + (name "rust-oid-registry") + (version "0.6.1") + (source (origin + (method url-fetch) + (uri (crate-uri "oid-registry" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1zwvjp3ad6gzn8g8w2hcn9a2xdap0lkzckhlnwp6rabbzdpz7vcv")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs (("rust-asn1-rs" ,rust-asn1-rs-0.5)))) + (home-page "https://github.com/rusticata/oid-registry") + (synopsis "Object Identifier (OID) database") + (description "This crate is a helper crate, containing a database of +OID objects. These objects are intended for use when manipulating ASN.1 +grammars and BER/DER encodings, for example.") + (license (list license:expat license:asl2.0)))) + +(define-public rust-oid-registry-0.4 + (package + (inherit rust-oid-registry-0.6) + (name "rust-oid-registry") + (version "0.4.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "oid-registry" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0akbah3j8231ayrp2l1y5d9zmvbvqcsj0sa6s6dz6h85z8bhgqiq")))) + (arguments + `(#:cargo-inputs (("rust-asn1-rs" ,rust-asn1-rs-0.3)))))) + +(define-public rust-oid-registry-0.3 + (package + (inherit rust-oid-registry-0.6) + (name "rust-oid-registry") + (version "0.3.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "oid-registry" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1jxr4nqpcsgirl53yndhfhch1gzddkjh27z0p7rbsr2xngcpyj9n")))) + (arguments + `(#:cargo-inputs (("rust-asn1-rs" ,rust-asn1-rs-0.3)))))) + +(define-public rust-oid-registry-0.2 + (package + (inherit rust-oid-registry-0.4) + (name "rust-oid-registry") + (version "0.2.0") + (source (origin + (method url-fetch) + (uri (crate-uri "oid-registry" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "058qip5j5y0i95ckmw67mp73372rq16ci0lcczyq9irv76r4qmgy")))) + (arguments + `(#:skip-build? #t + #:cargo-inputs (("rust-der-parser" ,rust-der-parser-6)))))) + (define-public rust-rcgen-0.11 (package (name "rust-rcgen") -- cgit v1.2.3 From a2a475f77804226f8e28b79b642793bb61b2e418 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 22 Jan 2024 08:36:59 +0200 Subject: gnu: rust-asn1: Move to (gnu packages crates-tls). * gnu/packages/crates-io.scm (rust-asn1-0.15, rust-asn1-0.13, rust-asn1-derive-0.15, rust-asn1-derive-0.13, rust-asn1-rs-0.5, rust-asn1-rs-0.3, rust-asn1-rs-derive-0.4, rust-asn1-rs-derive-0.1, rust-asn1-rs-impl-0.1): Move from here ... * gnu/packages/crates-tls.scm: ... to here. Change-Id: I1293490ef4afe2a9609337e996bc8f2b0eb0e3e6 --- gnu/packages/crates-io.scm | 215 ----------------------------------------- gnu/packages/crates-tls.scm | 215 +++++++++++++++++++++++++++++++++++++++++ gnu/packages/python-crypto.scm | 1 + 3 files changed, 216 insertions(+), 215 deletions(-) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index 2d352779ab..133ba3d937 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -2896,221 +2896,6 @@ Askama.") library for Rust.") (license (list license:expat license:asl2.0)))) -(define-public rust-asn1-derive-0.15 - (package - (name "rust-asn1-derive") - (version "0.15.5") - (source - (origin - (method url-fetch) - (uri (crate-uri "asn1_derive" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 "1771kfjycjs4g2acqvxpjy3igfcgg8hychczl1lsqq64za4gj6l6")))) - (build-system cargo-build-system) - (arguments - `(#:cargo-inputs - (("rust-proc-macro2" ,rust-proc-macro2-1) - ("rust-quote" ,rust-quote-1) - ("rust-syn" ,rust-syn-2)))) - (home-page "https://github.com/alex/rust-asn1") - (synopsis "#[derive] support for asn1") - (description - "This package provides #[derive] support for @code{asn1}.") - (license license:bsd-3))) - -(define-public rust-asn1-derive-0.13 - (package - (inherit rust-asn1-derive-0.15) - (name "rust-asn1-derive") - (version "0.13.0") - (source (origin - (method url-fetch) - (uri (crate-uri "asn1_derive" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "1bvqriazb23gysygpzng1dhzjgnlv274q2yj5gpmlpl7jp0pkaxz")))) - (arguments - `(#:skip-build? #t - #:cargo-inputs - (("rust-proc-macro2" ,rust-proc-macro2-1) - ("rust-quote" ,rust-quote-1) - ("rust-syn" ,rust-syn-1)))))) - -(define-public rust-asn1-0.15 - (package - (name "rust-asn1") - (version "0.15.5") - (source - (origin - (method url-fetch) - (uri (crate-uri "asn1" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 "1nzg1gjiyfvpvrf3i7i8j21165snf5livqg6x2sjf9m2i77cngmf")))) - (build-system cargo-build-system) - (arguments - `(#:cargo-inputs - (("rust-asn1-derive" ,rust-asn1-derive-0.15)) - #:cargo-development-inputs - (("rust-libc" ,rust-libc-0.2)))) - (home-page "https://github.com/alex/rust-asn1") - (synopsis "ASN.1 (DER) parser and writer") - (description - "This is a Rust library for parsing and generating ASN.1 data (DER only).") - (license license:bsd-3))) - -(define-public rust-asn1-0.13 - (package - (inherit rust-asn1-0.15) - (name "rust-asn1") - (version "0.13.0") - (source (origin - (method url-fetch) - (uri (crate-uri "asn1" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "1idxxw14h3dvrj72k4g0hx1aqigd986a00cg0yxfw2gfc9gbmzra")))) - (arguments - `(#:cargo-inputs - (("rust-asn1-derive" ,rust-asn1-derive-0.13) - ("rust-chrono" ,rust-chrono-0.4)) - #:cargo-development-inputs - (("rust-libc" ,rust-libc-0.2)))))) - -(define-public rust-asn1-rs-0.5 - (package - (name "rust-asn1-rs") - (version "0.5.2") - (source (origin - (method url-fetch) - (uri (crate-uri "asn1-rs" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "1w7zq0392qs7kkv0nzw50bfqvq7q9zxv48fsp3sxyl83mzfxavvz")))) - (build-system cargo-build-system) - (arguments - `(#:cargo-inputs - (("rust-asn1-rs-derive" ,rust-asn1-rs-derive-0.4) - ("rust-asn1-rs-impl" ,rust-asn1-rs-impl-0.1) - ("rust-bitvec" ,rust-bitvec-1) - ("rust-cookie-factory" ,rust-cookie-factory-0.3) - ("rust-displaydoc" ,rust-displaydoc-0.2) - ("rust-nom" ,rust-nom-7) - ("rust-num-bigint" ,rust-num-bigint-0.4) - ("rust-num-traits" ,rust-num-traits-0.2) - ("rust-rusticata-macros" ,rust-rusticata-macros-4) - ("rust-thiserror" ,rust-thiserror-1) - ("rust-time" ,rust-time-0.3)) - #:cargo-development-inputs - (("rust-colored" ,rust-colored-2) - ("rust-hex-literal" ,rust-hex-literal-0.3) - ("rust-oid-registry" ,rust-oid-registry-0.6) - ("rust-pem" ,rust-pem-1) - ("rust-trybuild" ,rust-trybuild-1)))) - (home-page "https://github.com/rusticata/asn1-rs") - (synopsis "Parser/encoder for ASN.1 BER/DER data") - (description "Parser/encoder for ASN.1 BER/DER data") - (license (list license:expat license:asl2.0)))) - -(define-public rust-asn1-rs-0.3 - (package - (inherit rust-asn1-rs-0.5) - (name "rust-asn1-rs") - (version "0.3.1") - (source - (origin - (method url-fetch) - (uri (crate-uri "asn1-rs" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 "0czsk1nd4dx2k83f7jzkn8klx05wbmblkx1jh51i4c170akhbzrh")))) - (arguments - `(#:cargo-inputs (("rust-asn1-rs-derive" ,rust-asn1-rs-derive-0.1) - ("rust-asn1-rs-impl" ,rust-asn1-rs-impl-0.1) - ("rust-bitvec" ,rust-bitvec-1) - ("rust-cookie-factory" ,rust-cookie-factory-0.3) - ("rust-displaydoc" ,rust-displaydoc-0.2) - ("rust-nom" ,rust-nom-7) - ("rust-num-bigint" ,rust-num-bigint-0.4) - ("rust-num-traits" ,rust-num-traits-0.2) - ("rust-rusticata-macros" ,rust-rusticata-macros-4) - ("rust-thiserror" ,rust-thiserror-1) - ("rust-time" ,rust-time-0.3)) - #:cargo-development-inputs (("rust-colored" ,rust-colored-2) - ("rust-hex-literal" ,rust-hex-literal-0.3) - ("rust-oid-registry" ,rust-oid-registry-0.3) - ("rust-pem" ,rust-pem-1) - ("rust-trybuild" ,rust-trybuild-1)))))) - -(define-public rust-asn1-rs-derive-0.4 - (package - (name "rust-asn1-rs-derive") - (version "0.4.0") - (source (origin - (method url-fetch) - (uri (crate-uri "asn1-rs-derive" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "0v7fgmnzk7jjxv51grhwzcx5bf167nlqwk3vcmq7xblf5s4karbj")))) - (build-system cargo-build-system) - (arguments - `(#:cargo-inputs - (("rust-proc-macro2" ,rust-proc-macro2-1) - ("rust-quote" ,rust-quote-1) - ("rust-syn" ,rust-syn-1) - ("rust-synstructure" ,rust-synstructure-0.12)))) - (home-page "https://github.com/rusticata/asn1-rs") - (synopsis "Derive macros for the `asn1-rs` crate") - (description - "This package provides derive macros for the @code{asn1-rs} crate.") - (license (list license:expat license:asl2.0)))) - -(define-public rust-asn1-rs-derive-0.1 - (package - (inherit rust-asn1-rs-derive-0.4) - (name "rust-asn1-rs-derive") - (version "0.1.0") - (source - (origin - (method url-fetch) - (uri (crate-uri "asn1-rs-derive" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 "1gzf9vab06lk0zjvbr07axx64fndkng2s28bnj27fnwd548pb2yv")))) - (arguments - `(#:cargo-inputs (("rust-proc-macro2" ,rust-proc-macro2-1) - ("rust-quote" ,rust-quote-1) - ("rust-syn" ,rust-syn-1) - ("rust-synstructure" ,rust-synstructure-0.12)))))) - -(define-public rust-asn1-rs-impl-0.1 - (package - (name "rust-asn1-rs-impl") - (version "0.1.0") - (source (origin - (method url-fetch) - (uri (crate-uri "asn1-rs-impl" version)) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "1va27bn7qxqp4wanzjlkagnynv6jnrhnwmcky2ahzb1r405p6xr7")))) - (build-system cargo-build-system) - (arguments - `(#:cargo-inputs - (("rust-proc-macro2" ,rust-proc-macro2-1) - ("rust-quote" ,rust-quote-1) - ("rust-syn" ,rust-syn-1)))) - (home-page "https://github.com/rusticata/asn1-rs") - (synopsis "Implementation details for the `asn1-rs` crate") - (description - "This package provides implementation details for the @code{asn1-rs} crate.") - (license (list license:expat license:asl2.0)))) - (define-public rust-as-raw-xcb-connection-1 (package (name "rust-as-raw-xcb-connection") diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index ad4f3ab2d7..b8cabe4d80 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -41,6 +41,221 @@ #:use-module (gnu packages rust-apps) #:use-module (gnu packages tls)) +(define-public rust-asn1-0.15 + (package + (name "rust-asn1") + (version "0.15.5") + (source + (origin + (method url-fetch) + (uri (crate-uri "asn1" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1nzg1gjiyfvpvrf3i7i8j21165snf5livqg6x2sjf9m2i77cngmf")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs + (("rust-asn1-derive" ,rust-asn1-derive-0.15)) + #:cargo-development-inputs + (("rust-libc" ,rust-libc-0.2)))) + (home-page "https://github.com/alex/rust-asn1") + (synopsis "ASN.1 (DER) parser and writer") + (description + "This is a Rust library for parsing and generating ASN.1 data (DER only).") + (license license:bsd-3))) + +(define-public rust-asn1-0.13 + (package + (inherit rust-asn1-0.15) + (name "rust-asn1") + (version "0.13.0") + (source (origin + (method url-fetch) + (uri (crate-uri "asn1" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1idxxw14h3dvrj72k4g0hx1aqigd986a00cg0yxfw2gfc9gbmzra")))) + (arguments + `(#:cargo-inputs + (("rust-asn1-derive" ,rust-asn1-derive-0.13) + ("rust-chrono" ,rust-chrono-0.4)) + #:cargo-development-inputs + (("rust-libc" ,rust-libc-0.2)))))) + +(define-public rust-asn1-derive-0.15 + (package + (name "rust-asn1-derive") + (version "0.15.5") + (source + (origin + (method url-fetch) + (uri (crate-uri "asn1_derive" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1771kfjycjs4g2acqvxpjy3igfcgg8hychczl1lsqq64za4gj6l6")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs + (("rust-proc-macro2" ,rust-proc-macro2-1) + ("rust-quote" ,rust-quote-1) + ("rust-syn" ,rust-syn-2)))) + (home-page "https://github.com/alex/rust-asn1") + (synopsis "#[derive] support for asn1") + (description + "This package provides #[derive] support for @code{asn1}.") + (license license:bsd-3))) + +(define-public rust-asn1-derive-0.13 + (package + (inherit rust-asn1-derive-0.15) + (name "rust-asn1-derive") + (version "0.13.0") + (source (origin + (method url-fetch) + (uri (crate-uri "asn1_derive" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1bvqriazb23gysygpzng1dhzjgnlv274q2yj5gpmlpl7jp0pkaxz")))) + (arguments + `(#:skip-build? #t + #:cargo-inputs + (("rust-proc-macro2" ,rust-proc-macro2-1) + ("rust-quote" ,rust-quote-1) + ("rust-syn" ,rust-syn-1)))))) + +(define-public rust-asn1-rs-0.5 + (package + (name "rust-asn1-rs") + (version "0.5.2") + (source (origin + (method url-fetch) + (uri (crate-uri "asn1-rs" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1w7zq0392qs7kkv0nzw50bfqvq7q9zxv48fsp3sxyl83mzfxavvz")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs + (("rust-asn1-rs-derive" ,rust-asn1-rs-derive-0.4) + ("rust-asn1-rs-impl" ,rust-asn1-rs-impl-0.1) + ("rust-bitvec" ,rust-bitvec-1) + ("rust-cookie-factory" ,rust-cookie-factory-0.3) + ("rust-displaydoc" ,rust-displaydoc-0.2) + ("rust-nom" ,rust-nom-7) + ("rust-num-bigint" ,rust-num-bigint-0.4) + ("rust-num-traits" ,rust-num-traits-0.2) + ("rust-rusticata-macros" ,rust-rusticata-macros-4) + ("rust-thiserror" ,rust-thiserror-1) + ("rust-time" ,rust-time-0.3)) + #:cargo-development-inputs + (("rust-colored" ,rust-colored-2) + ("rust-hex-literal" ,rust-hex-literal-0.3) + ("rust-oid-registry" ,rust-oid-registry-0.6) + ("rust-pem" ,rust-pem-1) + ("rust-trybuild" ,rust-trybuild-1)))) + (home-page "https://github.com/rusticata/asn1-rs") + (synopsis "Parser/encoder for ASN.1 BER/DER data") + (description "Parser/encoder for ASN.1 BER/DER data") + (license (list license:expat license:asl2.0)))) + +(define-public rust-asn1-rs-0.3 + (package + (inherit rust-asn1-rs-0.5) + (name "rust-asn1-rs") + (version "0.3.1") + (source + (origin + (method url-fetch) + (uri (crate-uri "asn1-rs" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0czsk1nd4dx2k83f7jzkn8klx05wbmblkx1jh51i4c170akhbzrh")))) + (arguments + `(#:cargo-inputs (("rust-asn1-rs-derive" ,rust-asn1-rs-derive-0.1) + ("rust-asn1-rs-impl" ,rust-asn1-rs-impl-0.1) + ("rust-bitvec" ,rust-bitvec-1) + ("rust-cookie-factory" ,rust-cookie-factory-0.3) + ("rust-displaydoc" ,rust-displaydoc-0.2) + ("rust-nom" ,rust-nom-7) + ("rust-num-bigint" ,rust-num-bigint-0.4) + ("rust-num-traits" ,rust-num-traits-0.2) + ("rust-rusticata-macros" ,rust-rusticata-macros-4) + ("rust-thiserror" ,rust-thiserror-1) + ("rust-time" ,rust-time-0.3)) + #:cargo-development-inputs (("rust-colored" ,rust-colored-2) + ("rust-hex-literal" ,rust-hex-literal-0.3) + ("rust-oid-registry" ,rust-oid-registry-0.3) + ("rust-pem" ,rust-pem-1) + ("rust-trybuild" ,rust-trybuild-1)))))) + +(define-public rust-asn1-rs-derive-0.4 + (package + (name "rust-asn1-rs-derive") + (version "0.4.0") + (source (origin + (method url-fetch) + (uri (crate-uri "asn1-rs-derive" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0v7fgmnzk7jjxv51grhwzcx5bf167nlqwk3vcmq7xblf5s4karbj")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs + (("rust-proc-macro2" ,rust-proc-macro2-1) + ("rust-quote" ,rust-quote-1) + ("rust-syn" ,rust-syn-1) + ("rust-synstructure" ,rust-synstructure-0.12)))) + (home-page "https://github.com/rusticata/asn1-rs") + (synopsis "Derive macros for the `asn1-rs` crate") + (description + "This package provides derive macros for the @code{asn1-rs} crate.") + (license (list license:expat license:asl2.0)))) + +(define-public rust-asn1-rs-derive-0.1 + (package + (inherit rust-asn1-rs-derive-0.4) + (name "rust-asn1-rs-derive") + (version "0.1.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "asn1-rs-derive" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1gzf9vab06lk0zjvbr07axx64fndkng2s28bnj27fnwd548pb2yv")))) + (arguments + `(#:cargo-inputs (("rust-proc-macro2" ,rust-proc-macro2-1) + ("rust-quote" ,rust-quote-1) + ("rust-syn" ,rust-syn-1) + ("rust-synstructure" ,rust-synstructure-0.12)))))) + +(define-public rust-asn1-rs-impl-0.1 + (package + (name "rust-asn1-rs-impl") + (version "0.1.0") + (source (origin + (method url-fetch) + (uri (crate-uri "asn1-rs-impl" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1va27bn7qxqp4wanzjlkagnynv6jnrhnwmcky2ahzb1r405p6xr7")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs + (("rust-proc-macro2" ,rust-proc-macro2-1) + ("rust-quote" ,rust-quote-1) + ("rust-syn" ,rust-syn-1)))) + (home-page "https://github.com/rusticata/asn1-rs") + (synopsis "Implementation details for the `asn1-rs` crate") + (description + "This package provides implementation details for the @code{asn1-rs} crate.") + (license (list license:expat license:asl2.0)))) + (define-public rust-async-native-tls-0.3 (package (name "rust-async-native-tls") diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm index b787d6207f..ff6b3a3e1a 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm @@ -57,6 +57,7 @@ #:use-module (gnu packages) #:use-module (gnu packages check) #:use-module (gnu packages crates-io) + #:use-module (gnu packages crates-tls) #:use-module (gnu packages crypto) #:use-module (gnu packages kerberos) #:use-module (gnu packages libffi) -- cgit v1.2.3 From 42931016a26ba6c95b44757766999583c80ca589 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 22 Jan 2024 21:07:08 +0200 Subject: gnu: rust-async-native-tls-0.3: Don't skip the build. * gnu/packages/crates-tls.scm (rust-async-native-tls-0.3)[arguments]: Don't skip the build. [cargo-inputs]: Add rust-async-std-1. [cargo-development-inputs]: Add rust-async-std-1, rust-cfg-if-0.1, rust-env-logger-0.7, rust-futures-0.3, rust-tokio-0.2. Remove rust-threadpool-1. [native-inputs]: Add pkg-config. [inputs]: Add openssl. Change-Id: Ia7f5fb2b962ecb3eb0e048c2d34417ae4b4cd34b --- gnu/packages/crates-tls.scm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index b8cabe4d80..7ef410d9d7 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -269,15 +269,21 @@ (base32 "0cwv4vbrvcbv58b51y1azfbszzgzhrzxx92q5nl6hk6kkf97m7ly")))) (build-system cargo-build-system) (arguments - `(#:skip-build? #true ;XXX: build when rust-async-std-1 is packaged + `(#:tests? #f ; Tests want internet access. #:cargo-inputs - (;;("rust-async-std" ,rust-async-std-1) + (("rust-async-std" ,rust-async-std-1) ("rust-native-tls" ,rust-native-tls-0.2) ("rust-thiserror" ,rust-thiserror-1) ("rust-tokio" ,rust-tokio-0.2) ("rust-url" ,rust-url-2)) #:cargo-development-inputs - (("rust-threadpool" ,rust-threadpool-1)))) + (("rust-async-std" ,rust-async-std-1) + ("rust-cfg-if" ,rust-cfg-if-0.1) + ("rust-env-logger" ,rust-env-logger-0.7) + ("rust-futures" ,rust-futures-0.3) + ("rust-tokio" ,rust-tokio-0.2)))) + (native-inputs (list pkg-config)) + (inputs (list openssl)) (home-page "https://docs.rs/crate/async-native-tls/") (synopsis "Native TLS using futures") (description "Native TLS using futures.") -- cgit v1.2.3 From 83874b79c7eb1b87fdd63b9049fae46b5dd41607 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 22 Jan 2024 21:08:36 +0200 Subject: gnu: rust-async-tls-0.10: Downgrade to 0.10.0. Later versions of this crate were yanked by upstream. * gnu/packages/crates-tls.scm (rust-async-tls-0.10): Downgrade to 0.10.0. [arguments]: Don't skip the build. Skip the tests. [cargo-inputs]: Replace rust-rustls-0.19 with 0.18, rust-webpki-roots-0.21 with 0.20. [cargo-development-inputs]: Add rust-async-std-1, rust-futures-executor-0.3, rust-futures-util-0.3, rust-lazy-static-1. Change-Id: Id16de637b32190470b2c106f9356829c7cf65036 --- gnu/packages/crates-tls.scm | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index 7ef410d9d7..8b0ab5e311 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -292,23 +292,28 @@ (define-public rust-async-tls-0.10 (package (name "rust-async-tls") - (version "0.10.2") + (version "0.10.0") (source (origin (method url-fetch) (uri (crate-uri "async-tls" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 - (base32 "126by0la2wvfadazfnmw7b6ch07dk9ggny94a3vvzgk2qdpqn3fx")))) + (base32 "0lnc61fb16wg76hbqh2kjzc4d9kqkh8mz51zzn78gkpcl329fnnq")))) (build-system cargo-build-system) (arguments - `(#:skip-build? #t + `(#:tests? #f ; unresolved import `async_std::sync::channel` #:cargo-inputs (("rust-futures-core" ,rust-futures-core-0.3) ("rust-futures-io" ,rust-futures-io-0.3) - ("rust-rustls" ,rust-rustls-0.19) + ("rust-rustls" ,rust-rustls-0.18) ("rust-webpki" ,rust-webpki-0.21) - ("rust-webpki-roots" ,rust-webpki-roots-0.21)))) + ("rust-webpki-roots" ,rust-webpki-roots-0.20)) + #:cargo-development-inputs + (("rust-async-std" ,rust-async-std-1) + ("rust-futures-executor" ,rust-futures-executor-0.3) + ("rust-futures-util" ,rust-futures-util-0.3) + ("rust-lazy-static" ,rust-lazy-static-1)))) (home-page "https://github.com/async-std/async-tls") (synopsis "Asynchronous TLS/SSL streams using Rustls") (description -- cgit v1.2.3 From 52fe5b244b6c77dd6478b0047d537944b0ce9cb4 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 22 Jan 2024 21:10:11 +0200 Subject: gnu: rust-der-parser-6: Update to 6.0.1. * gnu/packages/crates-tls.scm (rust-der-parser-6): Update to 6.0.1. [arguments]: Don't skip the build. [cargo-development-inputs]: Replace rust-pretty-assertions-0.7 with 1. Change-Id: Ia6fcea5b682dd407cf4ebe9e8c5bd852356604b1 --- gnu/packages/crates-tls.scm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index 8b0ab5e311..0defbcfcc2 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -590,17 +590,16 @@ targets") (package (inherit rust-der-parser-8) (name "rust-der-parser") - (version "6.0.0") + (version "6.0.1") (source (origin (method url-fetch) (uri (crate-uri "der-parser" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 - (base32 "0gn465dncghmj52k8dlkl71wkmlz5zc6jfjgj9ra2knf22ryy1wq")))) + (base32 "1cik6kfx0bpp5gsw59h9b61widy09pqbggifn2r13d00ywhg3pac")))) (arguments - `(#:skip-build? #t - #:cargo-inputs + `(#:cargo-inputs (("rust-bitvec" ,rust-bitvec-0.22) ("rust-cookie-factory" ,rust-cookie-factory-0.3) ("rust-der-oid-macro" ,rust-der-oid-macro-0.5) @@ -610,7 +609,7 @@ targets") ("rust-rusticata-macros" ,rust-rusticata-macros-4)) #:cargo-development-inputs (("rust-hex-literal" ,rust-hex-literal-0.3) - ("rust-pretty-assertions" ,rust-pretty-assertions-0.7) + ("rust-pretty-assertions" ,rust-pretty-assertions-1) ("rust-test-case" ,rust-test-case-1)))))) (define-public rust-native-tls-0.2 -- cgit v1.2.3 From 3e22bfb5e9bf7d126b474d3d1f48bb8053adbe2b Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 22 Jan 2024 21:10:51 +0200 Subject: gnu: rust-rustls-0.20: Update to 0.20.9. * gnu/packages/crates-tls.scm (rust-rustls-0.20): Update to 0.20.9. Change-Id: I5a4202f67683d63c260e1cd193064a10defed549 --- gnu/packages/crates-tls.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index 0defbcfcc2..6220b7eee9 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -865,13 +865,13 @@ grammars and BER/DER encodings, for example.") (package (inherit rust-rustls-0.21) (name "rust-rustls") - (version "0.20.8") + (version "0.20.9") (source (origin (method url-fetch) (uri (crate-uri "rustls" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 - (base32 "0bqfymq5bjs1jxg1iw2nn4ab3kzz2lrk8a1vx3s98lhp9p3qzxzz")))) + (base32 "16byazb8jfr06kgbijy92bdk0ila806g6a00a6l9x64mqpgf700v")))) (arguments `(#:tests? #f ; Not all files included. #:cargo-inputs -- cgit v1.2.3 From 026899ade61f0f567d069a9c28fe9719c6040963 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 22 Jan 2024 21:11:15 +0200 Subject: gnu: rust-rustls-0.19: Update to 0.19.1. * gnu/packages/crates-tls.scm (rust-rustls-0.19): Update to 0.19.1. [arguments]: Don't skip the build. Skip the tests. [cargo-development-inputs]: Add rust-criterion-0.3, rust-env-logger-0.8, rust-log-0.4, rust-webpki-roots-0.21. Change-Id: If5af476371a1b375c0dc674ba26fd52be53803d3 --- gnu/packages/crates-tls.scm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index 6220b7eee9..3c9f554cb0 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -892,23 +892,26 @@ grammars and BER/DER encodings, for example.") (package (inherit rust-rustls-0.20) (name "rust-rustls") - (version "0.19.0") + (version "0.19.1") (source (origin (method url-fetch) (uri (crate-uri "rustls" version)) - (file-name - (string-append name "-" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 - (base32 "02wqas2pcxk75s9l9c9f1r5am7258bmqprh68pnqfvkwz0gx4kq6")))) + (base32 "1mx6nzbplydy9khll4clsl35m6c1a2cgz9czr74swfgfzrsvdv9m")))) (arguments - `(#:skip-build? #t + `(#:tests? #f ; Not all files included. #:cargo-inputs (("rust-base64" ,rust-base64-0.13) ("rust-log" ,rust-log-0.4) ("rust-ring" ,rust-ring-0.16) ("rust-sct" ,rust-sct-0.6) - ("rust-webpki" ,rust-webpki-0.21)))))) + ("rust-webpki" ,rust-webpki-0.21)) + #:cargo-development-inputs (("rust-criterion" ,rust-criterion-0.3) + ("rust-env-logger" ,rust-env-logger-0.8) + ("rust-log" ,rust-log-0.4) + ("rust-webpki-roots" ,rust-webpki-roots-0.21)))))) (define-public rust-rustls-0.18 (package -- cgit v1.2.3 From ef4b1839e33b33c76105156fec5fa834d85f7030 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 22 Jan 2024 21:12:08 +0200 Subject: gnu: rust-rustls-pemfile-1: Update to 1.0.4. * gnu/packages/crates-tls.scm (rust-rustls-pemfile-1): Update to 1.0.4. Change-Id: I7bc805697a2f5fba2b2176ef9aa1113371bdb46e --- gnu/packages/crates-tls.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index 3c9f554cb0..9ddacdb614 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -1193,14 +1193,14 @@ PEM-encodings commonly used to store keys and certificates at rest.") (package (inherit rust-rustls-pemfile-2) (name "rust-rustls-pemfile") - (version "1.0.3") + (version "1.0.4") (source (origin (method url-fetch) (uri (crate-uri "rustls-pemfile" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 - (base32 "1cplx6hgkr32nq31p3613b2sj7csrrq3zp6znx9vc1qx9c4qff9d")))) + (base32 "1324n5bcns0rnw6vywr5agff3rwfvzphi7rmbyzwnv6glkhclx0w")))) (arguments `(#:cargo-inputs (("rust-base64" ,rust-base64-0.21)) -- cgit v1.2.3 From 3a78c280d110b7a29d2cb9a6c876034a2633e549 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 22 Jan 2024 21:12:32 +0200 Subject: gnu: rust-rustls-webpki-0.100: Update to 0.100.3. * gnu/packages/crates-tls.scm (rust-rustls-webpki-0.100): Update to 0.100.3. [cargo-development-inputs]: Add rust-rcgen-0.11. Change-Id: Id0d4a2b6bca68515ff0f2f20786bd476c23ae656 --- gnu/packages/crates-tls.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index 9ddacdb614..9dce40ed6a 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -1275,20 +1275,21 @@ PEM-encodings commonly used to store keys and certificates at rest.") (package (inherit rust-rustls-webpki-0.101) (name "rust-rustls-webpki") - (version "0.100.1") + (version "0.100.3") (source (origin (method url-fetch) (uri (crate-uri "rustls-webpki" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "0sxlgpcczd1wihmnbgv5qz00jim32dap5wzq2rwcm39xxpapq86n")))) + "1qsa7bgwbkgiqh7zq7lihd9jsvjl8mlm25ihzrnjghgib315ysjz")))) (arguments `(#:tests? #f ; Not all files included. #:cargo-inputs (("rust-ring" ,rust-ring-0.16) ("rust-untrusted" ,rust-untrusted-0.7)) - #:cargo-development-inputs (("rust-base64" ,rust-base64-0.13)))))) + #:cargo-development-inputs (("rust-base64" ,rust-base64-0.13) + ("rust-rcgen" ,rust-rcgen-0.11)))))) (define-public rust-tls-parser-0.11 (package -- cgit v1.2.3 From cc18e1363f02d08c4932709904a251df18719f8e Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 29 Jan 2024 09:02:27 +0200 Subject: gnu: Add rust-x509-signature-0.5. * gnu/packages/crates-tls.scm (rust-x509-signature-0.5): New variable. Change-Id: Iac8f1f16d5fdaf73b11f925cf486fb42b62b33fd --- gnu/packages/crates-tls.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index 9dce40ed6a..1209dfbcb1 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -1411,3 +1411,30 @@ PEM-encodings commonly used to store keys and certificates at rest.") ("rust-ring" ,rust-ring-0.16) ("rust-rusticata-macros" ,rust-rusticata-macros-4) ("rust-thiserror" ,rust-thiserror-1)))))) + +(define-public rust-x509-signature-0.5 + (package + (name "rust-x509-signature") + (version "0.5.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "x509-signature" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "063mjzgddfam4xb88wr0li3k0q6nzyq3mvkiykajr69dj0mbrclz")))) + (build-system cargo-build-system) + (arguments + `(#:tests? #f ; `const_err` has been removed: converted into hard error + #:cargo-test-flags '("--release" "--" + "--skip=tests::parses_openssl_generated_cert") + #:cargo-inputs (("rust-ring" ,rust-ring-0.16) + ("rust-rustls" ,rust-rustls-0.18) + ("rust-untrusted" ,rust-untrusted-0.7) + ("rust-webpki" ,rust-webpki-0.21)) + #:cargo-development-inputs (("rust-chrono" ,rust-chrono-0.4)))) + (home-page "https://github.com/paritytech/x509-signature") + (synopsis "Low-level X.509 parsing and signature verification library") + (description "This package provides a low-level X.509 parsing and signature +verification library.") + (license (list license:expat license:asl2.0)))) -- cgit v1.2.3 From 6aee907e87f19a8a3ddc4bdd6b21baf64d02a778 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 29 Jan 2024 09:02:27 +0200 Subject: gnu: Add rust-x509-parser-0.13. * gnu/packages/crates-tls.scm (rust-x509-parser-0.13): New variable. Change-Id: I450600b7e54f45e8d3b051cb0e634efd51a2fac2 --- gnu/packages/crates-tls.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index 1209dfbcb1..bd27188d35 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -1384,6 +1384,31 @@ PEM-encodings commonly used to store keys and certificates at rest.") ("rust-thiserror" ,rust-thiserror-1) ("rust-time" ,rust-time-0.3)))))) +(define-public rust-x509-parser-0.13 + (package + (inherit rust-x509-parser-0.15) + (name "rust-x509-parser") + (version "0.13.2") + (source + (origin + (method url-fetch) + (uri (crate-uri "x509-parser" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "077bi0xyaa8cmrqf3rrw1z6kkzscwd1nxdxgs7mgz2ambg7bmfcz")))) + (arguments + `(#:cargo-inputs (("rust-asn1-rs" ,rust-asn1-rs-0.3) + ("rust-base64" ,rust-base64-0.13) + ("rust-data-encoding" ,rust-data-encoding-2) + ("rust-der-parser" ,rust-der-parser-7) + ("rust-lazy-static" ,rust-lazy-static-1) + ("rust-nom" ,rust-nom-7) + ("rust-oid-registry" ,rust-oid-registry-0.4) + ("rust-ring" ,rust-ring-0.16) + ("rust-rusticata-macros" ,rust-rusticata-macros-4) + ("rust-thiserror" ,rust-thiserror-1) + ("rust-time" ,rust-time-0.3)))))) + (define-public rust-x509-parser-0.12 (package (inherit rust-x509-parser-0.15) -- cgit v1.2.3 From 2658bd5dd85e2b4209e15d0aaa4b8abe40aa879a Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 29 Jan 2024 09:02:27 +0200 Subject: gnu: Add rust-rcgen-0.9. * gnu/packages/crates-tls.scm (rust-rcgen-0.9): New variable. Change-Id: Ibf2307d3019ed2bcaf0ae0c6af6a4235f77d7fd1 --- gnu/packages/crates-tls.scm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index bd27188d35..40a0652119 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -791,6 +791,37 @@ grammars and BER/DER encodings, for example.") ("rust-webpki" ,rust-webpki-0.22) ("rust-x509-parser" ,rust-x509-parser-0.14)))))) +(define-public rust-rcgen-0.9 + (package + (inherit rust-rcgen-0.11) + (name "rust-rcgen") + (version "0.9.3") + (source + (origin + (method url-fetch) + (uri (crate-uri "rcgen" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1pdwrza2j6bv94nxcfrb6dpbrrrjdnspb3hkwr137rfy3vgg64v4")) + (snippet + #~(begin (use-modules (guix build utils)) + ;; Don't use a vendored botan. + (substitute* "Cargo.toml" + ((".*vendored.*") "")))))) + (arguments + `(#:cargo-inputs (("rust-pem" ,rust-pem-1) + ("rust-ring" ,rust-ring-0.16) + ("rust-time" ,rust-time-0.3) + ("rust-x509-parser" ,rust-x509-parser-0.13) + ("rust-yasna" ,rust-yasna-0.5) + ("rust-zeroize" ,rust-zeroize-1)) + #:cargo-development-inputs (("rust-botan" ,rust-botan-0.8) + ("rust-openssl" ,rust-openssl-0.10) + ("rust-rand" ,rust-rand-0.8) + ("rust-rsa" ,rust-rsa-0.5) + ("rust-webpki" ,rust-webpki-0.22) + ("rust-x509-parser" ,rust-x509-parser-0.13)))))) + (define-public rust-rcgen-0.8 (package (inherit rust-rcgen-0.11) -- cgit v1.2.3 From 660c09d40a592f6e6971734688883881b584a8e7 Mon Sep 17 00:00:00 2001 From: VÖRÖSKŐI András Date: Wed, 7 Feb 2024 16:13:46 +0200 Subject: gnu: Add rust-aws-lc-fips-sys-0.12. * gnu/packages/crates-tls.scm (rust-aws-lc-fips-sys-0.12): New variable. Change-Id: I8d1d3382f9c08b6775d15d41a8fcbb6f8b2c69e4 --- gnu/packages/crates-tls.scm | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index 40a0652119..8dfbe52811 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2021 Alexandru-Sergiu Marton ;;; Copyright © 2022 Aleksandr Vityazev ;;; Copyright © 2022 Ricardo Wurmus +;;; Copyright © 2024 VÖRÖSKŐI András ;;; ;;; This file is part of GNU Guix. ;;; @@ -31,12 +32,15 @@ #:use-module (guix gexp) #:use-module (guix utils) #:use-module (gnu packages) + #:use-module (gnu packages cmake) #:use-module (gnu packages crates-apple) #:use-module (gnu packages crates-crypto) #:use-module (gnu packages crates-io) #:use-module (gnu packages crates-web) #:use-module (gnu packages crates-windows) #:use-module (gnu packages crypto) + #:use-module (gnu packages golang) + #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages rust-apps) #:use-module (gnu packages tls)) @@ -320,6 +324,41 @@ "This package provides asynchronous TLS/SSL streams using Rustls.") (license (list license:expat license:asl2.0)))) +;; TODO: Unbundle aws-lc-fips. +(define-public rust-aws-lc-fips-sys-0.12 + (package + (name "rust-aws-lc-fips-sys") + (version "0.12.1") + (source + (origin + (method url-fetch) + (uri (crate-uri "aws-lc-fips-sys" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0fv2z5gcm9wm45hbsjhm657p6diqiq1vw5a2rzrzfg8j4vxdzz07")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs (("rust-bindgen" ,rust-bindgen-0.69) + ("rust-cmake" ,rust-cmake-0.1) + ("rust-dunce" ,rust-dunce-1) + ("rust-fs-extra" ,rust-fs-extra-1) + ("rust-libc" ,rust-libc-0.2) + ("rust-paste" ,rust-paste-1)) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'set-home-directory + (lambda _ + (setenv "HOME" "/tmp")))))) + (native-inputs (list cmake-minimal go perl)) + (home-page "https://github.com/aws/aws-lc-rs") + (synopsis + "AWS-LC is a general-purpose cryptographic library (FIPS version)") + (description + "AWS-LC is a general-purpose cryptographic library maintained by the AWS +Cryptography team for AWS and their customers. This is the FIPS validated +version of AWS-LC.") + (license (list license:isc license:openssl license:asl2.0)))) + (define-public rust-der-0.7 (package (name "rust-der") -- cgit v1.2.3 From 002e64d023222f273b91571336a7916e2312e663 Mon Sep 17 00:00:00 2001 From: VÖRÖSKŐI András Date: Wed, 7 Feb 2024 16:14:30 +0200 Subject: gnu: Add rust-aws-lc-sys-0.13. * gnu/packages/crates-tls.scm (rust-aws-lc-sys-0.13): New variable. Change-Id: I9d6fbe271d19cadd4aeee6f010d7ea4634c66566 --- gnu/packages/crates-tls.scm | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index 8dfbe52811..d22d19b260 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -359,6 +359,35 @@ Cryptography team for AWS and their customers. This is the FIPS validated version of AWS-LC.") (license (list license:isc license:openssl license:asl2.0)))) +;; TODO: Unbundle aws-lc. +(define-public rust-aws-lc-sys-0.13 + (package + (name "rust-aws-lc-sys") + (version "0.13.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "aws-lc-sys" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "05a7z5hg00zpk4gvqggzv7j6bvljplx2c1kw44ifmxjnf5469rdn")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs (("rust-bindgen" ,rust-bindgen-0.69) + ("rust-cmake" ,rust-cmake-0.1) + ("rust-dunce" ,rust-dunce-1) + ("rust-fs-extra" ,rust-fs-extra-1) + ("rust-libc" ,rust-libc-0.2) + ("rust-paste" ,rust-paste-1)))) + (native-inputs (list cmake-minimal)) + (home-page "https://github.com/aws/aws-lc-rs") + (synopsis "AWS-LC is a general-purpose cryptographic library") + (description + "AWS-LC is a general-purpose cryptographic library maintained by the AWS +Cryptography team for AWS and their customers. It is based on code from the +Google @code{BoringSSL} project and the @code{OpenSSL} project.") + (license (list license:isc license:openssl license:asl2.0)))) + (define-public rust-der-0.7 (package (name "rust-der") -- cgit v1.2.3 From 0e1fda8955d7ab6edd1069ba95c4611d273f05f5 Mon Sep 17 00:00:00 2001 From: VÖRÖSKŐI András Date: Wed, 7 Feb 2024 16:14:55 +0200 Subject: gnu: Add rust-aws-lc-rs-1. * gnu/packages/crates-tls.scm (rust-aws-lc-rs-1): New variable. Change-Id: Ia9bb17237439f7b6dfce60a2477ab8a4759bfb49 --- gnu/packages/crates-tls.scm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index d22d19b260..7a12996389 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -359,6 +359,39 @@ Cryptography team for AWS and their customers. This is the FIPS validated version of AWS-LC.") (license (list license:isc license:openssl license:asl2.0)))) +(define-public rust-aws-lc-rs-1 + (package + (name "rust-aws-lc-rs") + (version "1.6.1") + (source + (origin + (method url-fetch) + (uri (crate-uri "aws-lc-rs" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0jmwpin66yibpq0ha7i61g2ryz9gp4y6by4337fdjj2ckhwbm55v")))) + (build-system cargo-build-system) + (arguments + `(#:tests? #f ; Not all files included. + #:cargo-inputs (("rust-aws-lc-fips-sys" ,rust-aws-lc-fips-sys-0.12) + ("rust-aws-lc-sys" ,rust-aws-lc-sys-0.13) + ("rust-mirai-annotations" ,rust-mirai-annotations-1) + ("rust-paste" ,rust-paste-1) + ("rust-untrusted" ,rust-untrusted-0.7) + ("rust-zeroize" ,rust-zeroize-1)) + #:cargo-development-inputs (("rust-clap" ,rust-clap-4) + ("rust-hex" ,rust-hex-0.4) + ("rust-lazy-static" ,rust-lazy-static-1) + ("rust-regex" ,rust-regex-1)))) + (native-inputs (list cmake-minimal)) + (home-page "https://github.com/awslabs/aws-lc-rs") + (synopsis "AWS-LC is a general-purpose cryptographic library") + (description + "@code{aws-lc-rs} is a cryptographic library using AWS-LC for its +cryptographic operations. This library strives to be API-compatible with the +popular Rust library named ring.") + (license (list license:isc license:openssl license:asl2.0)))) + ;; TODO: Unbundle aws-lc. (define-public rust-aws-lc-sys-0.13 (package -- cgit v1.2.3 From 51d49b67c69fd23dd361cd6125f4dfb194818df9 Mon Sep 17 00:00:00 2001 From: VÖRÖSKŐI András Date: Tue, 30 Jan 2024 20:25:07 +0100 Subject: gnu: Add rust-rcgen-0.12. * gnu/packages/crates-tls.scm (rust-rcgen-0.12): New variable. (rust-rcgen-0.11): Inherit from rust-rcgen-0.12. Change-Id: I3e37ab618be638896c622ce32e6ad13bb492af40 Signed-off-by: Efraim Flashner --- gnu/packages/crates-tls.scm | 46 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 41 insertions(+), 5 deletions(-) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index 7a12996389..332784ad65 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -819,17 +819,17 @@ grammars and BER/DER encodings, for example.") `(#:skip-build? #t #:cargo-inputs (("rust-der-parser" ,rust-der-parser-6)))))) -(define-public rust-rcgen-0.11 +(define-public rust-rcgen-0.12 (package (name "rust-rcgen") - (version "0.11.3") + (version "0.12.1") (source (origin (method url-fetch) (uri (crate-uri "rcgen" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1iivv3xycr9mjfmp522xjqj47nsl5amlzzsfpbxpvg53984g7i2j")) + "1qg10xvayyxhkcjk1x3g6n59a5rq6iaw6vmmrmyvqg0zmjw6sh28")) (modules '((guix build utils))) (snippet '(begin @@ -839,8 +839,9 @@ grammars and BER/DER encodings, for example.") (build-system cargo-build-system) (arguments `(#:cargo-inputs - (("rust-pem" ,rust-pem-3) - ("rust-ring" ,rust-ring-0.16) + (("rust-aws-lc-rs" ,rust-aws-lc-rs-1) + ("rust-pem" ,rust-pem-3) + ("rust-ring" ,rust-ring-0.17) ("rust-time" ,rust-time-0.3) ("rust-x509-parser" ,rust-x509-parser-0.15) ("rust-yasna" ,rust-yasna-0.5) @@ -849,6 +850,7 @@ grammars and BER/DER encodings, for example.") (("rust-botan" ,rust-botan-0.10) ("rust-openssl" ,rust-openssl-0.10) ("rust-rand" ,rust-rand-0.8) + ("rust-ring" ,rust-ring-0.17) ("rust-rsa" ,rust-rsa-0.9) ("rust-rustls-webpki" ,rust-rustls-webpki-0.101) ("rust-x509-parser" ,rust-x509-parser-0.15)))) @@ -861,6 +863,40 @@ grammars and BER/DER encodings, for example.") (description "Rust X.509 certificate generator.") (license (list license:expat license:asl2.0)))) +(define-public rust-rcgen-0.11 + (package + (inherit rust-rcgen-0.12) + (name "rust-rcgen") + (version "0.11.3") + (source (origin + (method url-fetch) + (uri (crate-uri "rcgen" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1iivv3xycr9mjfmp522xjqj47nsl5amlzzsfpbxpvg53984g7i2j")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Don't use a vendored botan. + (substitute* "Cargo.toml" + ((".*vendored.*") "")))))) + (arguments + `(#:cargo-inputs + (("rust-pem" ,rust-pem-3) + ("rust-ring" ,rust-ring-0.16) + ("rust-time" ,rust-time-0.3) + ("rust-x509-parser" ,rust-x509-parser-0.15) + ("rust-yasna" ,rust-yasna-0.5) + ("rust-zeroize" ,rust-zeroize-1)) + #:cargo-development-inputs + (("rust-botan" ,rust-botan-0.10) + ("rust-openssl" ,rust-openssl-0.10) + ("rust-rand" ,rust-rand-0.8) + ("rust-rsa" ,rust-rsa-0.9) + ("rust-rustls-webpki" ,rust-rustls-webpki-0.101) + ("rust-x509-parser" ,rust-x509-parser-0.15)))))) + (define-public rust-rcgen-0.10 (package (inherit rust-rcgen-0.11) -- cgit v1.2.3 From 5ec37042629c62aa37f45384243c11fc1b083c13 Mon Sep 17 00:00:00 2001 From: VÖRÖSKŐI András Date: Tue, 30 Jan 2024 20:25:09 +0100 Subject: gnu: Add rust-rustls-native-certs-0.7. * gnu/packages/crates-tls.scm (rust-rustls-native-certs-0.7): New variable. (rust-rustls-native-certs-0.6): Inherit from rust-rustls-native-certs-0.7. Change-Id: Ic66c11b391be69929d0884a060d9a3bcdbfd3406 Signed-off-by: Efraim Flashner --- gnu/packages/crates-tls.scm | 42 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 8 deletions(-) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index 332784ad65..b3922fa98a 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -1254,8 +1254,41 @@ grammars and BER/DER encodings, for example.") (description "Rustls bindings for non-Rust languages") (license (list license:asl2.0 license:isc license:expat)))) +(define-public rust-rustls-native-certs-0.7 + (package + (name "rust-rustls-native-certs") + (version "0.7.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "rustls-native-certs" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "14ip15dcr6fmjzi12lla9cpln7mmkdid4a7wsp344v4kz9gbh7wg")))) + (build-system cargo-build-system) + (arguments + `(#:tests? #f ; Tests want network access. + #:cargo-inputs (("rust-openssl-probe" ,rust-openssl-probe-0.1) + ("rust-rustls-pemfile" ,rust-rustls-pemfile-2) + ("rust-rustls-pki-types" ,rust-rustls-pki-types-1) + ("rust-schannel" ,rust-schannel-0.1) + ("rust-security-framework" ,rust-security-framework-2)) + #:cargo-development-inputs (("rust-ring" ,rust-ring-0.16) + ("rust-rustls" ,rust-rustls-0.22) + ("rust-rustls-webpki" ,rust-rustls-webpki-0.102) + ("rust-serial-test" ,rust-serial-test-2) + ("rust-untrusted" ,rust-untrusted-0.7) + ("rust-webpki-roots" ,rust-webpki-roots-0.26) + ("rust-x509-parser" ,rust-x509-parser-0.15)))) + (home-page "https://github.com/ctz/rustls-native-certs") + (synopsis "Use the platform native certificate store with rustls") + (description "@code{rustls-native-certs} allows rustls to use the platform +native certificate store.") + (license (list license:asl2.0 license:isc license:expat)))) + (define-public rust-rustls-native-certs-0.6 (package + (inherit rust-rustls-native-certs-0.7) (name "rust-rustls-native-certs") (version "0.6.3") (source @@ -1265,7 +1298,6 @@ grammars and BER/DER encodings, for example.") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "007zind70rd5rfsrkdcfm8vn09j8sg02phg9334kark6rdscxam9")))) - (build-system cargo-build-system) (arguments `(#:tests? #f ; Tests want network access. #:cargo-inputs @@ -1280,13 +1312,7 @@ grammars and BER/DER encodings, for example.") ("rust-serial-test" ,rust-serial-test-2) ("rust-untrusted" ,rust-untrusted-0.7) ("rust-webpki-roots" ,rust-webpki-roots-0.23) - ("rust-x509-parser" ,rust-x509-parser-0.15)))) - (home-page "https://github.com/ctz/rustls-native-certs") - (synopsis "Use the platform native certificate store with rustls") - (description "@code{rustls-native-certs} allows rustls to use the platform -native certificate store.") - (license - (list license:asl2.0 license:isc license:expat)))) + ("rust-x509-parser" ,rust-x509-parser-0.15)))))) (define-public rust-rustls-native-certs-0.5 (package -- cgit v1.2.3 From 00639426a65622b84807729c3ebf3c15fb9d5d95 Mon Sep 17 00:00:00 2001 From: VÖRÖSKŐI András Date: Tue, 30 Jan 2024 20:25:10 +0100 Subject: gnu: Add rust-rustls-webpki-0.102. * gnu/packages/crates-tls.scm (rust-rustls-webpki-0.102): New variable. (rust-rustls-webpki-0.101): Inherit from rust-rustls-webpki-0.102. Change-Id: I916376fa7a46022b1b2e7b21d938adc94267717a Signed-off-by: Efraim Flashner --- gnu/packages/crates-tls.scm | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index b3922fa98a..73a039bea8 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -1436,8 +1436,39 @@ PEM-encodings commonly used to store keys and certificates at rest.") (description "Shared types for the rustls PKI ecosystem.") (license (list license:expat license:asl2.0)))) +(define-public rust-rustls-webpki-0.102 + (package + (name "rust-rustls-webpki") + (version "0.102.1") + (source + (origin + (method url-fetch) + (uri (crate-uri "rustls-webpki" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0nz9d3xhy8cg6anmvq64scyiva8bglrc6j3v6bdxw2f96xha4k7g")))) + (build-system cargo-build-system) + (arguments + `(#:tests? #f + #:cargo-inputs (("rust-aws-lc-rs" ,rust-aws-lc-rs-1) + ("rust-ring" ,rust-ring-0.17) + ("rust-rustls-pki-types" ,rust-rustls-pki-types-1) + ("rust-untrusted" ,rust-untrusted-0.9)) + #:cargo-development-inputs (("rust-base64" ,rust-base64-0.21) + ("rust-bencher" ,rust-bencher-0.1) + ("rust-bzip2" ,rust-bzip2-0.4) + ("rust-once-cell" ,rust-once-cell-1) + ("rust-rcgen" ,rust-rcgen-0.12) + ("rust-serde" ,rust-serde-1) + ("rust-serde-json" ,rust-serde-json-1)))) + (home-page "https://github.com/rustls/webpki") + (synopsis "Web PKI X.509 Certificate Verification") + (description "Web PKI X.509 Certificate Verification.") + (license license:isc))) + (define-public rust-rustls-webpki-0.101 (package + (inherit rust-rustls-webpki-0.102) (name "rust-rustls-webpki") (version "0.101.7") (source (origin @@ -1447,7 +1478,6 @@ PEM-encodings commonly used to store keys and certificates at rest.") (sha256 (base32 "0rapfhpkqp75552i8r0y7f4vq7csb4k7gjjans0df73sxv8paqlb")))) - (build-system cargo-build-system) (arguments `(#:tests? #f ; Not all files included. #:cargo-inputs @@ -1459,11 +1489,7 @@ PEM-encodings commonly used to store keys and certificates at rest.") ("rust-once-cell" ,rust-once-cell-1) ("rust-rcgen" ,rust-rcgen-0.11) ("rust-serde" ,rust-serde-1) - ("rust-serde-json" ,rust-serde-json-1)))) - (home-page "https://github.com/rustls/webpki") - (synopsis "Web PKI X.509 Certificate Verification") - (description "Web PKI X.509 Certificate Verification.") - (license license:isc))) + ("rust-serde-json" ,rust-serde-json-1)))))) (define-public rust-rustls-webpki-0.100 (package -- cgit v1.2.3 From 8b0e8387b538fafaed9ddd12aeb2052105fd3c5f Mon Sep 17 00:00:00 2001 From: VÖRÖSKŐI András Date: Tue, 30 Jan 2024 20:25:11 +0100 Subject: gnu: Add rust-rustls-0.22. * gnu/packages/crates-tls.scm (rust-rustls-0.22): New variable. (rust-rustls-0.21): Inherit from rust-rustls-0.22. Change-Id: Idbf98162adc353d1247f6d66a7c0cca2d09225df Signed-off-by: Efraim Flashner --- gnu/packages/crates-tls.scm | 43 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 7 deletions(-) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index 73a039bea8..b40871de8b 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -996,8 +996,43 @@ grammars and BER/DER encodings, for example.") ("rust-webpki" ,rust-webpki-0.22) ("rust-x509-parser" ,rust-x509-parser-0.12)))))) +(define-public rust-rustls-0.22 + (package + (name "rust-rustls") + (version "0.22.2") + (source + (origin + (method url-fetch) + (uri (crate-uri "rustls" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0hcxyhq6ynvws9v5b2h81s1nwmijmya7a3vyyyhsy1wqpmb9jz78")))) + (build-system cargo-build-system) + (arguments + `(#:tests? #f ; Not all files included. + #:cargo-inputs (("rust-aws-lc-rs" ,rust-aws-lc-rs-1) + ("rust-log" ,rust-log-0.4) + ("rust-ring" ,rust-ring-0.17) + ("rust-rustls-pki-types" ,rust-rustls-pki-types-1) + ("rust-rustls-webpki" ,rust-rustls-webpki-0.102) + ("rust-rustversion" ,rust-rustversion-1) + ("rust-subtle" ,rust-subtle-2) + ("rust-zeroize" ,rust-zeroize-1)) + #:cargo-development-inputs (("rust-base64" ,rust-base64-0.21) + ("rust-bencher" ,rust-bencher-0.1) + ("rust-env-logger" ,rust-env-logger-0.10) + ("rust-log" ,rust-log-0.4) + ("rust-rustls-pemfile" ,rust-rustls-pemfile-2) + ("rust-webpki-roots" ,rust-webpki-roots-0.26)))) + (home-page "https://github.com/rustls/rustls") + (synopsis "Modern TLS library written in Rust") + (description + "This package provides a modern TLS library written in Rust.") + (license (list license:asl2.0 license:isc license:expat)))) + (define-public rust-rustls-0.21 (package + (inherit rust-rustls-0.22) (name "rust-rustls") (version "0.21.10") (source (origin @@ -1007,7 +1042,6 @@ grammars and BER/DER encodings, for example.") (sha256 (base32 "1fmpzk3axnhkd99saqkvraifdfms4pkyi56lkihf8n877j0sdmgr")))) - (build-system cargo-build-system) (arguments `(#:tests? #f ; Not all files included. #:cargo-inputs @@ -1022,12 +1056,7 @@ grammars and BER/DER encodings, for example.") ("rust-env-logger" ,rust-env-logger-0.10) ("rust-log" ,rust-log-0.4) ("rust-rustls-pemfile" ,rust-rustls-pemfile-1) - ("rust-webpki-roots" ,rust-webpki-roots-0.25)))) - (home-page "https://github.com/rustls/rustls") - (synopsis "Modern TLS library written in Rust") - (description - "This package provides a modern TLS library written in Rust.") - (license (list license:asl2.0 license:isc license:expat)))) + ("rust-webpki-roots" ,rust-webpki-roots-0.25)))))) (define-public rust-rustls-0.20 (package -- cgit v1.2.3 From fef9079114981fb2ff7b65569ff8c5ad0036600a Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 7 Feb 2024 16:33:28 +0200 Subject: gnu: rust-x509-parser-0.15: Update to 0.15.1. * gnu/packages/crates-tls.scm (rust-x509-parser-0.15): Update to 0.15.1. Change-Id: Idb83c331f7eea1f2ca7718e87ef610f22286b47f --- gnu/packages/crates-tls.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu/packages/crates-tls.scm') diff --git a/gnu/packages/crates-tls.scm b/gnu/packages/crates-tls.scm index b40871de8b..ee061cedcf 100644 --- a/gnu/packages/crates-tls.scm +++ b/gnu/packages/crates-tls.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2020 Hartmut Goebel ;;; Copyright © 2020 Arun Isaac ;;; Copyright © 2020 Valentin Ignatev -;;; Copyright © 2020, 2023 Efraim Flashner +;;; Copyright © 2020, 2023, 2024 Efraim Flashner ;;; Copyright © 2020, 2021 Nicolas Goaziou ;;; Copyright © 2021 Alexandru-Sergiu Marton ;;; Copyright © 2022 Aleksandr Vityazev @@ -1581,14 +1581,14 @@ PEM-encodings commonly used to store keys and certificates at rest.") (define-public rust-x509-parser-0.15 (package (name "rust-x509-parser") - (version "0.15.0") + (version "0.15.1") (source (origin (method url-fetch) (uri (crate-uri "x509-parser" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "0d7nshccpnybbh8mypirplf4bqxiy36bgh4rrd7jzng19bsw5c5s")))) + "1nk3ryam7yzsza735xdypkv1i4c35gqlygax5jyr74bbnsjznsbh")))) (build-system cargo-build-system) (arguments `(#:cargo-inputs -- cgit v1.2.3