Merge branch 'rust-team'

Change-Id: Iee31c5de29c357c822f60df4fa8ce758779eb349
This commit is contained in:
Efraim Flashner 2024-02-28 12:18:45 +02:00
commit f29f80c194
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351
40 changed files with 38051 additions and 26900 deletions

View file

@ -201,9 +201,15 @@ GNU_SYSTEM_MODULES = \
%D%/packages/cpp.scm \
%D%/packages/cppi.scm \
%D%/packages/cran.scm \
%D%/packages/crates-apple.scm \
%D%/packages/crates-crypto.scm \
%D%/packages/crates-io.scm \
%D%/packages/crates-graphics.scm \
%D%/packages/crates-gtk.scm \
%D%/packages/crates-tls.scm \
%D%/packages/crates-vcs.scm \
%D%/packages/crates-web.scm \
%D%/packages/crates-windows.scm \
%D%/packages/cross-base.scm \
%D%/packages/cross-toolchain.scm \
%D%/packages/crypto.scm \
@ -2000,13 +2006,14 @@ dist_patch_DATA = \
%D%/packages/patches/rustc-1.54.0-src.patch \
%D%/packages/patches/rust-1.64-fix-riscv64-bootstrap.patch \
%D%/packages/patches/rust-1.70-fix-rustix-build.patch \
%D%/packages/patches/rust-ring-0.16-missing-files.patch \
%D%/packages/patches/rust-ring-0.16-test-files.patch \
%D%/packages/patches/i3status-rust-enable-unstable-features.patch \
%D%/packages/patches/rust-cargo-edit-remove-ureq.patch \
%D%/packages/patches/rust-ring-0.17-ring-core.patch \
%D%/packages/patches/rust-ndarray-remove-blas-src-dep.patch \
%D%/packages/patches/rust-ndarray-0.13-remove-blas-src.patch \
%D%/packages/patches/rust-ndarray-0.14-remove-blas-src.patch \
%D%/packages/patches/rust-nettle-disable-vendor.patch \
%D%/packages/patches/rust-rspec-1-remove-clippy.patch \
%D%/packages/patches/rust-trash-2-update-windows.patch \
%D%/packages/patches/rust-webbrowser-remove-unsupported-os.patch \
%D%/packages/patches/rust-wl-clipboard-rs-newer-wl.patch \
%D%/packages/patches/rw-igraph-0.10.patch \

View file

@ -114,6 +114,7 @@ (define-module (gnu packages admin)
#:use-module (gnu packages compression)
#:use-module (gnu packages crates-graphics)
#:use-module (gnu packages crates-io)
#:use-module (gnu packages crates-windows)
#:use-module (gnu packages crypto)
#:use-module (gnu packages cryptsetup)
#:use-module (gnu packages curl)

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

1714
gnu/packages/crates-tls.scm Normal file

File diff suppressed because it is too large Load diff

4163
gnu/packages/crates-vcs.scm Normal file

File diff suppressed because it is too large Load diff

5654
gnu/packages/crates-web.scm Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -53,6 +53,7 @@ (define-module (gnu packages crypto)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages cpp)
#:use-module (gnu packages crates-crypto)
#:use-module (gnu packages crates-io)
#:use-module (gnu packages cryptsetup)
#:use-module (gnu packages curl)

View file

@ -238,6 +238,7 @@ (define-module (gnu packages gnome)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix platform)
#:use-module (guix utils)
#:use-module (guix gexp)
#:use-module (ice-9 match)
@ -3593,12 +3594,12 @@ (define-public librsvg
;; In lieu of #:make-flags
(setenv "CC" #$(cc-for-target))
(setenv "PKG_CONFIG" #$(pkg-config-for-target))
(when #$(%current-target-system)
(setenv "RUST_TARGET"
(string-replace
#$(%current-target-system)
"-unknown-linux-gnu"
(string-index #$(%current-target-system) #\-))))
#$@(if (%current-target-system)
#~((setenv "RUST_TARGET"
#$(platform-rust-target
(lookup-platform-by-target
(%current-target-system)))))
#~())
;; Something about the build environment resists building
;; successfully with the '--locked' flag.
(substitute* '("Makefile.am" "Makefile.in")

View file

@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015, 2016, 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016, 2024 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
@ -66,14 +66,14 @@ (define-public gnucash
;; directory.
(package
(name "gnucash")
(version "5.3")
(version "5.5")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/gnucash/gnucash%20%28stable%29/"
version "/gnucash-" version ".tar.bz2"))
(sha256
(base32 "0npilq0spalpg1ma956j7vlbn0yc5f0z5imy4kbyksl5ql4cnn0l"))))
(base32 "0fzds1yq298c3rvi07if1bfxff904jbzmsb27wr0ddwjp1xzdnml"))))
(outputs '("out" "doc" "debug" "python"))
(build-system cmake-build-system)
(arguments
@ -214,13 +214,11 @@ (define gnucash-docs
(source
(origin
(method url-fetch)
;; The filename for version 5.3 is gnucash-docs-5.2.tar.gz, not
;; gnucash-docs-5.3.tar.gz.
(uri (string-append
"mirror://sourceforge/gnucash/gnucash%20%28stable%29/"
version "/gnucash-docs-5.2" revision ".tar.gz"))
version "/gnucash-docs-" version revision ".tar.gz"))
(sha256
(base32 "16xlxwdgc0w4cg9kxg4w2f1y974cb16wq2c9icq5qrh3nj0nbsxr"))))
(base32 "1ay8jzxrsb9qmbx0v12kqdjk6l3j7cafgxswa92yynihv5ahymlk"))))
(build-system cmake-build-system)
;; These are native-inputs because they are only required for building the
;; documentation.

View file

@ -2,7 +2,7 @@
;;; Copyright © 2017-2024 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
;;; Copyright © 2018, 2020, 2022 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2019, 2021, 2022, 2024 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2019 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2020 Alexander Krotov <krotov@iitp.ru>
;;; Copyright © 2020 Pierre Langlois <pierre.langlos@gmx.com>
@ -833,6 +833,8 @@ (define-public python-graph-tool
(guix build python-build-system))
#:modules (,@%gnu-build-system-modules
((guix build python-build-system) #:select (site-packages)))
;; The build process peaks around 4GB/RAM per core.
#:parallel-build? #f
#:configure-flags
(list (string-append "--with-boost="
(assoc-ref %build-inputs "boost"))

View file

@ -3,7 +3,7 @@
;;; Copyright © 2014 John Darrington <jmd@gnu.org>
;;; Copyright © 2015, 2016 Sou Bunnbu <iyzsong@gmail.com>
;;; Copyright © 2015, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016, 2017, 2022 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016, 2017, 2022-2024 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016, 2018 Leo Famulari <leo@famulari.name>
;;; Copyright © 2017, 2023 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
@ -800,19 +800,17 @@ (define-public gst-plugins-bad
;; The 'elements_curlhttpsrc' test sometimes times out.
((".*'elements/curlhttpsrc\\.c'.*") "")
;; TODO: Figure out why this test fails on riscv64-linux.
#$@(if (target-riscv64?)
`((("'elements/viewfinderbin\\.c'\\].*],")
"'elements/viewfinderbin.c'], true, ],"))
'())
;; This test is flaky on at least some architectures.
;; https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1244
#$@(if (target-riscv64?)
`((("'elements/camerabin\\.c'\\].*],")
"'elements/camerabin.c'], true, ],")
(("'elements/viewfinderbin\\.c'\\].*],")
"'elements/viewfinderbin.c'], true, ],"))
'())
;; This substitution is no longer effective and can be removed.
#$@(if (member (%current-system)
'("i686-linux" "aarch64-linux" "riscv64-linux"))
`((("'elements/camerabin\\.c'\\]\\],")
'("aarch64-linux" "riscv64-linux"))
`((("'elements/camerabin\\.c'\\].*],")
"'elements/camerabin.c'], true, ],"))
'())

View file

@ -1,20 +0,0 @@
From 3006390c0058f06c255d9850327163aebcdc3b40 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Mon, 11 Oct 2021 22:35:39 +0200
Subject: [PATCH] Enable unstable features.
diff --git a/src/main.rs b/src/main.rs
index d9e964b..820e22e 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,3 +1,6 @@
+#![feature(bool_to_option)]
+#![feature(clamp)]
+
#[macro_use]
mod de;
#[macro_use]
--
2.33.0

View file

@ -2,27 +2,27 @@ Remove dependencies on xwin and zig. We're not offering cross-compilation
options using these crates.
diff --git a/Cargo.toml b/Cargo.toml
index 6cbdca3..22ea5ef 100644
index 6704e46..ff126a9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -76,16 +76,6 @@ version = "0.1.4"
@@ -83,16 +83,6 @@ version = "0.1.16"
[dependencies.cargo-options]
version = "0.6.0"
version = "0.7.2"
-[dependencies.cargo-xwin]
-version = "0.14.3"
-version = "0.16.2"
-optional = true
-default-features = false
-
-[dependencies.cargo-zigbuild]
-version = "0.16.10"
-version = "0.18.0"
-optional = true
-default-features = false
-
[dependencies.cargo_metadata]
version = "0.15.3"
version = "0.18.0"
@@ -310,8 +300,6 @@ version = "4.3.0"
@@ -321,8 +311,6 @@ version = "5.0.0"
[features]
cli-completion = ["dep:clap_complete_command"]
cross-compile = [
@ -31,7 +31,7 @@ index 6cbdca3..22ea5ef 100644
]
default = [
"full",
@@ -330,7 +318,6 @@ log = ["tracing-subscriber"]
@@ -341,7 +329,6 @@ log = ["tracing-subscriber"]
native-tls = [
"dep:native-tls",
"ureq?/native-tls",
@ -39,7 +39,7 @@ index 6cbdca3..22ea5ef 100644
"dep:rustls-pemfile",
]
password-storage = [
@@ -340,7 +327,6 @@ password-storage = [
@@ -351,7 +338,6 @@ password-storage = [
rustls = [
"dep:rustls",
"ureq?/tls",
@ -47,7 +47,7 @@ index 6cbdca3..22ea5ef 100644
"dep:rustls-pemfile",
]
scaffolding = [
@@ -358,5 +344,3 @@ upload = [
@@ -369,5 +355,3 @@ upload = [
"wild",
"dep:dirs",
]

View file

@ -0,0 +1,33 @@
This is modeled after the upstream commit which removes ureq as a dependency.
diff --git a/Cargo.toml b/Cargo.toml
index 5a787e1..27171c7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -201,26 +201,3 @@ test-external-apis = []
upgrade = ["cli"]
vendored-libgit2 = ["git2/vendored-libgit2"]
vendored-openssl = ["git2/vendored-openssl"]
-
-[target."cfg(any(target_arch = \"x86_64\", target_arch = \"arm\", target_arch = \"x86\", target_arch = \"aarch64\"))".dependencies.ureq]
-version = "2.7.1"
-features = [
- "tls",
- "json",
- "socks",
- "socks-proxy",
-]
-default-features = false
-
-[target."cfg(not(any(target_arch = \"x86_64\", target_arch = \"arm\", target_arch = \"x86\", target_arch = \"aarch64\")))".dependencies.native-tls]
-version = "^0.2"
-
-[target."cfg(not(any(target_arch = \"x86_64\", target_arch = \"arm\", target_arch = \"x86\", target_arch = \"aarch64\")))".dependencies.ureq]
-version = "2.7.1"
-features = [
- "native-tls",
- "json",
- "socks",
- "socks-proxy",
-]
-default-features = false

File diff suppressed because it is too large Load diff

View file

@ -1,54 +0,0 @@
This file exists in the upstream repository at the commit which
corresponds to the ring-0.16.20 release, but was excluded from the
release tarball.
---
tests/ed25519_verify_tests.txt | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
create mode 100644 tests/ed25519_verify_tests.txt
diff --git a/tests/ed25519_verify_tests.txt b/tests/ed25519_verify_tests.txt
new file mode 100644
index 0000000..74c94b3
--- /dev/null
+++ b/tests/ed25519_verify_tests.txt
@@ -0,0 +1,34 @@
+# BoringSSL TEST(Ed25519Test Malleability)
+
+# Control; S is in range.
+MESSAGE = 54657374
+SIG = 7c38e026f29e14aabd059a0f2db8b0cd783040609a8be684db12f82a27774ab07a9155711ecfaf7f99f277bad0c6ae7e39d4eef676573336a5c51eb6f946b30d
+PUB = 7d4d0e7f6153a69b6242b522abbee685fda4420f8834b108c3bdae369ef549fa
+Result = P
+
+# Same as above, but with the order L added to S so it is out of range.
+# BoringSSL commit 472ba2c2dd52d06a657a63b7fbf02732a6649d21
+MESSAGE = 54657374
+SIG = 7c38e026f29e14aabd059a0f2db8b0cd783040609a8be684db12f82a27774ab067654bce3832c2d76f8f6f5dafc08d9339d4eef676573336a5c51eb6f946b31d
+PUB = 7d4d0e7f6153a69b6242b522abbee685fda4420f8834b108c3bdae369ef549fa
+Result = F
+
+
+# BoringSSL commit 3094902fcdc2db2cc832fa854b9a6a8be383926c
+MESSAGE = 124e583f8b8eca58bb29c271b41d36986bbc45541f8e51f9cb0133eca447601e
+SIG = dac119d6ca87fc59ae611c157048f4d4fc932a149dbe20ec6effd1436abf83ea05c7df0fef06147241259113909bc71bd3c53ba4464ffcad3c0968f2ffffff0f
+PUB = 100fdf47fb94f1536a4f7c3fda27383fa03375a8f527c537e6f1703c47f94f86
+Result = P
+
+# Control. Same key as above; same message and signature as below, except S is in range.
+PUB = 100fdf47fb94f1536a4f7c3fda27383fa03375a8f527c537e6f1703c47f94f86
+MESSAGE = 6a0bc2b0057cedfc0fa2e3f7f7d39279b30f454a69dfd1117c758d86b19d85e0
+SIG = 0971f86d2c9c78582524a103cb9cf949522ae528f8054dc20107d999be673ff4f58ac9d20ec563133cabc6230b1db8625f8446639ede46ad4df4053000000000
+Result = P
+
+# Same key as above, but S is out of range.
+# BoringSSL commit 472ba2c2dd52d06a657a63b7fbf02732a6649d21
+PUB = 100fdf47fb94f1536a4f7c3fda27383fa03375a8f527c537e6f1703c47f94f86
+MESSAGE = 6a0bc2b0057cedfc0fa2e3f7f7d39279b30f454a69dfd1117c758d86b19d85e0
+SIG = 0971f86d2c9c78582524a103cb9cf949522ae528f8054dc20107d999be673ff4e25ebf2f2928766b1248bec6e91697775f8446639ede46ad4df4053000000010
+Result = F
--
Efraim Flashner <efraim@flashner.co.il> רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

View file

@ -0,0 +1,496 @@
These two files are needed to finish generating the files for windows
and were generated using 'RING_PREGENERATE_ASM=1 cargo build
--target-dir=target/pregenerate_asm'. Included here so we don't need to
add cargo to the computed-source.
---
.../ring_core_generated/prefix_symbols_asm.h | 236 ++++++++++++++++++
.../prefix_symbols_nasm.inc | 236 ++++++++++++++++++
2 files changed, 472 insertions(+)
create mode 100644 pregenerated/tmp/ring_core_generated/prefix_symbols_asm.h
create mode 100644 pregenerated/tmp/ring_core_generated/prefix_symbols_nasm.inc
diff --git a/pregenerated/tmp/ring_core_generated/prefix_symbols_asm.h b/pregenerated/tmp/ring_core_generated/prefix_symbols_asm.h
new file mode 100644
index 000000000..1cd766400
--- /dev/null
+++ b/pregenerated/tmp/ring_core_generated/prefix_symbols_asm.h
@@ -0,0 +1,236 @@
+
+#ifndef ring_core_generated_PREFIX_SYMBOLS_ASM_H
+#define ring_core_generated_PREFIX_SYMBOLS_ASM_H
+
+#if defined(__APPLE__)
+#define _ecp_nistz256_point_double _p256_point_double
+#define _ecp_nistz256_point_add _p256_point_add
+#define _ecp_nistz256_point_add_affine _p256_point_add_affine
+#define _ecp_nistz256_ord_mul_mont _p256_scalar_mul_mont
+#define _ecp_nistz256_ord_sqr_mont _p256_scalar_sqr_rep_mont
+#define _ecp_nistz256_mul_mont _p256_mul_mont
+#define _ecp_nistz256_sqr_mont _p256_sqr_mont
+#define _CRYPTO_memcmp _ring_core_0_17_7_CRYPTO_memcmp
+#define _CRYPTO_poly1305_finish _ring_core_0_17_7_CRYPTO_poly1305_finish
+#define _CRYPTO_poly1305_finish_neon _ring_core_0_17_7_CRYPTO_poly1305_finish_neon
+#define _CRYPTO_poly1305_init _ring_core_0_17_7_CRYPTO_poly1305_init
+#define _CRYPTO_poly1305_init_neon _ring_core_0_17_7_CRYPTO_poly1305_init_neon
+#define _CRYPTO_poly1305_update _ring_core_0_17_7_CRYPTO_poly1305_update
+#define _CRYPTO_poly1305_update_neon _ring_core_0_17_7_CRYPTO_poly1305_update_neon
+#define _ChaCha20_ctr32 _ring_core_0_17_7_ChaCha20_ctr32
+#define _LIMBS_add_mod _ring_core_0_17_7_LIMBS_add_mod
+#define _LIMBS_are_even _ring_core_0_17_7_LIMBS_are_even
+#define _LIMBS_are_zero _ring_core_0_17_7_LIMBS_are_zero
+#define _LIMBS_equal _ring_core_0_17_7_LIMBS_equal
+#define _LIMBS_equal_limb _ring_core_0_17_7_LIMBS_equal_limb
+#define _LIMBS_less_than _ring_core_0_17_7_LIMBS_less_than
+#define _LIMBS_less_than_limb _ring_core_0_17_7_LIMBS_less_than_limb
+#define _LIMBS_reduce_once _ring_core_0_17_7_LIMBS_reduce_once
+#define _LIMBS_select_512_32 _ring_core_0_17_7_LIMBS_select_512_32
+#define _LIMBS_shl_mod _ring_core_0_17_7_LIMBS_shl_mod
+#define _LIMBS_sub_mod _ring_core_0_17_7_LIMBS_sub_mod
+#define _LIMBS_window5_split_window _ring_core_0_17_7_LIMBS_window5_split_window
+#define _LIMBS_window5_unsplit_window _ring_core_0_17_7_LIMBS_window5_unsplit_window
+#define _LIMB_shr _ring_core_0_17_7_LIMB_shr
+#define _OPENSSL_armcap_P _ring_core_0_17_7_OPENSSL_armcap_P
+#define _OPENSSL_cpuid_setup _ring_core_0_17_7_OPENSSL_cpuid_setup
+#define _OPENSSL_ia32cap_P _ring_core_0_17_7_OPENSSL_ia32cap_P
+#define _aes_hw_ctr32_encrypt_blocks _ring_core_0_17_7_aes_hw_ctr32_encrypt_blocks
+#define _aes_hw_encrypt _ring_core_0_17_7_aes_hw_encrypt
+#define _aes_hw_set_encrypt_key _ring_core_0_17_7_aes_hw_set_encrypt_key
+#define _aes_nohw_ctr32_encrypt_blocks _ring_core_0_17_7_aes_nohw_ctr32_encrypt_blocks
+#define _aes_nohw_encrypt _ring_core_0_17_7_aes_nohw_encrypt
+#define _aes_nohw_set_encrypt_key _ring_core_0_17_7_aes_nohw_set_encrypt_key
+#define _aesni_gcm_decrypt _ring_core_0_17_7_aesni_gcm_decrypt
+#define _aesni_gcm_encrypt _ring_core_0_17_7_aesni_gcm_encrypt
+#define _bn_from_montgomery_in_place _ring_core_0_17_7_bn_from_montgomery_in_place
+#define _bn_gather5 _ring_core_0_17_7_bn_gather5
+#define _bn_mul_mont _ring_core_0_17_7_bn_mul_mont
+#define _bn_mul_mont_gather5 _ring_core_0_17_7_bn_mul_mont_gather5
+#define _bn_neg_inv_mod_r_u64 _ring_core_0_17_7_bn_neg_inv_mod_r_u64
+#define _bn_power5 _ring_core_0_17_7_bn_power5
+#define _bn_scatter5 _ring_core_0_17_7_bn_scatter5
+#define _bn_sqr8x_internal _ring_core_0_17_7_bn_sqr8x_internal
+#define _bn_sqrx8x_internal _ring_core_0_17_7_bn_sqrx8x_internal
+#define _bsaes_ctr32_encrypt_blocks _ring_core_0_17_7_bsaes_ctr32_encrypt_blocks
+#define _bssl_constant_time_test_conditional_memcpy _ring_core_0_17_7_bssl_constant_time_test_conditional_memcpy
+#define _bssl_constant_time_test_conditional_memxor _ring_core_0_17_7_bssl_constant_time_test_conditional_memxor
+#define _bssl_constant_time_test_main _ring_core_0_17_7_bssl_constant_time_test_main
+#define _chacha20_poly1305_open _ring_core_0_17_7_chacha20_poly1305_open
+#define _chacha20_poly1305_seal _ring_core_0_17_7_chacha20_poly1305_seal
+#define _fiat_curve25519_adx_mul _ring_core_0_17_7_fiat_curve25519_adx_mul
+#define _fiat_curve25519_adx_square _ring_core_0_17_7_fiat_curve25519_adx_square
+#define _gcm_ghash_avx _ring_core_0_17_7_gcm_ghash_avx
+#define _gcm_ghash_clmul _ring_core_0_17_7_gcm_ghash_clmul
+#define _gcm_ghash_neon _ring_core_0_17_7_gcm_ghash_neon
+#define _gcm_gmult_clmul _ring_core_0_17_7_gcm_gmult_clmul
+#define _gcm_gmult_neon _ring_core_0_17_7_gcm_gmult_neon
+#define _gcm_init_avx _ring_core_0_17_7_gcm_init_avx
+#define _gcm_init_clmul _ring_core_0_17_7_gcm_init_clmul
+#define _gcm_init_neon _ring_core_0_17_7_gcm_init_neon
+#define _k25519Precomp _ring_core_0_17_7_k25519Precomp
+#define _limbs_mul_add_limb _ring_core_0_17_7_limbs_mul_add_limb
+#define _little_endian_bytes_from_scalar _ring_core_0_17_7_little_endian_bytes_from_scalar
+#define _ecp_nistz256_neg _ring_core_0_17_7_ecp_nistz256_neg
+#define _ecp_nistz256_select_w5 _ring_core_0_17_7_ecp_nistz256_select_w5
+#define _ecp_nistz256_select_w7 _ring_core_0_17_7_ecp_nistz256_select_w7
+#define _p256_mul_mont _ring_core_0_17_7_p256_mul_mont
+#define _p256_point_add _ring_core_0_17_7_p256_point_add
+#define _p256_point_add_affine _ring_core_0_17_7_p256_point_add_affine
+#define _p256_point_double _ring_core_0_17_7_p256_point_double
+#define _p256_point_mul _ring_core_0_17_7_p256_point_mul
+#define _p256_point_mul_base _ring_core_0_17_7_p256_point_mul_base
+#define _p256_point_mul_base_vartime _ring_core_0_17_7_p256_point_mul_base_vartime
+#define _p256_scalar_mul_mont _ring_core_0_17_7_p256_scalar_mul_mont
+#define _p256_scalar_sqr_rep_mont _ring_core_0_17_7_p256_scalar_sqr_rep_mont
+#define _p256_sqr_mont _ring_core_0_17_7_p256_sqr_mont
+#define _p384_elem_div_by_2 _ring_core_0_17_7_p384_elem_div_by_2
+#define _p384_elem_mul_mont _ring_core_0_17_7_p384_elem_mul_mont
+#define _p384_elem_neg _ring_core_0_17_7_p384_elem_neg
+#define _p384_elem_sub _ring_core_0_17_7_p384_elem_sub
+#define _p384_point_add _ring_core_0_17_7_p384_point_add
+#define _p384_point_double _ring_core_0_17_7_p384_point_double
+#define _p384_point_mul _ring_core_0_17_7_p384_point_mul
+#define _p384_scalar_mul_mont _ring_core_0_17_7_p384_scalar_mul_mont
+#define _openssl_poly1305_neon2_addmulmod _ring_core_0_17_7_openssl_poly1305_neon2_addmulmod
+#define _openssl_poly1305_neon2_blocks _ring_core_0_17_7_openssl_poly1305_neon2_blocks
+#define _sha256_block_data_order _ring_core_0_17_7_sha256_block_data_order
+#define _sha512_block_data_order _ring_core_0_17_7_sha512_block_data_order
+#define _vpaes_ctr32_encrypt_blocks _ring_core_0_17_7_vpaes_ctr32_encrypt_blocks
+#define _vpaes_encrypt _ring_core_0_17_7_vpaes_encrypt
+#define _vpaes_encrypt_key_to_bsaes _ring_core_0_17_7_vpaes_encrypt_key_to_bsaes
+#define _vpaes_set_encrypt_key _ring_core_0_17_7_vpaes_set_encrypt_key
+#define _x25519_NEON _ring_core_0_17_7_x25519_NEON
+#define _x25519_fe_invert _ring_core_0_17_7_x25519_fe_invert
+#define _x25519_fe_isnegative _ring_core_0_17_7_x25519_fe_isnegative
+#define _x25519_fe_mul_ttt _ring_core_0_17_7_x25519_fe_mul_ttt
+#define _x25519_fe_neg _ring_core_0_17_7_x25519_fe_neg
+#define _x25519_fe_tobytes _ring_core_0_17_7_x25519_fe_tobytes
+#define _x25519_ge_double_scalarmult_vartime _ring_core_0_17_7_x25519_ge_double_scalarmult_vartime
+#define _x25519_ge_frombytes_vartime _ring_core_0_17_7_x25519_ge_frombytes_vartime
+#define _x25519_ge_scalarmult_base _ring_core_0_17_7_x25519_ge_scalarmult_base
+#define _x25519_ge_scalarmult_base_adx _ring_core_0_17_7_x25519_ge_scalarmult_base_adx
+#define _x25519_public_from_private_generic_masked _ring_core_0_17_7_x25519_public_from_private_generic_masked
+#define _x25519_sc_mask _ring_core_0_17_7_x25519_sc_mask
+#define _x25519_sc_muladd _ring_core_0_17_7_x25519_sc_muladd
+#define _x25519_sc_reduce _ring_core_0_17_7_x25519_sc_reduce
+#define _x25519_scalar_mult_adx _ring_core_0_17_7_x25519_scalar_mult_adx
+#define _x25519_scalar_mult_generic_masked _ring_core_0_17_7_x25519_scalar_mult_generic_masked
+
+#else
+#define ecp_nistz256_point_double p256_point_double
+#define ecp_nistz256_point_add p256_point_add
+#define ecp_nistz256_point_add_affine p256_point_add_affine
+#define ecp_nistz256_ord_mul_mont p256_scalar_mul_mont
+#define ecp_nistz256_ord_sqr_mont p256_scalar_sqr_rep_mont
+#define ecp_nistz256_mul_mont p256_mul_mont
+#define ecp_nistz256_sqr_mont p256_sqr_mont
+#define CRYPTO_memcmp ring_core_0_17_7_CRYPTO_memcmp
+#define CRYPTO_poly1305_finish ring_core_0_17_7_CRYPTO_poly1305_finish
+#define CRYPTO_poly1305_finish_neon ring_core_0_17_7_CRYPTO_poly1305_finish_neon
+#define CRYPTO_poly1305_init ring_core_0_17_7_CRYPTO_poly1305_init
+#define CRYPTO_poly1305_init_neon ring_core_0_17_7_CRYPTO_poly1305_init_neon
+#define CRYPTO_poly1305_update ring_core_0_17_7_CRYPTO_poly1305_update
+#define CRYPTO_poly1305_update_neon ring_core_0_17_7_CRYPTO_poly1305_update_neon
+#define ChaCha20_ctr32 ring_core_0_17_7_ChaCha20_ctr32
+#define LIMBS_add_mod ring_core_0_17_7_LIMBS_add_mod
+#define LIMBS_are_even ring_core_0_17_7_LIMBS_are_even
+#define LIMBS_are_zero ring_core_0_17_7_LIMBS_are_zero
+#define LIMBS_equal ring_core_0_17_7_LIMBS_equal
+#define LIMBS_equal_limb ring_core_0_17_7_LIMBS_equal_limb
+#define LIMBS_less_than ring_core_0_17_7_LIMBS_less_than
+#define LIMBS_less_than_limb ring_core_0_17_7_LIMBS_less_than_limb
+#define LIMBS_reduce_once ring_core_0_17_7_LIMBS_reduce_once
+#define LIMBS_select_512_32 ring_core_0_17_7_LIMBS_select_512_32
+#define LIMBS_shl_mod ring_core_0_17_7_LIMBS_shl_mod
+#define LIMBS_sub_mod ring_core_0_17_7_LIMBS_sub_mod
+#define LIMBS_window5_split_window ring_core_0_17_7_LIMBS_window5_split_window
+#define LIMBS_window5_unsplit_window ring_core_0_17_7_LIMBS_window5_unsplit_window
+#define LIMB_shr ring_core_0_17_7_LIMB_shr
+#define OPENSSL_armcap_P ring_core_0_17_7_OPENSSL_armcap_P
+#define OPENSSL_cpuid_setup ring_core_0_17_7_OPENSSL_cpuid_setup
+#define OPENSSL_ia32cap_P ring_core_0_17_7_OPENSSL_ia32cap_P
+#define aes_hw_ctr32_encrypt_blocks ring_core_0_17_7_aes_hw_ctr32_encrypt_blocks
+#define aes_hw_encrypt ring_core_0_17_7_aes_hw_encrypt
+#define aes_hw_set_encrypt_key ring_core_0_17_7_aes_hw_set_encrypt_key
+#define aes_nohw_ctr32_encrypt_blocks ring_core_0_17_7_aes_nohw_ctr32_encrypt_blocks
+#define aes_nohw_encrypt ring_core_0_17_7_aes_nohw_encrypt
+#define aes_nohw_set_encrypt_key ring_core_0_17_7_aes_nohw_set_encrypt_key
+#define aesni_gcm_decrypt ring_core_0_17_7_aesni_gcm_decrypt
+#define aesni_gcm_encrypt ring_core_0_17_7_aesni_gcm_encrypt
+#define bn_from_montgomery_in_place ring_core_0_17_7_bn_from_montgomery_in_place
+#define bn_gather5 ring_core_0_17_7_bn_gather5
+#define bn_mul_mont ring_core_0_17_7_bn_mul_mont
+#define bn_mul_mont_gather5 ring_core_0_17_7_bn_mul_mont_gather5
+#define bn_neg_inv_mod_r_u64 ring_core_0_17_7_bn_neg_inv_mod_r_u64
+#define bn_power5 ring_core_0_17_7_bn_power5
+#define bn_scatter5 ring_core_0_17_7_bn_scatter5
+#define bn_sqr8x_internal ring_core_0_17_7_bn_sqr8x_internal
+#define bn_sqrx8x_internal ring_core_0_17_7_bn_sqrx8x_internal
+#define bsaes_ctr32_encrypt_blocks ring_core_0_17_7_bsaes_ctr32_encrypt_blocks
+#define bssl_constant_time_test_conditional_memcpy ring_core_0_17_7_bssl_constant_time_test_conditional_memcpy
+#define bssl_constant_time_test_conditional_memxor ring_core_0_17_7_bssl_constant_time_test_conditional_memxor
+#define bssl_constant_time_test_main ring_core_0_17_7_bssl_constant_time_test_main
+#define chacha20_poly1305_open ring_core_0_17_7_chacha20_poly1305_open
+#define chacha20_poly1305_seal ring_core_0_17_7_chacha20_poly1305_seal
+#define fiat_curve25519_adx_mul ring_core_0_17_7_fiat_curve25519_adx_mul
+#define fiat_curve25519_adx_square ring_core_0_17_7_fiat_curve25519_adx_square
+#define gcm_ghash_avx ring_core_0_17_7_gcm_ghash_avx
+#define gcm_ghash_clmul ring_core_0_17_7_gcm_ghash_clmul
+#define gcm_ghash_neon ring_core_0_17_7_gcm_ghash_neon
+#define gcm_gmult_clmul ring_core_0_17_7_gcm_gmult_clmul
+#define gcm_gmult_neon ring_core_0_17_7_gcm_gmult_neon
+#define gcm_init_avx ring_core_0_17_7_gcm_init_avx
+#define gcm_init_clmul ring_core_0_17_7_gcm_init_clmul
+#define gcm_init_neon ring_core_0_17_7_gcm_init_neon
+#define k25519Precomp ring_core_0_17_7_k25519Precomp
+#define limbs_mul_add_limb ring_core_0_17_7_limbs_mul_add_limb
+#define little_endian_bytes_from_scalar ring_core_0_17_7_little_endian_bytes_from_scalar
+#define ecp_nistz256_neg ring_core_0_17_7_ecp_nistz256_neg
+#define ecp_nistz256_select_w5 ring_core_0_17_7_ecp_nistz256_select_w5
+#define ecp_nistz256_select_w7 ring_core_0_17_7_ecp_nistz256_select_w7
+#define p256_mul_mont ring_core_0_17_7_p256_mul_mont
+#define p256_point_add ring_core_0_17_7_p256_point_add
+#define p256_point_add_affine ring_core_0_17_7_p256_point_add_affine
+#define p256_point_double ring_core_0_17_7_p256_point_double
+#define p256_point_mul ring_core_0_17_7_p256_point_mul
+#define p256_point_mul_base ring_core_0_17_7_p256_point_mul_base
+#define p256_point_mul_base_vartime ring_core_0_17_7_p256_point_mul_base_vartime
+#define p256_scalar_mul_mont ring_core_0_17_7_p256_scalar_mul_mont
+#define p256_scalar_sqr_rep_mont ring_core_0_17_7_p256_scalar_sqr_rep_mont
+#define p256_sqr_mont ring_core_0_17_7_p256_sqr_mont
+#define p384_elem_div_by_2 ring_core_0_17_7_p384_elem_div_by_2
+#define p384_elem_mul_mont ring_core_0_17_7_p384_elem_mul_mont
+#define p384_elem_neg ring_core_0_17_7_p384_elem_neg
+#define p384_elem_sub ring_core_0_17_7_p384_elem_sub
+#define p384_point_add ring_core_0_17_7_p384_point_add
+#define p384_point_double ring_core_0_17_7_p384_point_double
+#define p384_point_mul ring_core_0_17_7_p384_point_mul
+#define p384_scalar_mul_mont ring_core_0_17_7_p384_scalar_mul_mont
+#define openssl_poly1305_neon2_addmulmod ring_core_0_17_7_openssl_poly1305_neon2_addmulmod
+#define openssl_poly1305_neon2_blocks ring_core_0_17_7_openssl_poly1305_neon2_blocks
+#define sha256_block_data_order ring_core_0_17_7_sha256_block_data_order
+#define sha512_block_data_order ring_core_0_17_7_sha512_block_data_order
+#define vpaes_ctr32_encrypt_blocks ring_core_0_17_7_vpaes_ctr32_encrypt_blocks
+#define vpaes_encrypt ring_core_0_17_7_vpaes_encrypt
+#define vpaes_encrypt_key_to_bsaes ring_core_0_17_7_vpaes_encrypt_key_to_bsaes
+#define vpaes_set_encrypt_key ring_core_0_17_7_vpaes_set_encrypt_key
+#define x25519_NEON ring_core_0_17_7_x25519_NEON
+#define x25519_fe_invert ring_core_0_17_7_x25519_fe_invert
+#define x25519_fe_isnegative ring_core_0_17_7_x25519_fe_isnegative
+#define x25519_fe_mul_ttt ring_core_0_17_7_x25519_fe_mul_ttt
+#define x25519_fe_neg ring_core_0_17_7_x25519_fe_neg
+#define x25519_fe_tobytes ring_core_0_17_7_x25519_fe_tobytes
+#define x25519_ge_double_scalarmult_vartime ring_core_0_17_7_x25519_ge_double_scalarmult_vartime
+#define x25519_ge_frombytes_vartime ring_core_0_17_7_x25519_ge_frombytes_vartime
+#define x25519_ge_scalarmult_base ring_core_0_17_7_x25519_ge_scalarmult_base
+#define x25519_ge_scalarmult_base_adx ring_core_0_17_7_x25519_ge_scalarmult_base_adx
+#define x25519_public_from_private_generic_masked ring_core_0_17_7_x25519_public_from_private_generic_masked
+#define x25519_sc_mask ring_core_0_17_7_x25519_sc_mask
+#define x25519_sc_muladd ring_core_0_17_7_x25519_sc_muladd
+#define x25519_sc_reduce ring_core_0_17_7_x25519_sc_reduce
+#define x25519_scalar_mult_adx ring_core_0_17_7_x25519_scalar_mult_adx
+#define x25519_scalar_mult_generic_masked ring_core_0_17_7_x25519_scalar_mult_generic_masked
+
+#endif
+#endif
diff --git a/pregenerated/tmp/ring_core_generated/prefix_symbols_nasm.inc b/pregenerated/tmp/ring_core_generated/prefix_symbols_nasm.inc
new file mode 100644
index 000000000..65ce0cfaa
--- /dev/null
+++ b/pregenerated/tmp/ring_core_generated/prefix_symbols_nasm.inc
@@ -0,0 +1,236 @@
+
+%ifndef ring_core_generated_PREFIX_SYMBOLS_NASM_INC
+%define ring_core_generated_PREFIX_SYMBOLS_NASM_INC
+
+%ifidn __OUTPUT_FORMAT__,win32
+%define _ecp_nistz256_point_double _p256_point_double
+%define _ecp_nistz256_point_add _p256_point_add
+%define _ecp_nistz256_point_add_affine _p256_point_add_affine
+%define _ecp_nistz256_ord_mul_mont _p256_scalar_mul_mont
+%define _ecp_nistz256_ord_sqr_mont _p256_scalar_sqr_rep_mont
+%define _ecp_nistz256_mul_mont _p256_mul_mont
+%define _ecp_nistz256_sqr_mont _p256_sqr_mont
+%define _CRYPTO_memcmp _ring_core_0_17_7_CRYPTO_memcmp
+%define _CRYPTO_poly1305_finish _ring_core_0_17_7_CRYPTO_poly1305_finish
+%define _CRYPTO_poly1305_finish_neon _ring_core_0_17_7_CRYPTO_poly1305_finish_neon
+%define _CRYPTO_poly1305_init _ring_core_0_17_7_CRYPTO_poly1305_init
+%define _CRYPTO_poly1305_init_neon _ring_core_0_17_7_CRYPTO_poly1305_init_neon
+%define _CRYPTO_poly1305_update _ring_core_0_17_7_CRYPTO_poly1305_update
+%define _CRYPTO_poly1305_update_neon _ring_core_0_17_7_CRYPTO_poly1305_update_neon
+%define _ChaCha20_ctr32 _ring_core_0_17_7_ChaCha20_ctr32
+%define _LIMBS_add_mod _ring_core_0_17_7_LIMBS_add_mod
+%define _LIMBS_are_even _ring_core_0_17_7_LIMBS_are_even
+%define _LIMBS_are_zero _ring_core_0_17_7_LIMBS_are_zero
+%define _LIMBS_equal _ring_core_0_17_7_LIMBS_equal
+%define _LIMBS_equal_limb _ring_core_0_17_7_LIMBS_equal_limb
+%define _LIMBS_less_than _ring_core_0_17_7_LIMBS_less_than
+%define _LIMBS_less_than_limb _ring_core_0_17_7_LIMBS_less_than_limb
+%define _LIMBS_reduce_once _ring_core_0_17_7_LIMBS_reduce_once
+%define _LIMBS_select_512_32 _ring_core_0_17_7_LIMBS_select_512_32
+%define _LIMBS_shl_mod _ring_core_0_17_7_LIMBS_shl_mod
+%define _LIMBS_sub_mod _ring_core_0_17_7_LIMBS_sub_mod
+%define _LIMBS_window5_split_window _ring_core_0_17_7_LIMBS_window5_split_window
+%define _LIMBS_window5_unsplit_window _ring_core_0_17_7_LIMBS_window5_unsplit_window
+%define _LIMB_shr _ring_core_0_17_7_LIMB_shr
+%define _OPENSSL_armcap_P _ring_core_0_17_7_OPENSSL_armcap_P
+%define _OPENSSL_cpuid_setup _ring_core_0_17_7_OPENSSL_cpuid_setup
+%define _OPENSSL_ia32cap_P _ring_core_0_17_7_OPENSSL_ia32cap_P
+%define _aes_hw_ctr32_encrypt_blocks _ring_core_0_17_7_aes_hw_ctr32_encrypt_blocks
+%define _aes_hw_encrypt _ring_core_0_17_7_aes_hw_encrypt
+%define _aes_hw_set_encrypt_key _ring_core_0_17_7_aes_hw_set_encrypt_key
+%define _aes_nohw_ctr32_encrypt_blocks _ring_core_0_17_7_aes_nohw_ctr32_encrypt_blocks
+%define _aes_nohw_encrypt _ring_core_0_17_7_aes_nohw_encrypt
+%define _aes_nohw_set_encrypt_key _ring_core_0_17_7_aes_nohw_set_encrypt_key
+%define _aesni_gcm_decrypt _ring_core_0_17_7_aesni_gcm_decrypt
+%define _aesni_gcm_encrypt _ring_core_0_17_7_aesni_gcm_encrypt
+%define _bn_from_montgomery_in_place _ring_core_0_17_7_bn_from_montgomery_in_place
+%define _bn_gather5 _ring_core_0_17_7_bn_gather5
+%define _bn_mul_mont _ring_core_0_17_7_bn_mul_mont
+%define _bn_mul_mont_gather5 _ring_core_0_17_7_bn_mul_mont_gather5
+%define _bn_neg_inv_mod_r_u64 _ring_core_0_17_7_bn_neg_inv_mod_r_u64
+%define _bn_power5 _ring_core_0_17_7_bn_power5
+%define _bn_scatter5 _ring_core_0_17_7_bn_scatter5
+%define _bn_sqr8x_internal _ring_core_0_17_7_bn_sqr8x_internal
+%define _bn_sqrx8x_internal _ring_core_0_17_7_bn_sqrx8x_internal
+%define _bsaes_ctr32_encrypt_blocks _ring_core_0_17_7_bsaes_ctr32_encrypt_blocks
+%define _bssl_constant_time_test_conditional_memcpy _ring_core_0_17_7_bssl_constant_time_test_conditional_memcpy
+%define _bssl_constant_time_test_conditional_memxor _ring_core_0_17_7_bssl_constant_time_test_conditional_memxor
+%define _bssl_constant_time_test_main _ring_core_0_17_7_bssl_constant_time_test_main
+%define _chacha20_poly1305_open _ring_core_0_17_7_chacha20_poly1305_open
+%define _chacha20_poly1305_seal _ring_core_0_17_7_chacha20_poly1305_seal
+%define _fiat_curve25519_adx_mul _ring_core_0_17_7_fiat_curve25519_adx_mul
+%define _fiat_curve25519_adx_square _ring_core_0_17_7_fiat_curve25519_adx_square
+%define _gcm_ghash_avx _ring_core_0_17_7_gcm_ghash_avx
+%define _gcm_ghash_clmul _ring_core_0_17_7_gcm_ghash_clmul
+%define _gcm_ghash_neon _ring_core_0_17_7_gcm_ghash_neon
+%define _gcm_gmult_clmul _ring_core_0_17_7_gcm_gmult_clmul
+%define _gcm_gmult_neon _ring_core_0_17_7_gcm_gmult_neon
+%define _gcm_init_avx _ring_core_0_17_7_gcm_init_avx
+%define _gcm_init_clmul _ring_core_0_17_7_gcm_init_clmul
+%define _gcm_init_neon _ring_core_0_17_7_gcm_init_neon
+%define _k25519Precomp _ring_core_0_17_7_k25519Precomp
+%define _limbs_mul_add_limb _ring_core_0_17_7_limbs_mul_add_limb
+%define _little_endian_bytes_from_scalar _ring_core_0_17_7_little_endian_bytes_from_scalar
+%define _ecp_nistz256_neg _ring_core_0_17_7_ecp_nistz256_neg
+%define _ecp_nistz256_select_w5 _ring_core_0_17_7_ecp_nistz256_select_w5
+%define _ecp_nistz256_select_w7 _ring_core_0_17_7_ecp_nistz256_select_w7
+%define _p256_mul_mont _ring_core_0_17_7_p256_mul_mont
+%define _p256_point_add _ring_core_0_17_7_p256_point_add
+%define _p256_point_add_affine _ring_core_0_17_7_p256_point_add_affine
+%define _p256_point_double _ring_core_0_17_7_p256_point_double
+%define _p256_point_mul _ring_core_0_17_7_p256_point_mul
+%define _p256_point_mul_base _ring_core_0_17_7_p256_point_mul_base
+%define _p256_point_mul_base_vartime _ring_core_0_17_7_p256_point_mul_base_vartime
+%define _p256_scalar_mul_mont _ring_core_0_17_7_p256_scalar_mul_mont
+%define _p256_scalar_sqr_rep_mont _ring_core_0_17_7_p256_scalar_sqr_rep_mont
+%define _p256_sqr_mont _ring_core_0_17_7_p256_sqr_mont
+%define _p384_elem_div_by_2 _ring_core_0_17_7_p384_elem_div_by_2
+%define _p384_elem_mul_mont _ring_core_0_17_7_p384_elem_mul_mont
+%define _p384_elem_neg _ring_core_0_17_7_p384_elem_neg
+%define _p384_elem_sub _ring_core_0_17_7_p384_elem_sub
+%define _p384_point_add _ring_core_0_17_7_p384_point_add
+%define _p384_point_double _ring_core_0_17_7_p384_point_double
+%define _p384_point_mul _ring_core_0_17_7_p384_point_mul
+%define _p384_scalar_mul_mont _ring_core_0_17_7_p384_scalar_mul_mont
+%define _openssl_poly1305_neon2_addmulmod _ring_core_0_17_7_openssl_poly1305_neon2_addmulmod
+%define _openssl_poly1305_neon2_blocks _ring_core_0_17_7_openssl_poly1305_neon2_blocks
+%define _sha256_block_data_order _ring_core_0_17_7_sha256_block_data_order
+%define _sha512_block_data_order _ring_core_0_17_7_sha512_block_data_order
+%define _vpaes_ctr32_encrypt_blocks _ring_core_0_17_7_vpaes_ctr32_encrypt_blocks
+%define _vpaes_encrypt _ring_core_0_17_7_vpaes_encrypt
+%define _vpaes_encrypt_key_to_bsaes _ring_core_0_17_7_vpaes_encrypt_key_to_bsaes
+%define _vpaes_set_encrypt_key _ring_core_0_17_7_vpaes_set_encrypt_key
+%define _x25519_NEON _ring_core_0_17_7_x25519_NEON
+%define _x25519_fe_invert _ring_core_0_17_7_x25519_fe_invert
+%define _x25519_fe_isnegative _ring_core_0_17_7_x25519_fe_isnegative
+%define _x25519_fe_mul_ttt _ring_core_0_17_7_x25519_fe_mul_ttt
+%define _x25519_fe_neg _ring_core_0_17_7_x25519_fe_neg
+%define _x25519_fe_tobytes _ring_core_0_17_7_x25519_fe_tobytes
+%define _x25519_ge_double_scalarmult_vartime _ring_core_0_17_7_x25519_ge_double_scalarmult_vartime
+%define _x25519_ge_frombytes_vartime _ring_core_0_17_7_x25519_ge_frombytes_vartime
+%define _x25519_ge_scalarmult_base _ring_core_0_17_7_x25519_ge_scalarmult_base
+%define _x25519_ge_scalarmult_base_adx _ring_core_0_17_7_x25519_ge_scalarmult_base_adx
+%define _x25519_public_from_private_generic_masked _ring_core_0_17_7_x25519_public_from_private_generic_masked
+%define _x25519_sc_mask _ring_core_0_17_7_x25519_sc_mask
+%define _x25519_sc_muladd _ring_core_0_17_7_x25519_sc_muladd
+%define _x25519_sc_reduce _ring_core_0_17_7_x25519_sc_reduce
+%define _x25519_scalar_mult_adx _ring_core_0_17_7_x25519_scalar_mult_adx
+%define _x25519_scalar_mult_generic_masked _ring_core_0_17_7_x25519_scalar_mult_generic_masked
+
+%else
+%define ecp_nistz256_point_double p256_point_double
+%define ecp_nistz256_point_add p256_point_add
+%define ecp_nistz256_point_add_affine p256_point_add_affine
+%define ecp_nistz256_ord_mul_mont p256_scalar_mul_mont
+%define ecp_nistz256_ord_sqr_mont p256_scalar_sqr_rep_mont
+%define ecp_nistz256_mul_mont p256_mul_mont
+%define ecp_nistz256_sqr_mont p256_sqr_mont
+%define CRYPTO_memcmp ring_core_0_17_7_CRYPTO_memcmp
+%define CRYPTO_poly1305_finish ring_core_0_17_7_CRYPTO_poly1305_finish
+%define CRYPTO_poly1305_finish_neon ring_core_0_17_7_CRYPTO_poly1305_finish_neon
+%define CRYPTO_poly1305_init ring_core_0_17_7_CRYPTO_poly1305_init
+%define CRYPTO_poly1305_init_neon ring_core_0_17_7_CRYPTO_poly1305_init_neon
+%define CRYPTO_poly1305_update ring_core_0_17_7_CRYPTO_poly1305_update
+%define CRYPTO_poly1305_update_neon ring_core_0_17_7_CRYPTO_poly1305_update_neon
+%define ChaCha20_ctr32 ring_core_0_17_7_ChaCha20_ctr32
+%define LIMBS_add_mod ring_core_0_17_7_LIMBS_add_mod
+%define LIMBS_are_even ring_core_0_17_7_LIMBS_are_even
+%define LIMBS_are_zero ring_core_0_17_7_LIMBS_are_zero
+%define LIMBS_equal ring_core_0_17_7_LIMBS_equal
+%define LIMBS_equal_limb ring_core_0_17_7_LIMBS_equal_limb
+%define LIMBS_less_than ring_core_0_17_7_LIMBS_less_than
+%define LIMBS_less_than_limb ring_core_0_17_7_LIMBS_less_than_limb
+%define LIMBS_reduce_once ring_core_0_17_7_LIMBS_reduce_once
+%define LIMBS_select_512_32 ring_core_0_17_7_LIMBS_select_512_32
+%define LIMBS_shl_mod ring_core_0_17_7_LIMBS_shl_mod
+%define LIMBS_sub_mod ring_core_0_17_7_LIMBS_sub_mod
+%define LIMBS_window5_split_window ring_core_0_17_7_LIMBS_window5_split_window
+%define LIMBS_window5_unsplit_window ring_core_0_17_7_LIMBS_window5_unsplit_window
+%define LIMB_shr ring_core_0_17_7_LIMB_shr
+%define OPENSSL_armcap_P ring_core_0_17_7_OPENSSL_armcap_P
+%define OPENSSL_cpuid_setup ring_core_0_17_7_OPENSSL_cpuid_setup
+%define OPENSSL_ia32cap_P ring_core_0_17_7_OPENSSL_ia32cap_P
+%define aes_hw_ctr32_encrypt_blocks ring_core_0_17_7_aes_hw_ctr32_encrypt_blocks
+%define aes_hw_encrypt ring_core_0_17_7_aes_hw_encrypt
+%define aes_hw_set_encrypt_key ring_core_0_17_7_aes_hw_set_encrypt_key
+%define aes_nohw_ctr32_encrypt_blocks ring_core_0_17_7_aes_nohw_ctr32_encrypt_blocks
+%define aes_nohw_encrypt ring_core_0_17_7_aes_nohw_encrypt
+%define aes_nohw_set_encrypt_key ring_core_0_17_7_aes_nohw_set_encrypt_key
+%define aesni_gcm_decrypt ring_core_0_17_7_aesni_gcm_decrypt
+%define aesni_gcm_encrypt ring_core_0_17_7_aesni_gcm_encrypt
+%define bn_from_montgomery_in_place ring_core_0_17_7_bn_from_montgomery_in_place
+%define bn_gather5 ring_core_0_17_7_bn_gather5
+%define bn_mul_mont ring_core_0_17_7_bn_mul_mont
+%define bn_mul_mont_gather5 ring_core_0_17_7_bn_mul_mont_gather5
+%define bn_neg_inv_mod_r_u64 ring_core_0_17_7_bn_neg_inv_mod_r_u64
+%define bn_power5 ring_core_0_17_7_bn_power5
+%define bn_scatter5 ring_core_0_17_7_bn_scatter5
+%define bn_sqr8x_internal ring_core_0_17_7_bn_sqr8x_internal
+%define bn_sqrx8x_internal ring_core_0_17_7_bn_sqrx8x_internal
+%define bsaes_ctr32_encrypt_blocks ring_core_0_17_7_bsaes_ctr32_encrypt_blocks
+%define bssl_constant_time_test_conditional_memcpy ring_core_0_17_7_bssl_constant_time_test_conditional_memcpy
+%define bssl_constant_time_test_conditional_memxor ring_core_0_17_7_bssl_constant_time_test_conditional_memxor
+%define bssl_constant_time_test_main ring_core_0_17_7_bssl_constant_time_test_main
+%define chacha20_poly1305_open ring_core_0_17_7_chacha20_poly1305_open
+%define chacha20_poly1305_seal ring_core_0_17_7_chacha20_poly1305_seal
+%define fiat_curve25519_adx_mul ring_core_0_17_7_fiat_curve25519_adx_mul
+%define fiat_curve25519_adx_square ring_core_0_17_7_fiat_curve25519_adx_square
+%define gcm_ghash_avx ring_core_0_17_7_gcm_ghash_avx
+%define gcm_ghash_clmul ring_core_0_17_7_gcm_ghash_clmul
+%define gcm_ghash_neon ring_core_0_17_7_gcm_ghash_neon
+%define gcm_gmult_clmul ring_core_0_17_7_gcm_gmult_clmul
+%define gcm_gmult_neon ring_core_0_17_7_gcm_gmult_neon
+%define gcm_init_avx ring_core_0_17_7_gcm_init_avx
+%define gcm_init_clmul ring_core_0_17_7_gcm_init_clmul
+%define gcm_init_neon ring_core_0_17_7_gcm_init_neon
+%define k25519Precomp ring_core_0_17_7_k25519Precomp
+%define limbs_mul_add_limb ring_core_0_17_7_limbs_mul_add_limb
+%define little_endian_bytes_from_scalar ring_core_0_17_7_little_endian_bytes_from_scalar
+%define ecp_nistz256_neg ring_core_0_17_7_ecp_nistz256_neg
+%define ecp_nistz256_select_w5 ring_core_0_17_7_ecp_nistz256_select_w5
+%define ecp_nistz256_select_w7 ring_core_0_17_7_ecp_nistz256_select_w7
+%define p256_mul_mont ring_core_0_17_7_p256_mul_mont
+%define p256_point_add ring_core_0_17_7_p256_point_add
+%define p256_point_add_affine ring_core_0_17_7_p256_point_add_affine
+%define p256_point_double ring_core_0_17_7_p256_point_double
+%define p256_point_mul ring_core_0_17_7_p256_point_mul
+%define p256_point_mul_base ring_core_0_17_7_p256_point_mul_base
+%define p256_point_mul_base_vartime ring_core_0_17_7_p256_point_mul_base_vartime
+%define p256_scalar_mul_mont ring_core_0_17_7_p256_scalar_mul_mont
+%define p256_scalar_sqr_rep_mont ring_core_0_17_7_p256_scalar_sqr_rep_mont
+%define p256_sqr_mont ring_core_0_17_7_p256_sqr_mont
+%define p384_elem_div_by_2 ring_core_0_17_7_p384_elem_div_by_2
+%define p384_elem_mul_mont ring_core_0_17_7_p384_elem_mul_mont
+%define p384_elem_neg ring_core_0_17_7_p384_elem_neg
+%define p384_elem_sub ring_core_0_17_7_p384_elem_sub
+%define p384_point_add ring_core_0_17_7_p384_point_add
+%define p384_point_double ring_core_0_17_7_p384_point_double
+%define p384_point_mul ring_core_0_17_7_p384_point_mul
+%define p384_scalar_mul_mont ring_core_0_17_7_p384_scalar_mul_mont
+%define openssl_poly1305_neon2_addmulmod ring_core_0_17_7_openssl_poly1305_neon2_addmulmod
+%define openssl_poly1305_neon2_blocks ring_core_0_17_7_openssl_poly1305_neon2_blocks
+%define sha256_block_data_order ring_core_0_17_7_sha256_block_data_order
+%define sha512_block_data_order ring_core_0_17_7_sha512_block_data_order
+%define vpaes_ctr32_encrypt_blocks ring_core_0_17_7_vpaes_ctr32_encrypt_blocks
+%define vpaes_encrypt ring_core_0_17_7_vpaes_encrypt
+%define vpaes_encrypt_key_to_bsaes ring_core_0_17_7_vpaes_encrypt_key_to_bsaes
+%define vpaes_set_encrypt_key ring_core_0_17_7_vpaes_set_encrypt_key
+%define x25519_NEON ring_core_0_17_7_x25519_NEON
+%define x25519_fe_invert ring_core_0_17_7_x25519_fe_invert
+%define x25519_fe_isnegative ring_core_0_17_7_x25519_fe_isnegative
+%define x25519_fe_mul_ttt ring_core_0_17_7_x25519_fe_mul_ttt
+%define x25519_fe_neg ring_core_0_17_7_x25519_fe_neg
+%define x25519_fe_tobytes ring_core_0_17_7_x25519_fe_tobytes
+%define x25519_ge_double_scalarmult_vartime ring_core_0_17_7_x25519_ge_double_scalarmult_vartime
+%define x25519_ge_frombytes_vartime ring_core_0_17_7_x25519_ge_frombytes_vartime
+%define x25519_ge_scalarmult_base ring_core_0_17_7_x25519_ge_scalarmult_base
+%define x25519_ge_scalarmult_base_adx ring_core_0_17_7_x25519_ge_scalarmult_base_adx
+%define x25519_public_from_private_generic_masked ring_core_0_17_7_x25519_public_from_private_generic_masked
+%define x25519_sc_mask ring_core_0_17_7_x25519_sc_mask
+%define x25519_sc_muladd ring_core_0_17_7_x25519_sc_muladd
+%define x25519_sc_reduce ring_core_0_17_7_x25519_sc_reduce
+%define x25519_scalar_mult_adx ring_core_0_17_7_x25519_scalar_mult_adx
+%define x25519_scalar_mult_generic_masked ring_core_0_17_7_x25519_scalar_mult_generic_masked
+
+%endif
+%endif

View file

@ -0,0 +1,16 @@
Remove the dependency on clippy
diff --git a/Cargo.toml b/Cargo.toml
index 177cb80..7260c34 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -39,9 +39,6 @@ version = "1.5"
[dependencies.time]
version = "0.2"
-[build-dependencies.clippy]
-version = "0.0.153"
-optional = true
[features]
default = []

View file

@ -0,0 +1,132 @@
This patch is taken from upstream so we can use an already packaged
version of the windows crate.
diff --git a/Cargo.toml b/Cargo.toml
index 2c28dfe..6b61771 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -87,9 +87,8 @@ version = "0.2.7"
version = "1.0.0"
[target."cfg(windows)".dependencies.windows]
-version = "0.37.0"
+version = "0.44.0"
features = [
- "alloc",
"Win32_Foundation",
"Win32_System_Com_StructuredStorage",
"Win32_UI_Shell_PropertiesSystem",
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 894a78c..c17fc02 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -44,7 +44,7 @@ once_cell = "1.7.2"
once_cell = "1.7.2"
[target.'cfg(windows)'.dependencies]
-windows = { version = "0.37.0", features = [ "alloc",
+windows = { version = "0.44.0", features = [
"Win32_Foundation",
"Win32_System_Com_StructuredStorage",
"Win32_UI_Shell_PropertiesSystem",
diff --git a/src/windows.rs b/src/windows.rs
index c1379d3..3f4426b 100644
--- a/src/windows.rs
+++ b/src/windows.rs
@@ -1,7 +1,6 @@
use crate::{Error, TrashContext, TrashItem};
use std::{
- ffi::{OsStr, OsString},
- mem::MaybeUninit,
+ ffi::{c_void, OsStr, OsString},
os::windows::{ffi::OsStrExt, prelude::*},
path::PathBuf,
};
@@ -66,7 +65,7 @@ impl TrashContext {
let shi: IShellItem =
SHCreateItemFromParsingName(PCWSTR(wide_path_slice.as_ptr()), None)?;
- pfo.DeleteItem(shi, None)?;
+ pfo.DeleteItem(&shi, None)?;
}
pfo.PerformOperations()?;
Ok(())
@@ -78,28 +77,18 @@ pub fn list() -> Result<Vec<TrashItem>, Error> {
ensure_com_initialized();
unsafe {
let mut item_vec = Vec::new();
- let mut recycle_bin = MaybeUninit::<Option<IShellItem>>::uninit();
- SHGetKnownFolderItem(
- &FOLDERID_RecycleBinFolder,
- KF_FLAG_DEFAULT,
- HANDLE::default(),
- &IShellItem::IID,
- recycle_bin.as_mut_ptr() as _,
- )?;
-
- let recycle_bin = recycle_bin.assume_init().ok_or(Error::Unknown {
- description: "SHGetKnownFolderItem gave NULL for FOLDERID_RecycleBinFolder".into(),
- })?;
+ let recycle_bin: IShellItem =
+ SHGetKnownFolderItem(&FOLDERID_RecycleBinFolder, KF_FLAG_DEFAULT, HANDLE::default())?;
let pesi: IEnumShellItems = recycle_bin.BindToHandler(None, &BHID_EnumItems)?;
- let mut fetched: u32 = 0;
loop {
+ let mut fetched_count: u32 = 0;
let mut arr = [None];
- pesi.Next(&mut arr, &mut fetched)?;
+ pesi.Next(&mut arr, Some(&mut fetched_count as *mut u32))?;
- if fetched == 0 {
+ if fetched_count == 0 {
break;
}
@@ -145,7 +134,7 @@ where
at_least_one = true;
let id_as_wide: Vec<u16> = item.id.encode_wide().chain(std::iter::once(0)).collect();
let parsing_name = PCWSTR(id_as_wide.as_ptr());
- let trash_item: IShellItem = SHCreateItemFromParsingName(&parsing_name, None)?;
+ let trash_item: IShellItem = SHCreateItemFromParsingName(parsing_name, None)?;
pfo.DeleteItem(&trash_item, None)?;
}
if at_least_one {
@@ -181,7 +170,7 @@ where
for item in items.iter() {
let id_as_wide: Vec<u16> = item.id.encode_wide().chain(std::iter::once(0)).collect();
let parsing_name = PCWSTR(id_as_wide.as_ptr());
- let trash_item: IShellItem = SHCreateItemFromParsingName(&parsing_name, None)?;
+ let trash_item: IShellItem = SHCreateItemFromParsingName(parsing_name, None)?;
let parent_path_wide: Vec<_> =
item.original_parent.as_os_str().encode_wide().chain(std::iter::once(0)).collect();
let orig_folder_shi: IShellItem =
@@ -191,7 +180,7 @@ where
.chain(std::iter::once(0))
.collect();
- pfo.MoveItem(trash_item, orig_folder_shi, PCWSTR(name_wstr.as_ptr()), None)?;
+ pfo.MoveItem(&trash_item, &orig_folder_shi, PCWSTR(name_wstr.as_ptr()), None)?;
}
if !items.is_empty() {
pfo.PerformOperations()?;
@@ -203,7 +192,7 @@ where
unsafe fn get_display_name(psi: &IShellItem, sigdnname: SIGDN) -> Result<OsString, Error> {
let name = psi.GetDisplayName(sigdnname)?;
let result = wstr_to_os_string(name);
- CoTaskMemFree(name.0 as _);
+ CoTaskMemFree(Some(name.0 as *const c_void));
Ok(result)
}
@@ -257,7 +246,7 @@ impl CoInitializer {
if cfg!(feature = "coinit_speed_over_memory") {
init_mode |= COINIT_SPEED_OVER_MEMORY;
}
- let hr = unsafe { CoInitializeEx(std::ptr::null_mut(), init_mode) };
+ let hr = unsafe { CoInitializeEx(None, init_mode) };
if hr.is_err() {
panic!("Call to CoInitializeEx failed. HRESULT: {:?}. Consider using `trash` with the feature `coinit_multithreaded`", hr);
}

View file

@ -28,51 +28,111 @@
rustc_data_structures::static_assert_size!(ForeignItemKind, 72);
impl From<ForeignItemKind> for ItemKind {
--- compiler/rustc_hir/src/hir.rs
+++ compiler/rustc_hir/src/hir.rs
@@ -3050,3 +3050,3 @@
@@ -3048,7 +3048,7 @@ impl<'hir> Node<'hir> {
}
// Some nodes are used a lot. Make sure they don't unintentionally get bigger.
-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
+#[cfg(all(not(rust_compiler="mrustc"),target_arch = "x86_64", target_pointer_width = "64"))]
mod size_asserts {
rustc_data_structures::static_assert_size!(super::Block<'static>, 48);
rustc_data_structures::static_assert_size!(super::Expr<'static>, 64);
--- compiler/rustc_middle/src/mir/interpret/error.rs
+++ compiler/rustc_middle/src/mir/interpret/error.rs
@@ -452,2 +452,2 @@
@@ -449,7 +449,7 @@ impl dyn MachineStopType {
}
}
-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
+#[cfg(all(not(rust_compiler="mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
static_assert_size!(InterpError<'_>, 64);
pub enum InterpError<'tcx> {
--- compiler/rustc_middle/src/mir/mod.rs
+++ compiler/rustc_middle/src/mir/mod.rs
@@ -2203,2 +2203,2 @@
@@ -2200,7 +2200,7 @@ pub enum AggregateKind<'tcx> {
Generator(DefId, SubstsRef<'tcx>, hir::Movability),
}
-#[cfg(target_arch = "x86_64")]
+#[cfg(all(not(rust_compiler="mrustc"), target_arch = "x86_64"))]
static_assert_size!(AggregateKind<'_>, 48);
#[derive(Copy, Clone, Debug, PartialEq, PartialOrd, Eq, TyEncodable, TyDecodable, Hash, HashStable)]
--- compiler/rustc_middle/src/thir.rs
+++ compiler/rustc_middle/src/thir.rs
@@ -147,2 +147,2 @@
@@ -144,7 +144,7 @@ pub enum StmtKind<'tcx> {
}
// `Expr` is used a lot. Make sure it doesn't unintentionally get bigger.
-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
+#[cfg(all(not(rust_compiler="mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
rustc_data_structures::static_assert_size!(Expr<'_>, 144);
--- compiler/rustc_mir/src/interpret/place.rs
+++ compiler/rustc_mir/src/interpret/place.rs
@@ -91,2 +91,2 @@
-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
+#[cfg(all(not(rust_compiler = "mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
rustc_data_structures::static_assert_size!(Place, 64);
@@ -100,2 +100,2 @@
-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
+#[cfg(all(not(rust_compiler = "mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
rustc_data_structures::static_assert_size!(PlaceTy<'_>, 80);
/// The Thir trait implementor lowers their expressions (`&'tcx H::Expr`)
--- compiler/rustc_mir/src/interpret/operand.rs
+++ compiler/rustc_mir/src/interpret/operand.rs
@@ -35,2 +35,2 @@
@@ -32,7 +32,7 @@ pub enum Immediate<Tag = ()> {
ScalarPair(ScalarMaybeUninit<Tag>, ScalarMaybeUninit<Tag>),
}
-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
+#[cfg(all(not(rust_compiler = "mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
rustc_data_structures::static_assert_size!(Immediate, 56);
@@ -90,2 +90,2 @@
impl<Tag> From<ScalarMaybeUninit<Tag>> for Immediate<Tag> {
@@ -87,7 +87,7 @@ pub struct ImmTy<'tcx, Tag = ()> {
pub layout: TyAndLayout<'tcx>,
}
-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
+#[cfg(all(not(rust_compiler = "mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
rustc_data_structures::static_assert_size!(ImmTy<'_>, 72);
impl<Tag: Copy> std::fmt::Display for ImmTy<'tcx, Tag> {
--- compiler/rustc_mir/src/interpret/place.rs
+++ compiler/rustc_mir/src/interpret/place.rs
@@ -88,7 +88,7 @@ pub enum Place<Tag = ()> {
Local { frame: usize, local: mir::Local },
}
-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
+#[cfg(all(not(rust_compiler = "mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
rustc_data_structures::static_assert_size!(Place, 64);
#[derive(Copy, Clone, Debug)]
@@ -97,7 +97,7 @@ pub struct PlaceTy<'tcx, Tag = ()> {
pub layout: TyAndLayout<'tcx>,
}
-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
+#[cfg(all(not(rust_compiler = "mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
rustc_data_structures::static_assert_size!(PlaceTy<'_>, 80);
impl<'tcx, Tag> std::ops::Deref for PlaceTy<'tcx, Tag> {
#
# Disable std_detect's detection logic (use the same logic as miri)
#
--- library/stdarch/crates/std_detect/src/detect/mod.rs
+++ library/stdarch/crates/std_detect/src/detect/mod.rs
@@ -86,7 +86,7 @@ mod bit;
mod cache;
cfg_if! {
- if #[cfg(miri)] {
+ if #[cfg(any(miri, rust_compiler = "mrustc"))] {
// When running under miri all target-features that are not enabled at
// compile-time are reported as disabled at run-time.
//
#
# Disable crc32fast's use of stdarch
@ -88,19 +148,145 @@
))] {
#
# Disable std_detect's detection logic (use the same logic as miri)
# Backport which is required to support arm64 on macOS 12
# See: https://github.com/alexcrichton/curl-rust/commit/0aea09c428b9bc2bcf46da0fc33959fe3f03c74a
#
--- library/stdarch/crates/std_detect/src/detect/mod.rs
+++ library/stdarch/crates/std_detect/src/detect/mod.rs
@@ -88,2 +88,2 @@
cfg_if! {
- if #[cfg(miri)] {
+ if #[cfg(any(miri, rust_compiler = "mrustc"))] {
--- vendor/curl/src/lib.rs
+++ vendor/curl/src/lib.rs
@@ -82,6 +82,9 @@ pub mod easy;
pub mod multi;
mod panic;
+#[cfg(test)]
+static INITIALIZED: std::sync::atomic::AtomicBool = std::sync::atomic::AtomicBool::new(false);
+
/// Initializes the underlying libcurl library.
///
/// The underlying libcurl library must be initialized before use, and must be
@@ -102,46 +105,62 @@ pub fn init() {
/// Used to prevent concurrent or duplicate initialization.
static INIT: Once = Once::new();
- /// An exported constructor function. On supported platforms, this will be
- /// invoked automatically before the program's `main` is called.
- #[cfg_attr(
- any(target_os = "linux", target_os = "freebsd", target_os = "android"),
- link_section = ".init_array"
- )]
- #[cfg_attr(target_os = "macos", link_section = "__DATA,__mod_init_func")]
- #[cfg_attr(target_os = "windows", link_section = ".CRT$XCU")]
- static INIT_CTOR: extern "C" fn() = init_inner;
+ INIT.call_once(|| {
+ #[cfg(need_openssl_init)]
+ openssl_probe::init_ssl_cert_env_vars();
+ #[cfg(need_openssl_init)]
+ openssl_sys::init();
+
+ unsafe {
+ assert_eq!(curl_sys::curl_global_init(curl_sys::CURL_GLOBAL_ALL), 0);
+ }
+
+ #[cfg(test)]
+ {
+ INITIALIZED.store(true, std::sync::atomic::Ordering::SeqCst);
+ }
+
+ // Note that we explicitly don't schedule a call to
+ // `curl_global_cleanup`. The documentation for that function says
+ //
+ // > You must not call it when any other thread in the program (i.e. a
+ // > thread sharing the same memory) is running. This doesn't just mean
+ // > no other thread that is using libcurl.
+ //
+ // We can't ever be sure of that, so unfortunately we can't call the
+ // function.
+ });
+}
+/// An exported constructor function. On supported platforms, this will be
+/// invoked automatically before the program's `main` is called. This is done
+/// for the convenience of library users since otherwise the thread-safety rules
+/// around initialization can be difficult to fulfill.
+///
+/// This is a hidden public item to ensure the symbol isn't optimized away by a
+/// rustc/LLVM bug: https://github.com/rust-lang/rust/issues/47384. As long as
+/// any item in this module is used by the final binary (which `init` will be)
+/// then this symbol should be preserved.
+#[used]
+#[doc(hidden)]
+#[cfg_attr(
+ any(target_os = "linux", target_os = "freebsd", target_os = "android"),
+ link_section = ".init_array"
+)]
+#[cfg_attr(target_os = "macos", link_section = "__DATA,__mod_init_func")]
+#[cfg_attr(target_os = "windows", link_section = ".CRT$XCU")]
+pub static INIT_CTOR: extern "C" fn() = {
/// This is the body of our constructor function.
#[cfg_attr(
any(target_os = "linux", target_os = "android"),
link_section = ".text.startup"
)]
- extern "C" fn init_inner() {
- INIT.call_once(|| {
- #[cfg(need_openssl_init)]
- openssl_sys::init();
-
- unsafe {
- assert_eq!(curl_sys::curl_global_init(curl_sys::CURL_GLOBAL_ALL), 0);
- }
-
- // Note that we explicitly don't schedule a call to
- // `curl_global_cleanup`. The documentation for that function says
- //
- // > You must not call it when any other thread in the program (i.e.
- // > a thread sharing the same memory) is running. This doesn't just
- // > mean no other thread that is using libcurl.
- //
- // We can't ever be sure of that, so unfortunately we can't call the
- // function.
- });
+ extern "C" fn init_ctor() {
+ init();
}
- // We invoke our init function through our static to ensure the symbol isn't
- // optimized away by a bug: https://github.com/rust-lang/rust/issues/47384
- INIT_CTOR();
-}
+ init_ctor
+};
unsafe fn opt_str<'a>(ptr: *const libc::c_char) -> Option<&'a str> {
if ptr.is_null() {
@@ -158,3 +177,20 @@ fn cvt(r: curl_sys::CURLcode) -> Result<(), Error> {
Err(Error::new(r))
}
}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ #[cfg(any(
+ target_os = "linux",
+ target_os = "macos",
+ target_os = "windows",
+ target_os = "freebsd",
+ target_os = "android"
+ ))]
+ fn is_initialized_before_main() {
+ assert!(INITIALIZED.load(std::sync::atomic::Ordering::SeqCst));
+ }
+}
# PPV-Lite also needs to know that we're pretending to be miri
--- vendor/ppv-lite86/src/lib.rs
+++ vendor/ppv-lite86/src/lib.rs
@@ -12,9 +12,9 @@
@@ -9,14 +9,14 @@ mod soft;
mod types;
pub use self::types::*;
-#[cfg(all(feature = "simd", target_arch = "x86_64", not(miri)))]
+#[cfg(all(feature = "simd", target_arch = "x86_64", not(miri), not(rust_compiler = "mrustc")))]
pub mod x86_64;
@ -114,4 +300,5 @@
-#[cfg(any(miri, not(all(feature = "simd", any(target_arch = "x86_64")))))]
+#[cfg(any(miri, rust_compiler = "mrustc", not(all(feature = "simd", any(target_arch = "x86_64")))))]
use self::generic as arch;
pub use self::arch::{vec128_storage, vec256_storage, vec512_storage};

View file

@ -216,13 +216,13 @@ (define-public python-trove-classifiers
(define-public python-typing-extensions
(package
(name "python-typing-extensions")
(version "4.5.0")
(version "4.9.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "typing_extensions" version))
(sha256
(base32
"1jx7ki3sji60v7h2805b2phq9ynsvshj5xiygdh9kmirj6kz9daw"))))
"10spkx7xjbxwcsgkqv483c5kn53s042wkrmfr1mdf9vzqf48yir3"))))
(build-system pyproject-build-system)
;; Disable the test suite to keep the dependencies to a minimum. Also,
;; the test suite requires Python's test module, not available in Guix.

View file

@ -57,6 +57,7 @@ (define-module (gnu packages python-crypto)
#: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)

View file

@ -14,7 +14,7 @@
;;; Copyright © 2015, 2016, 2017, 2019, 2022 Leo Famulari <leo@famulari.name>
;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
;;; Copyright © 2015-2023 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2015-2024 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2015, 2017, 2020 Kyle Meyer <kyle@kyleam.com>
;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
@ -181,6 +181,7 @@ (define-module (gnu packages python-xyz)
#:use-module (gnu packages compression)
#:use-module (gnu packages cpp)
#:use-module (gnu packages crates-io)
#:use-module (gnu packages crates-windows)
#:use-module (gnu packages crypto)
#:use-module (gnu packages databases)
#:use-module (gnu packages dbm)
@ -577,7 +578,13 @@ (define-public python-databind-core
(method url-fetch)
(uri (pypi-uri "databind.core" version))
(sha256
(base32 "130hr19kbzizx9n2q7cwfzfk20ii3cqmqjrzb16psnafll303k2d"))))
(base32 "130hr19kbzizx9n2q7cwfzfk20ii3cqmqjrzb16psnafll303k2d"))
(snippet
#~(begin (use-modules (guix build utils))
;; The problem with python-typing-extensions >= 4.7 is only
;; with python-3.7.
(substitute* "pyproject.toml"
((",<4.7.*") "\"\n"))))))
(build-system pyproject-build-system)
(arguments
(list
@ -622,7 +629,13 @@ (define-public python-databind-json
(method url-fetch)
(uri (pypi-uri "databind.json" version))
(sha256
(base32 "1lm864d7arfq0pw64hyc83bwn1z94wjg7a22q1xf0qkjynqs70gg"))))
(base32 "1lm864d7arfq0pw64hyc83bwn1z94wjg7a22q1xf0qkjynqs70gg"))
(snippet
#~(begin (use-modules (guix build utils))
;; The problem with python-typing-extensions >= 4.7 is only
;; with python-3.7.
(substitute* "pyproject.toml"
((",<4.7.*") "\"\n"))))))
(build-system pyproject-build-system)
(arguments
(list
@ -6239,6 +6252,30 @@ (define-public python-daemon
;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
(license (list license:asl2.0 license:gpl3+))))
(define-public python-annotated-types
(package
(name "python-annotated-types")
(version "0.6.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "annotated_types" version))
(sha256
(base32 "0paaz0i4xqk335ji5w887i2bhgm2krnzr6by4sfgsgz50zl3jcsn"))))
(build-system pyproject-build-system)
(native-inputs
(list python-hatchling
python-pytest))
(propagated-inputs (list python-typing-extensions))
(home-page "https://github.com/annotated-types/annotated-types")
(synopsis "Reusable constraint types to use with typing.Annotated")
(description "This package provides metadata objects which can be used to
represent common constraints such as upper and lower bounds on scalar values and
collection sizes, a Predicate marker for runtime checks, and descriptions of how
we intend these metadata to be interpreted. In some cases, we also note
alternative representations which do not require this package.")
(license license:expat)))
(define-public python-anytree
(package
(name "python-anytree")
@ -7397,6 +7434,101 @@ (define-public python-pydantic
errors when data is invalid.")
(license license:expat)))
(define-public python-pydantic-2
(package
(inherit python-pydantic)
(name "python-pydantic")
(version "2.5.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pydantic" version))
(sha256
(base32 "0yiz75zp93x6x2czm772cz5pzn00i703irncjwb99c1m4p35gvxk"))))
(build-system pyproject-build-system)
(arguments
(list
#:test-flags #~(list "--ignore=tests/test_docs.py" ; no pytest_examples
;; need python-email-validator >= 2.0.0
"-k not test_fastapi_startup_perf")
#:phases
#~(modify-phases %standard-phases
(add-before 'check 'pre-check
(lambda _
;; Remove the addopts from pyproject.toml, it breaks the 'check phase.
(substitute* "pyproject.toml"
(("'--benchmark") "#'--benchmark")))))))
(native-inputs
(list python-hatchling
python-hatch-fancy-pypi-readme
python-cloudpickle
python-dirty-equals
python-faker
python-pytest
python-pytest-benchmark
python-pytest-mock))
(propagated-inputs
(list python-annotated-types
python-pydantic-core
python-typing-extensions))))
(define-public python-pydantic-core
(package
(name "python-pydantic-core")
(version "2.14.6")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pydantic_core" version))
(sha256
(base32 "0j79pd6ixapsiwsigsxzmvbrpmdr7f7c4l9sl7xl6a1pjp9w3l0z"))))
(build-system cargo-build-system)
(arguments
(list
#:imported-modules `(,@%cargo-build-system-modules
,@%pyproject-build-system-modules)
#:modules '((guix build cargo-build-system)
((guix build pyproject-build-system) #:prefix py:)
(guix build utils))
#:phases
#~(modify-phases %standard-phases
(add-after 'prepare-python-module 'build-python-module
(assoc-ref py:%standard-phases 'build))
(add-after 'build-python-module 'install-python-module
(assoc-ref py:%standard-phases 'install)))
#:cargo-inputs
`(("rust-ahash" ,rust-ahash-0.8)
("rust-base64" ,rust-base64-0.21)
("rust-enum-dispatch" ,rust-enum-dispatch-0.3)
("rust-idna" ,rust-idna-0.4)
("rust-jiter" ,rust-jiter-0.0.4)
("rust-num-bigint" ,rust-num-bigint-0.4)
("rust-python3-dll-a" ,rust-python3-dll-a-0.2)
("rust-pyo3" ,rust-pyo3-0.20)
("rust-pyo3-build-config" ,rust-pyo3-build-config-0.20)
("rust-regex" ,rust-regex-1)
("rust-strum" ,rust-strum-0.25)
("rust-strum-macros" ,rust-strum-macros-0.25)
("rust-serde" ,rust-serde-1)
("rust-serde-json" ,rust-serde-json-1)
("rust-smallvec" ,rust-smallvec-1)
("rust-speedate" ,rust-speedate-0.13)
("rust-url" ,rust-url-2)
("rust-uuid" ,rust-uuid-1)
("rust-version-check" ,rust-version-check-0.9))
#:cargo-development-inputs
`(("rust-pyo3" ,rust-pyo3-0.20))
#:install-source? #false))
(native-inputs
(list maturin python-wrapper))
(propagated-inputs
(list python-typing-extensions))
(home-page "https://github.com/pydantic/pydantic-core")
(synopsis "Core validation logic for pydantic")
(description "This package provides the core functionality for pydantic
validation and serialization.")
(license license:expat)))
(define-public python-pydantic-cli
(package
(name "python-pydantic-cli")

File diff suppressed because it is too large Load diff

View file

@ -4,7 +4,7 @@
;;; Copyright © 2016 Nikita <nikita@n0.is>
;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
;;; Copyright © 2017, 2018 Nikolai Merinov <nikolai.merinov@member.fsf.org>
;;; Copyright © 2017, 2019-2023 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017, 2019-2024 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Danny Milosavljevic <dannym+a@scratchpost.org>
;;; Copyright © 2019 Ivan Petkov <ivanppetkov@gmail.com>
@ -46,8 +46,7 @@ (define-module (gnu packages rust)
#:use-module (gnu packages flex)
#:use-module (gnu packages gcc)
#:use-module (gnu packages gdb)
#:use-module (gnu packages jemalloc)
#:use-module (gnu packages libunwind)
#:use-module (gnu packages libffi)
#:use-module (gnu packages linux)
#:use-module (gnu packages llvm)
#:use-module (gnu packages mingw)
@ -55,15 +54,18 @@ (define-module (gnu packages rust)
#:use-module (gnu packages python)
#:use-module (gnu packages ssh)
#:use-module (gnu packages tls)
#:use-module (gnu packages web)
#:use-module (gnu packages)
#:use-module (guix build-system cargo)
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
#:use-module (guix search-paths)
#:use-module (guix download)
#:use-module (guix memoization)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix platform)
#:use-module ((guix build utils) #:select (alist-replace))
#:use-module (guix utils)
#:use-module (guix gexp)
@ -101,21 +103,6 @@ (define-module (gnu packages rust)
(define %cargo-reference-hash
"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855")
(define* (nix-system->gnu-triplet-for-rust
#:optional (system (%current-system)))
(match system
("x86_64-linux" "x86_64-unknown-linux-gnu")
("i686-linux" "i686-unknown-linux-gnu")
("armhf-linux" "armv7-unknown-linux-gnueabihf")
("aarch64-linux" "aarch64-unknown-linux-gnu")
("mips64el-linux" "mips64el-unknown-linux-gnuabi64")
("riscv64-linux" "riscv64gc-unknown-linux-gnu")
("i586-gnu" "i686-unknown-hurd-gnu")
("i686-gnu" "i686-unknown-hurd-gnu")
("i686-mingw" "i686-pc-windows-gnu")
("x86_64-mingw" "x86_64-pc-windows-gnu")
(_ (nix-system->gnu-triplet system))))
(define* (rust-uri version #:key (dist "static"))
(string-append "https://" dist ".rust-lang.org/dist/"
"rustc-" version "-src.tar.gz"))
@ -137,27 +124,28 @@ (define* (rust-bootstrapped-package base-rust version checksum)
;;; Note: mrustc's only purpose is to be able to bootstap Rust; it's designed
;;; to be used in source form.
(define %mrustc-commit "597593aba86fa2edbea80c6e09f0b1b2a480722d")
(define %mrustc-commit "b6754f574f8846eb842feba4ccbeeecb10bdfacc")
(define %mrustc-source
(let* ((version "0.10")
(let* ((version "0.10.1")
(commit %mrustc-commit)
(revision "2")
(revision "1")
(name "mrustc"))
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/thepowersgang/mrustc")
(commit commit)))
(file-name (git-file-name name (git-version version revision commit)))
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"09rvm3zgx1d86gippl8qzh13m641ynbw9q0zsc90g0h1khd3z3b6"))
"0rqiif7rb5hg6ik3i1flldj311f014q4n9z8wb50cs8kspjz32di"))
(modules '((guix build utils)))
(snippet
'(begin
;; Drastically reduces memory and build time requirements
;; by disabling debug by default.
(substitute* (find-files "." "Makefile")
(("LINKFLAGS := -g") "LINKFLAGS :=")
(("-g ") "")))))))
;;; Rust 1.54 is special in that it is built with mrustc, which shortens the
@ -175,7 +163,9 @@ (define-public rust-bootstrap
(snippet
'(begin
(for-each delete-file-recursively
'("src/llvm-project"))
'("src/llvm-project"
"vendor/openssl-src/openssl"
"vendor/tikv-jemalloc-sys/jemalloc"))
;; Remove vendored dynamically linked libraries.
;; find . -not -type d -executable -exec file {} \+ | grep ELF
(delete-file "vendor/vte/vim10m_match")
@ -183,23 +173,24 @@ (define-public rust-bootstrap
;; Also remove the bundled (mostly Windows) libraries.
;; find vendor -not -type d -exec file {} \+ | grep PE32
(for-each delete-file
(find-files "vendor" ".*\\.(a|dll|exe|lib)$"))))
(find-files "vendor" "\\.(a|dll|exe|lib)$"))))
(patches (search-patches "rustc-1.54.0-src.patch"))
(patch-flags '("-p0")))) ;default is -p1
(outputs '("out" "cargo"))
(properties '((hidden? . #t)
(timeout . 72000) ;20 hours
(timeout . 129600) ;36 hours
(max-silent-time . 18000))) ;5 hours (for armel)
(build-system gnu-build-system)
(inputs
`(("libcurl" ,curl)
`(,@(if (or (target-ppc64le?)
(target-riscv64?))
`(("clang" ,clang-13))
`())
("llvm" ,llvm-13)
("openssl" ,openssl-1.1)
("zlib" ,zlib)))
(native-inputs
`(("bison" ,bison)
("flex" ,flex)
("pkg-config" ,pkg-config)
`(("pkg-config" ,pkg-config)
;; Required for the libstd sources.
("mrustc-source" ,%mrustc-source)))
(arguments
@ -213,11 +204,14 @@ (define-public rust-bootstrap
#:validate-runpath? #f
;; Most of the build is single-threaded. This also improves the
;; build time on machines with "only" 8GB of RAM.
;; ppc64le regularly sees race conditions between various dependant crates.
#:parallel-build? ,(target-x86-64?)
#:make-flags
(list ,(string-append "RUSTC_TARGET="
(or (%current-target-system)
(nix-system->gnu-triplet-for-rust)))
(platform-rust-target
(lookup-platform-by-target-or-system
(or (%current-target-system)
(%current-system)))))
,(string-append "RUSTC_VERSION=" version)
,(string-append "MRUSTC_TARGET_VER="
(version-major+minor version))
@ -228,14 +222,15 @@ (define-public rust-bootstrap
"OUTDIR_SUF=") ;do not add version suffix to output dir
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-reference-to-cc
;; This prevents errors like 'error: linker `cc` not found' when
;; "cc" is not found on PATH.
(lambda* (#:key inputs #:allow-other-keys)
(let ((gcc (assoc-ref inputs "gcc")))
(substitute* (find-files "." "^link.rs$")
(("\"cc\".as_ref")
(format #f "~s.as_ref" (string-append gcc "/bin/gcc")))))))
,@(if (target-ppc64le?)
`((add-after 'unpack 'patch-sources-for-newer-llvm
(lambda _
;; Adjust some sources for llvm-13, see llvm commit
;; acce401068e78a8c5dc9e06802111ffad3da763f
(substitute* (find-files "." "powerpc64le_unknown_linux_gnu.rs")
(("e-m:e-i64:64-n32:64-v256:256:256-v512:512:512")
"e-m:e-i64:64-n32:64-S128-v256:256:256-v512:512:512")))))
'())
(add-after 'unpack 'setup-mrustc-sources
(lambda* (#:key inputs #:allow-other-keys)
(copy-recursively (assoc-ref inputs "mrustc-source") "../mrustc")
@ -260,7 +255,9 @@ (define-public rust-bootstrap
(string-append "LLVM_CONFIG := " llvm "/bin/llvm-config\n")))
(substitute* "minicargo.mk"
;; Do not try to fetch sources from the Internet.
(("@curl.*") ""))
(("@curl.*") "")
(("\\$\\(MINICARGO\\) \\$\\(RUSTC_SRC_DL\\)")
"$(MINICARGO)"))
(substitute* "Makefile"
;; Patch date and git obtained version information.
((" -D VERSION_GIT_FULLHASH=.*")
@ -272,16 +269,7 @@ (define-public rust-bootstrap
" -D VERSION_BUILDTIME="
"\"\\\"Thu, 01 Jan 1970 00:00:01 +0000\\\"\""
" -D VERSION_GIT_ISDIRTY=0\n")))
(substitute* "minicargo.mk"
;; Do not try to fetch sources from the Internet.
(("\\$\\(MINICARGO\\) \\$\\(RUSTC_SRC_DL\\)")
"$(MINICARGO)"))
(substitute* "run_rustc/Makefile"
(("[$]Vtime ")
"$V ")
;; Unlock the number of parallel jobs for cargo.
(("-j [[:digit:]]+ ")
"")
;; Patch the shebang of a generated wrapper for rustc
(("#!/bin/sh")
(string-append "#!" (which "sh"))))
@ -289,7 +277,7 @@ (define-public rust-bootstrap
(("#!/bin/sh")
(string-append "#!" (which "sh"))))))))
(add-after 'patch-generated-file-shebangs 'patch-cargo-checksums
(lambda* _
(lambda _
(substitute* "Cargo.lock"
(("(checksum = )\".*\"" all name)
(string-append name "\"" ,%cargo-reference-hash "\"")))
@ -301,8 +289,12 @@ (define-public rust-bootstrap
(setenv "CARGO_HOME" cargo-home))))
(replace 'configure
(lambda _
(setenv "CC" "gcc")
(setenv "CXX" "g++")
,@(if (or (target-ppc64le?)
(target-riscv64?))
`((setenv "CC" "clang")
(setenv "CXX" "clang++"))
`((setenv "CC" "gcc")
(setenv "CXX" "g++")))
;; The Guix LLVM package installs only shared libraries.
(setenv "LLVM_LINK_SHARED" "1")
;; rustc still insists on having 'cc' on PATH in some places
@ -313,10 +305,9 @@ (define-public rust-bootstrap
(delete 'patch-generated-file-shebangs)
(replace 'build
(lambda* (#:key make-flags parallel-build? #:allow-other-keys)
(let* ((src-root (getcwd))
(job-count (if parallel-build?
(parallel-job-count)
1)))
(let ((job-count (if parallel-build?
(parallel-job-count)
1)))
;; Adapted from:
;; https://github.com/dtolnay/bootstrap/blob/master/build-1.54.0.sh.
(chdir "../mrustc")
@ -335,10 +326,20 @@ (define-public rust-bootstrap
(display "Building LIBS...\n")
(apply invoke "make" "-f" "minicargo.mk" "LIBS" make-flags)
;; The psm crate FTBFS on ppc64le with gcc.
(display "Building rustc...\n")
(apply invoke "make" "-f" "minicargo.mk" "output/rustc"
make-flags)
;; We can to continue the build with gcc after building rustc.
;; librustc_driver.so undefined reference to
;; `llvm::cfg::Update<llvm::BasicBlock*>::dump() const'
,@(if (or (target-ppc64le?)
(target-riscv64?))
`((setenv "CC" "gcc")
(setenv "CXX" "g++"))
`())
(display "Building cargo...\n")
(apply invoke "make" "-f" "minicargo.mk" "output/cargo"
make-flags)
@ -354,10 +355,12 @@ (define-public rust-bootstrap
(rustc (string-append bin "/rustc"))
(cargo-bin (string-append cargo "/bin"))
(lib (string-append out "/lib"))
(gnu-triplet ,(or (%current-target-system)
(nix-system->gnu-triplet-for-rust)))
(system-lib-prefix (string-append lib "/rustlib/"
gnu-triplet "/lib")))
(system-lib-prefix
(string-append lib "/rustlib/"
,(platform-rust-target
(lookup-platform-by-target-or-system
(or (%current-target-system)
(%current-system)))) "/lib")))
(mkdir-p (dirname rustc))
(copy-file "run_rustc/output/prefix/bin/rustc_binary" rustc)
(wrap-program rustc
@ -374,9 +377,9 @@ (define-public rust-bootstrap
;; therefore the build process needs 8GB of RAM while building.
;; It may support i686 soon:
;; <https://github.com/thepowersgang/mrustc/issues/78>.
;; XXX: The rust bootstrap is currently broken on riscv64,
;; remove it until this is fixed.
(supported-systems '("x86_64-linux" "aarch64-linux"))
;; List of systems where rust-bootstrap is explicitly known to build:
(supported-systems '("x86_64-linux" "aarch64-linux"
"riscv64-linux" "powerpc64le-linux"))
;; Dual licensed.
(license (list license:asl2.0 license:expat))))
@ -395,6 +398,7 @@ (define-public rust-1.55
'(begin
(for-each delete-file-recursively
'("src/llvm-project"
"vendor/openssl-src/openssl"
"vendor/tikv-jemalloc-sys/jemalloc"))
;; Remove vendored dynamically linked libraries.
;; find . -not -type d -executable -exec file {} \+ | grep ELF
@ -403,7 +407,7 @@ (define-public rust-1.55
;; Also remove the bundled (mostly Windows) libraries.
;; find vendor -not -type d -exec file {} \+ | grep PE32
(for-each delete-file
(find-files "vendor" ".*\\.(a|dll|exe|lib)$"))
(find-files "vendor" "\\.(a|dll|exe|lib)$"))
;; Add support for riscv64-linux.
(substitute* "vendor/tikv-jemallocator/src/lib.rs"
((" target_arch = \"s390x\"," all)
@ -451,16 +455,7 @@ (define-public rust-1.55
(binutils (assoc-ref inputs "binutils"))
(rustc (assoc-ref inputs "rustc-bootstrap"))
(cargo (assoc-ref inputs "cargo-bootstrap"))
(llvm (assoc-ref inputs "llvm"))
(jemalloc (assoc-ref inputs "jemalloc")))
;; The compiler is no longer directly built against jemalloc, but
;; rather via the jemalloc-sys crate (which vendors the jemalloc
;; source). To use jemalloc we must enable linking to it (otherwise
;; it would use the system allocator), and set an environment
;; variable pointing to the compiled jemalloc.
(setenv "JEMALLOC_OVERRIDE"
(search-input-file inputs
"/lib/libjemalloc_pic.a"))
(llvm (assoc-ref inputs "llvm")))
(call-with-output-file "config.toml"
(lambda (port)
(display (string-append "
@ -477,11 +472,11 @@ (define-public rust-1.55
sysconfdir = \"etc\"
[rust]
debug=false
jemalloc=true
jemalloc=false
default-linker = \"" gcc "/bin/gcc" "\"
channel = \"stable\"
rpath = true
[target." ,(nix-system->gnu-triplet-for-rust) "]
[target." ,(platform-rust-target (lookup-platform-by-system (%current-system))) "]
llvm-config = \"" llvm "/bin/llvm-config" "\"
cc = \"" gcc "/bin/gcc" "\"
cxx = \"" gcc "/bin/g++" "\"
@ -502,9 +497,11 @@ (define-public rust-1.55
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(cargo-out (assoc-ref outputs "cargo"))
(gnu-triplet ,(or (%current-target-system)
(nix-system->gnu-triplet-for-rust)))
(build (string-append "build/" gnu-triplet)))
(build (string-append "build/"
,(platform-rust-target
(lookup-platform-by-target-or-system
(or (%current-target-system)
(%current-system)))))))
;; Manually do the installation instead of calling './x.py
;; install', as that is slow and needlessly rebuilds some
;; things.
@ -534,32 +531,18 @@ (define-public rust-1.55
`("LIBRARY_PATH" ":"
suffix (,(string-append libc "/lib"))))))))))
(native-inputs
`(("cmake" ,cmake-minimal)
("pkg-config" ,pkg-config) ; For "cargo"
`(("pkg-config" ,pkg-config)
("python" ,python-wrapper)
("rustc-bootstrap" ,rust-bootstrap)
("cargo-bootstrap" ,rust-bootstrap "cargo")
("which" ,which)))
("cargo-bootstrap" ,rust-bootstrap "cargo")))
(inputs
`(("jemalloc" ,jemalloc)
("llvm" ,llvm-13)
("openssl" ,openssl)
("libssh2" ,libssh2) ; For "cargo"
("libcurl" ,curl))) ; For "cargo"
`(("llvm" ,llvm-13)
("openssl" ,openssl)))
;; rustc invokes gcc, so we need to set its search paths accordingly.
;; Note: duplicate its value here to cope with circular dependencies among
;; modules (see <https://bugs.gnu.org/31392>).
(native-search-paths
(list (search-path-specification
(variable "C_INCLUDE_PATH")
(files '("include")))
(search-path-specification
(variable "CPLUS_INCLUDE_PATH")
(files '("include/c++" "include")))
(search-path-specification
(variable "LIBRARY_PATH")
(files '("lib" "lib64")))))
(supported-systems (delete "i586-gnu" %supported-systems))
%gcc-search-paths)
;; Limit this to systems where the final rust compiler builds successfully.
(supported-systems '("x86_64-linux" "aarch64-linux" "riscv64-linux"))
(synopsis "Compiler for the Rust programming language")
(description "Rust is a systems programming language that provides memory
safety and thread safety guarantees.")
@ -574,14 +557,14 @@ (define-public rust-1.56
(package
(inherit base-rust)
(arguments
(substitute-keyword-arguments (package-arguments base-rust)
((#:validate-runpath? _ #t)
#t)
(substitute-keyword-arguments
(strip-keyword-arguments '(#:validate-runpath?)
(package-arguments base-rust))
((#:phases phases)
`(modify-phases ,phases
(delete 'add-cc-shim-to-path)
(add-after 'patch-generated-file-shebangs 'patch-cargo-checksums
(lambda* _
(lambda _
(substitute* "Cargo.lock"
(("(checksum = )\".*\"" all name)
(string-append name "\"" ,%cargo-reference-hash "\"")))
@ -651,6 +634,7 @@ (define-public rust-1.61
'(begin
(for-each delete-file-recursively
'("src/llvm-project"
"vendor/openssl-src/openssl"
"vendor/tikv-jemalloc-sys/jemalloc"))
;; Remove vendored dynamically linked libraries.
;; find . -not -type d -executable -exec file {} \+ | grep ELF
@ -658,7 +642,7 @@ (define-public rust-1.61
(delete-file "vendor/vte/vim10m_table")
;; Also remove the bundled (mostly Windows) libraries.
(for-each delete-file
(find-files "vendor" ".*\\.(a|dll|exe|lib)$")))))))))
(find-files "vendor" "\\.(a|dll|exe|lib)$")))))))))
(define-public rust-1.62
(rust-bootstrapped-package
@ -677,6 +661,27 @@ (define-public rust-1.64
(source
(origin
(inherit (package-source base-rust))
(snippet
'(begin
(for-each delete-file-recursively
'("src/llvm-project"
"vendor/openssl-src/openssl"
"vendor/tikv-jemalloc-sys/jemalloc"))
;; ERROR: could not find native static library
;; `rustix_outline_powerpc64`, perhaps an -L flag is missing?
;; Adjust rustix to always build with cc.
(substitute* "src/bootstrap/Cargo.lock"
(("\"errno\",") "\"cc\",\n \"errno\","))
;; Add a dependency on the the 'cc' feature of rustix.
(substitute* "vendor/fd-lock/Cargo.toml"
(("\"fs\"") "\"fs\", \"cc\""))
;; Remove vendored dynamically linked libraries.
;; find . -not -type d -executable -exec file {} \+ | grep ELF
(delete-file "vendor/vte/vim10m_match")
(delete-file "vendor/vte/vim10m_table")
;; Also remove the bundled (mostly Windows) libraries.
(for-each delete-file
(find-files "vendor" "\\.(a|dll|exe|lib)$"))))
(patches (search-patches "rust-1.64-fix-riscv64-bootstrap.patch"))
(patch-flags '("-p1" "--reverse"))))
(arguments
@ -714,6 +719,31 @@ (define-public rust-1.67
rust-1.66 "1.67.1" "0vpzv6rm3w1wbni17ryvcw83k5klhghklylfdza3nnp8blz3sj26")))
(package
(inherit base-rust)
(source
(origin
(inherit (package-source base-rust))
(snippet
'(begin
(for-each delete-file-recursively
'("src/llvm-project"
"vendor/openssl-src/openssl"
"vendor/tikv-jemalloc-sys/jemalloc"))
;; Adjust rustix to always build with cc.
(substitute* '("Cargo.lock"
"src/bootstrap/Cargo.lock")
(("\"errno\",") "\"cc\",\n \"errno\","))
;; Add a dependency on the the 'cc' feature of rustix.
(substitute* "vendor/fd-lock/Cargo.toml"
(("\"fs\"") "\"fs\", \"cc\""))
(substitute* "vendor/is-terminal/Cargo.toml"
(("\"termios\"") "\"termios\", \"cc\""))
;; Remove vendored dynamically linked libraries.
;; find . -not -type d -executable -exec file {} \+ | grep ELF
(delete-file "vendor/vte/vim10m_match")
(delete-file "vendor/vte/vim10m_table")
;; Also remove the bundled (mostly Windows) libraries.
(for-each delete-file
(find-files "vendor" "\\.(a|dll|exe|lib)$"))))))
(inputs (modify-inputs (package-inputs base-rust)
(replace "llvm" llvm-15))))))
@ -735,7 +765,17 @@ (define-public rust-1.69
'(begin
(for-each delete-file-recursively
'("src/llvm-project"
"vendor/openssl-src/openssl"
"vendor/tikv-jemalloc-sys/jemalloc"))
;; Adjust rustix to always build with cc.
(substitute* '("Cargo.lock"
"src/bootstrap/Cargo.lock")
(("\"errno\",") "\"cc\",\n \"errno\","))
;; Add a dependency on the the 'cc' feature of rustix.
(substitute* "vendor/fd-lock/Cargo.toml"
(("\"fs\"") "\"fs\", \"cc\""))
(substitute* "vendor/is-terminal/Cargo.toml"
(("\"termios\"") "\"termios\", \"cc\""))
;; Also remove the bundled (mostly Windows) libraries.
(for-each delete-file
(find-files "vendor" "\\.(a|dll|exe|lib)$")))))))))
@ -750,6 +790,22 @@ (define-public rust-1.70
(source
(origin
(inherit (package-source base-rust))
(snippet
'(begin
(for-each delete-file-recursively
'("src/llvm-project"
"vendor/openssl-src/openssl"
"vendor/tikv-jemalloc-sys/jemalloc"))
;; Adjust rustix to always build with cc.
(substitute* "Cargo.lock"
(("\"errno\",") "\"cc\",\n \"errno\","))
;; Add a dependency on the the 'cc' feature of rustix.
(substitute* '("vendor/is-terminal/Cargo.toml"
"vendor/is-terminal-0.4.4/Cargo.toml")
(("\"termios\"") "\"termios\", \"cc\""))
;; Also remove the bundled (mostly Windows) libraries.
(for-each delete-file
(find-files "vendor" "\\.(a|dll|exe|lib)$"))))
;; Rust 1.70 adds the rustix library which depends on the vendored
;; fd-lock crate. The fd-lock crate uses Outline assembly which expects
;; a precompiled static library. Enabling the "cc" feature tells the
@ -763,6 +819,26 @@ (define-public rust-1.71
rust-1.70 "1.71.1" "0bj79syjap1kgpg9pc0r4jxc0zkxwm6phjf3digsfafms580vabg")))
(package
(inherit base-rust)
(source
(origin
(inherit (package-source base-rust))
(snippet
'(begin
(for-each delete-file-recursively
'("src/llvm-project"
"vendor/openssl-src/openssl"
"vendor/tikv-jemalloc-sys/jemalloc"))
;; Adjust rustix to always build with cc.
(substitute* '("Cargo.lock"
"src/tools/cargo/Cargo.lock")
(("\"errno\",") "\"cc\",\n \"errno\","))
;; Add a dependency on the the 'cc' feature of rustix.
(substitute* '("vendor/is-terminal/Cargo.toml"
"vendor/is-terminal-0.4.6/Cargo.toml")
(("\"termios\"") "\"termios\", \"cc\""))
;; Also remove the bundled (mostly Windows) libraries.
(for-each delete-file
(find-files "vendor" "\\.(a|dll|exe|lib)$"))))))
(arguments
(substitute-keyword-arguments (package-arguments base-rust)
((#:phases phases)
@ -789,13 +865,17 @@ (define-public rust-1.72
'(begin
(for-each delete-file-recursively
'("src/llvm-project"
"vendor/openssl-src/openssl"
"vendor/tikv-jemalloc-sys/jemalloc"))
;; Remove vendored dynamically linked libraries.
;; find . -not -type d -executable -exec file {} \+ | grep ELF
;; Also remove the bundled (mostly Windows) libraries.
(for-each delete-file
(find-files "vendor" "\\.(a|dll|exe|lib)$"))
;; Adjust rustc_driver to explicitly use rustix with libc backend.
;; Adjust some crates to explicitly use rustix with the libc backend.
(substitute* '("vendor/is-terminal/Cargo.toml"
"vendor/is-terminal-0.4.7/Cargo.toml")
(("\"termios\"") "\"termios\", \"use-libc\""))
(substitute* "compiler/rustc_driver/Cargo.toml"
(("rustix = \"=0.37.11\"")
(string-append "rustix = { version = \"=0.37.11\","
@ -813,6 +893,7 @@ (define-public rust-1.73
'(begin
(for-each delete-file-recursively
'("src/llvm-project"
"vendor/openssl-src/openssl"
"vendor/tikv-jemalloc-sys/jemalloc"))
;; Remove vendored dynamically linked libraries.
;; find . -not -type d -executable -exec file {} \+ | grep ELF
@ -824,6 +905,48 @@ (define-public rust-1.73
(("features = \\[\"fs\"" all)
(string-append all ", \"use-libc\""))))))))))
(define rust-1.74
(let ((base-rust (rust-bootstrapped-package rust-1.73 "1.74.1"
"07930r17dkj3dnsrmilywb6p9i2g2jx56ndfpa2wh8crzhi3xnv7")))
(package
(inherit base-rust)
(source
(origin
(inherit (package-source base-rust))
(snippet
'(begin
(for-each delete-file-recursively
'("src/llvm-project"
"vendor/openssl-src/openssl"
"vendor/tikv-jemalloc-sys/jemalloc"))
;; Remove vendored dynamically linked libraries.
;; find . -not -type d -executable -exec file {} \+ | grep ELF
;; Also remove the bundled (mostly Windows) libraries.
(for-each delete-file
(find-files "vendor" "\\.(a|dll|exe|lib)$"))
;; Adjust vendored dependency to explicitly use rustix with libc backend.
(substitute* "vendor/tempfile/Cargo.toml"
(("features = \\[\"fs\"" all)
(string-append all ", \"use-libc\"")))))))
(arguments
(if (target-riscv64?)
(substitute-keyword-arguments (package-arguments base-rust)
((#:phases phases)
`(modify-phases ,phases
;; This phase is no longer needed.
(delete 'revert-riscv-pause-instruction))))
(package-arguments base-rust))))))
(define rust-1.75
(let ((base-rust (rust-bootstrapped-package rust-1.74 "1.75.0"
"1260mf3066ki6y55pvr35lnf54am6z96a3ap3hniwd4xpi2rywsv")))
(package
(inherit base-rust)
(source
(origin
(inherit (package-source base-rust))
(patches '()))))))
(define (make-ignore-test-list strs)
"Function to make creating a list to ignore tests a bit easier."
(map (lambda (str)
@ -838,15 +961,47 @@ (define (make-ignore-test-list strs)
;;; Here we take the latest included Rust, make it public, and re-enable tests
;;; and extra components such as rustfmt.
(define-public rust
(let ((base-rust rust-1.73))
(let ((base-rust rust-1.75))
(package
(inherit base-rust)
(properties (alist-delete 'hidden? (package-properties base-rust)))
(outputs (cons* "rust-src" "tools" (package-outputs base-rust)))
(source
(origin
(inherit (package-source base-rust))
(snippet
'(begin
(for-each delete-file-recursively
'("src/llvm-project"
"vendor/openssl-src/openssl"
"vendor/tikv-jemalloc-sys/jemalloc"
;; These are referenced by the cargo output
;; so we unbundle them.
"vendor/curl-sys/curl"
"vendor/curl-sys-0.4.63+curl-8.1.2/curl"
"vendor/libffi-sys/libffi"
"vendor/libnghttp2-sys/nghttp2"
"vendor/libz-sys/src/zlib"))
;; Use the packaged nghttp2
(delete-file "vendor/libnghttp2-sys/build.rs")
(with-output-to-file "vendor/libnghttp2-sys/build.rs"
(lambda _
(format #t "fn main() {~@
println!(\"cargo:rustc-link-lib=nghttp2\");~@
}~%")))
;; Remove vendored dynamically linked libraries.
;; find . -not -type d -executable -exec file {} \+ | grep ELF
;; Also remove the bundled (mostly Windows) libraries.
(for-each delete-file
(find-files "vendor" "\\.(a|dll|exe|lib)$"))
;; Adjust vendored dependency to explicitly use rustix with libc backend.
(substitute* "vendor/tempfile/Cargo.toml"
(("features = \\[\"fs\"" all)
(string-append all ", \"use-libc\"")))))))
(arguments
(substitute-keyword-arguments (package-arguments base-rust)
((#:tests? _ #f)
(not (%current-target-system)))
(substitute-keyword-arguments
(strip-keyword-arguments '(#:tests?)
(package-arguments base-rust))
((#:phases phases)
`(modify-phases ,phases
(add-after 'unpack 'relax-gdb-auto-load-safe-path
@ -906,6 +1061,19 @@ (define-public rust
(substitute* "patch.rs"
,@(make-ignore-test-list
'("fn gitoxide_clones_shallow_old_git_patch"))))))
,@(if (target-riscv64?)
;; Keep this phase separate so it can be adjusted without needing
;; to adjust the skipped tests on other architectures.
`((add-after 'unpack 'disable-tests-broken-on-riscv64
(lambda _
(with-directory-excursion "src/tools/cargo/tests/testsuite"
(substitute* "build.rs"
,@(make-ignore-test-list
'("fn uplift_dwp_of_bin_on_linux")))
(substitute* "cache_lock.rs"
,@(make-ignore-test-list
'("fn multiple_download")))))))
`())
(add-after 'unpack 'disable-tests-broken-on-aarch64
(lambda _
(with-directory-excursion "src/tools/cargo/tests/testsuite/"
@ -978,7 +1146,7 @@ (define-public rust
;; different outputs while reusing the shared libraries.
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(substitute* "src/bootstrap/builder.rs"
(substitute* "src/bootstrap/src/core/builder.rs"
((" = rpath.*" all)
(string-append all
" "
@ -1041,6 +1209,12 @@ (define-public rust
(mkdir-p (string-append out dest))
(copy-recursively "library" (string-append out dest "/library"))
(copy-recursively "src" (string-append out dest "/src")))))
(add-after 'install 'remove-uninstall-script
(lambda* (#:key outputs #:allow-other-keys)
;; This script has no use on Guix
;; and it retains a reference to the host's bash.
(delete-file (string-append (assoc-ref outputs "out")
"/lib/rustlib/uninstall.sh"))))
(add-after 'install-rust-src 'wrap-rust-analyzer
(lambda* (#:key outputs #:allow-other-keys)
(let ((bin (string-append (assoc-ref outputs "tools") "/bin")))
@ -1056,6 +1230,9 @@ (define-public rust
"/lib/rustlib/src/rust/library")
(string-append bin "/.rust-analyzer-real"))))
(chmod (string-append bin "/rust-analyzer") #o755))))))))
(inputs
(modify-inputs (package-inputs base-rust)
(prepend curl libffi `(,nghttp2 "lib") zlib)))
;; Add test inputs.
(native-inputs (cons* `("gdb" ,gdb/pinned)
`("procps" ,procps)
@ -1109,7 +1286,7 @@ (define make-rust-sysroot/implementation
(("\\.ceil\\(\\)") ""))
;; gcc doesn't recognize this flag.
(substitute*
"compiler/rustc_target/src/spec/windows_gnullvm_base.rs"
"compiler/rustc_target/src/spec/base/windows_gnullvm.rs"
((", \"--unwindlib=none\"") "")))))
`())
(replace 'set-env
@ -1158,7 +1335,7 @@ (define make-rust-sysroot/implementation
python = \"" (which "python") "\"
vendor = true
submodules = false
target = [\"" ,(nix-system->gnu-triplet-for-rust (gnu-triplet->nix-system target)) "\"]
target = [\"" ,(platform-rust-target (lookup-platform-by-target target)) "\"]
[install]
prefix = \"" out "\"
sysconfdir = \"etc\"
@ -1167,14 +1344,14 @@ (define make-rust-sysroot/implementation
jemalloc = false
default-linker = \"" target-cc "\"
channel = \"stable\"
[target." ,(nix-system->gnu-triplet-for-rust) "]
[target." ,(platform-rust-target (lookup-platform-by-system (%current-system))) "]
# These are all native tools
llvm-config = \"" (search-input-file inputs "/bin/llvm-config") "\"
linker = \"" (which "gcc") "\"
cc = \"" (which "gcc") "\"
cxx = \"" (which "g++") "\"
ar = \"" (which "ar") "\"
[target." ,(nix-system->gnu-triplet-for-rust (gnu-triplet->nix-system target)) "]
[target." ,(platform-rust-target (lookup-platform-by-target target)) "]
llvm-config = \"" (search-input-file inputs "/bin/llvm-config") "\"
linker = \"" target-cc "\"
cc = \"" target-cc "\"
@ -1195,12 +1372,6 @@ (define make-rust-sysroot/implementation
(replace 'install
(lambda _
(invoke "./x.py" "install" "library/std")))
(add-after 'install 'remove-uninstall-script
(lambda* (#:key outputs #:allow-other-keys)
;; This script has no use on Guix
;; and it retains a reference to the host's bash.
(delete-file (string-append (assoc-ref outputs "out")
"/lib/rustlib/uninstall.sh"))))
(delete 'install-rust-src)
(delete 'wrap-rust-analyzer)
(delete 'wrap-rustc)))))
@ -1223,8 +1394,7 @@ (define make-rust-sysroot/implementation
(cross-binutils target)
(if (string=? "i686-w64-mingw32" target)
mingw-w64-i686-winpthreads
mingw-w64-x86_64-winpthreads)
libunwind))
mingw-w64-x86_64-winpthreads)))
(modify-inputs (package-native-inputs base-rust)
(prepend (cross-gcc target
#:libc (cross-libc target))

View file

@ -27,7 +27,11 @@ (define-module (gnu packages sequoia)
#:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages base) ; glibc
#:use-module (gnu packages crates-crypto)
#:use-module (gnu packages crates-io)
#:use-module (gnu packages crates-tls)
#:use-module (gnu packages crates-web)
#:use-module (gnu packages crates-windows)
#:use-module (gnu packages llvm)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages nettle)

View file

@ -22,6 +22,7 @@
;;; Copyright © 2022 Andrew Tropin <andrew@trop.in>
;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2023 David Pflug <david@pflug.io>
;;; Copyright © 2023 Jaeme Sifat <jaeme@runbox.com>
;;; Copyright © 2024 Tanguy Le Carrour <tanguy@bioneland.org>
;;;
;;; This file is part of GNU Guix.
@ -46,8 +47,11 @@ (define-module (gnu packages shells)
#:use-module (gnu packages bash)
#:use-module (gnu packages bison)
#:use-module (gnu packages compression)
#:use-module (gnu packages crates-crypto)
#:use-module (gnu packages crates-graphics)
#:use-module (gnu packages crates-io)
#:use-module (gnu packages crates-web)
#:use-module (gnu packages crates-windows)
#:use-module (gnu packages curl)
#:use-module (gnu packages documentation)
#:use-module (gnu packages groff)
@ -1035,8 +1039,56 @@ (define-public nushell
of commands called a ``pipeline''.")
(license license:expat)))
(define-public rust-nu-ansi-term-0.49
(package
(name "rust-nu-ansi-term")
(version "0.49.0")
(source
(origin
(method url-fetch)
(uri (crate-uri "nu-ansi-term" version))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "0s2svfnircd9jp06wk55qcbb9v5cadkfcjfg99vm21qdjg0x6wy0"))))
(build-system cargo-build-system)
(arguments
`(#:cargo-inputs
(("rust-serde" ,rust-serde-1)
("rust-windows-sys" ,rust-windows-sys-0.48))
#:cargo-development-inputs
(("rust-doc-comment" ,rust-doc-comment-0.3)
("rust-serde-json" ,rust-serde-json-1))))
(home-page "https://www.nushell.sh")
(synopsis "Library for ANSI terminal colors and styles (bold, underline)")
(description
"This package is a library for ANSI terminal colors and styles (bold,
underline).")
(license license:expat)))
(define-public rust-nu-ansi-term-0.46
(package
(inherit rust-nu-ansi-term-0.49)
(name "rust-nu-ansi-term")
(version "0.46.0")
(source (origin
(method url-fetch)
(uri (crate-uri "nu-ansi-term" version))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "115sywxh53p190lyw97alm14nc004qj5jm5lvdj608z84rbida3p"))))
(arguments
`(#:cargo-inputs
(("rust-overload" ,rust-overload-0.1)
("rust-serde" ,rust-serde-1)
("rust-winapi" ,rust-winapi-0.3))
#:cargo-development-inputs
(("rust-doc-comment" ,rust-doc-comment-0.3)
("rust-regex" ,rust-regex-1)
("rust-serde-json" ,rust-serde-json-1))))))
(define-public rust-nu-ansi-term-0.44
(package
(inherit rust-nu-ansi-term-0.49)
(name "rust-nu-ansi-term")
(version "0.44.0")
(source
@ -1053,13 +1105,7 @@ (define-public rust-nu-ansi-term-0.44
(("rust-doc-comment" ,rust-doc-comment-0.3)
("rust-overload" ,rust-overload-0.1)
("rust-serde" ,rust-serde-1)
("rust-winapi" ,rust-winapi-0.3))))
(home-page "https://www.nushell.sh")
(synopsis "Library for ANSI terminal colors and styles (bold, underline)")
(description
"This package is a library for ANSI terminal colors and styles (bold,
underline).")
(license license:expat)))
("rust-winapi" ,rust-winapi-0.3))))))
(define-public rust-nu-cli-0.44
(package

View file

@ -41,6 +41,7 @@ (define-module (gnu packages syndication)
#:use-module (gnu packages build-tools)
#:use-module (gnu packages check)
#:use-module (gnu packages cmake)
#:use-module (gnu packages crates-crypto)
#:use-module (gnu packages crates-io)
#:use-module (gnu packages curl)
#:use-module (gnu packages freedesktop)
@ -223,14 +224,14 @@ (define-public giara
(define-public newsboat
(package
(name "newsboat")
(version "2.33")
(version "2.34")
(source
(origin
(method url-fetch)
(uri (string-append "https://newsboat.org/releases/" version
"/newsboat-" version ".tar.xz"))
(sha256
(base32 "1yilrfa8h63x24mcl8a6a17fsaa12imhl337br7g2dw3c1g0v78p"))))
(base32 "0kj3qbm3881fkrplvgnng4747bh29a8f2hhm7a2gc1n9n0wvbmvk"))))
(build-system cargo-build-system)
(native-inputs
`(("gettext" ,gettext-minimal)
@ -266,7 +267,6 @@ (define-public newsboat
("rust-md5" ,rust-md5-0.7)
("rust-natord" ,rust-natord-1)
("rust-nom" ,rust-nom-7)
("rust-once-cell" ,rust-once-cell-1)
("rust-percent-encoding" ,rust-percent-encoding-2)
("rust-url" ,rust-url-2)
("rust-unicode-width" ,rust-unicode-width-0.1)

View file

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015-2021, 2023 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2015-2021, 2023, 2024 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Mckinley Olsen <mck.olsen@gmail.com>
;;; Copyright © 2016, 2017, 2019 Alex Griffin <a@ajgrf.com>
;;; Copyright © 2016 David Craven <david@craven.ch>
@ -76,8 +76,10 @@ (define-module (gnu packages terminals)
#:use-module (gnu packages bash)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages crates-apple)
#:use-module (gnu packages crates-io)
#:use-module (gnu packages crates-graphics)
#:use-module (gnu packages crates-windows)
#:use-module (gnu packages crypto)
#:use-module (gnu packages curl)
#:use-module (gnu packages dlang)
@ -1510,10 +1512,11 @@ (define-public tio
(define-public alacritty
(package
(name "alacritty")
(version "0.12.3")
(version "0.13.1")
(source
(origin
;; XXX: The crate at "crates.io" has limited contents. In particular,
;; XXX: The crate at "crates.io" contains only the alacritty subproject
;; of alacritty and thus has limited contents. In particular,
;; it does not contain "extra" directory with completions, icon, etc.
(method git-fetch)
(uri (git-reference
@ -1521,43 +1524,58 @@ (define-public alacritty
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "1jbyxnza38c22k7ri8apzn03q91l06isj8la9xca7cz06kn0hha9"))))
(base32 "1y5xc9ryn9r0adygq53vrbpb8lazkmcqw38q978pbf0i57nwczrn"))))
(build-system cargo-build-system)
(arguments
`(#:install-source? #f ; virtual manifest
`(#:install-source? #f
#:cargo-test-flags
'("--release" "--"
;; Completions generated with a different minor version of clap?
"--skip=cli::tests::completions")
#:cargo-inputs
(("rust-alacritty-config" ,rust-alacritty-config-0.1)
("rust-alacritty-config-derive" ,rust-alacritty-config-derive-0.2)
("rust-alacritty-terminal" ,rust-alacritty-terminal-0.19)
("rust-bitflags" ,rust-bitflags-1)
("rust-clap" ,rust-clap-3)
("rust-cocoa" ,rust-cocoa-0.24)
("rust-copypasta" ,rust-copypasta-0.8)
("rust-crossfont" ,rust-crossfont-0.5)
("rust-dirs" ,rust-dirs-4)
("rust-embed-resource" ,rust-embed-resource-1)
("rust-fnv" ,rust-fnv-1)
(("rust-ahash" ,rust-ahash-0.8)
("rust-base64" ,rust-base64-0.21)
("rust-bitflags" ,rust-bitflags-2)
("rust-clap" ,rust-clap-4)
("rust-cocoa" ,rust-cocoa-0.25)
("rust-copypasta" ,rust-copypasta-0.10)
("rust-crossfont" ,rust-crossfont-0.7)
("rust-dirs" ,rust-dirs-5)
("rust-embed-resource" ,rust-embed-resource-2)
("rust-gl-generator" ,rust-gl-generator-0.14)
("rust-glutin" ,rust-glutin-0.30)
("rust-glutin" ,rust-glutin-0.31)
("rust-home" ,rust-home-0.5)
("rust-libc" ,rust-libc-0.2)
("rust-log" ,rust-log-0.4)
("rust-notify" ,rust-notify-5)
("rust-miow" ,rust-miow-0.6)
("rust-notify" ,rust-notify-6)
("rust-objc" ,rust-objc-0.2)
("rust-once-cell" ,rust-once-cell-1)
("rust-parking-lot" ,rust-parking-lot-0.12)
("rust-piper" ,rust-piper-0.2)
("rust-polling" ,rust-polling-3)
("rust-png" ,rust-png-0.17)
("rust-proc-macro2" ,rust-proc-macro2-1)
("rust-quote" ,rust-quote-1)
("rust-raw-window-handle" ,rust-raw-window-handle-0.5)
("rust-regex-automata" ,rust-regex-automata-0.4)
("rust-rustix-openpty" ,rust-rustix-openpty-0.1)
("rust-serde" ,rust-serde-1)
("rust-serde-json" ,rust-serde-json-1)
("rust-serde-yaml" ,rust-serde-yaml-0.8)
("rust-serde-yaml" ,rust-serde-yaml-0.9)
("rust-signal-hook" ,rust-signal-hook-0.3)
("rust-syn" ,rust-syn-2)
("rust-toml" ,rust-toml-0.8)
("rust-unicode-width" ,rust-unicode-width-0.1)
("rust-wayland-client" ,rust-wayland-client-0.29)
("rust-windows-sys" ,rust-windows-sys-0.36)
("rust-winit" ,rust-winit-0.28)
("rust-x11-dl" ,rust-x11-dl-2)
("rust-vte" ,rust-vte-0.13)
("rust-windows-sys" ,rust-windows-sys-0.48)
("rust-winit" ,rust-winit-0.29)
("rust-xdg" ,rust-xdg-2))
#:cargo-development-inputs
(("rust-clap-complete" ,rust-clap-complete-3))
(("rust-clap-complete" ,rust-clap-complete-4)
("rust-log" ,rust-log-0.4)
("rust-serde" ,rust-serde-1)
("rust-serde-json" ,rust-serde-json-1)
("rust-toml" ,rust-toml-0.8))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-xdg-open
@ -1582,7 +1600,9 @@ (define-public alacritty
(search-input-file inputs (string-append "lib/" all)))
;; There are several libwayland libraries.
(("libwayland-.*\\.so" all)
(("libwayland\\.so" all)
(search-input-file inputs (string-append "lib/" all)))
(("libwayland-[[:alpha:]]*\\.so" all)
(search-input-file inputs (string-append "lib/" all)))
(("libxkbcommon\\.so")
(search-input-file inputs "lib/libxkbcommon.so")))))
@ -1594,21 +1614,30 @@ (define-public alacritty
(share (string-append out "/share"))
(icons (string-append share "/icons/hicolor/scalable/apps"))
(tic (search-input-file (or native-inputs inputs) "/bin/tic"))
(man (string-append share "/man/man1"))
(man (string-append share "/man"))
(alacritty-bin (car (find-files "target" "^alacritty$"))))
;; Install the executable.
(install-file alacritty-bin bin)
;; Install man pages.
(mkdir-p man)
(copy-file "extra/alacritty.man"
(string-append man "/alacritty.1"))
;; Install example configuration.
(install-file "alacritty.yml"
(string-append share "/doc/alacritty-"
,(package-version this-package) "/example"))
(mkdir-p (string-append man "/man1"))
(mkdir-p (string-append man "/man5"))
(define (create-manpage manpage)
(let ((mandir (string-append
"/man" (string-take-right manpage 1) "/")))
(with-input-from-file (string-append manpage ".scd")
(lambda _
(with-output-to-file (string-append man mandir manpage)
(lambda _ (invoke "scdoc")))))))
(with-directory-excursion "extra/man"
(for-each create-manpage '("alacritty.1"
"alacritty-msg.1"
"alacritty.5"
"alacritty-bindings.5")))
;; Install desktop file.
(install-file "extra/linux/Alacritty.desktop"
(string-append share "/applications"))
(install-file "extra/linux/org.alacritty.Alacritty.appdata.xml"
(string-append share "/metainfo"))
;; Install icon.
(mkdir-p icons)
(copy-file "extra/logo/alacritty-term.svg"
@ -1631,7 +1660,8 @@ (define-public alacritty
(native-inputs
(list ncurses
pkg-config
python))
python
scdoc))
(inputs
(list expat
fontconfig

View file

@ -28,6 +28,7 @@ (define-module (gnu packages tree-sitter)
#:use-module (gnu packages)
#:use-module (gnu packages crates-graphics)
#:use-module (gnu packages crates-io)
#:use-module (gnu packages crates-web)
#:use-module (gnu packages graphviz)
#:use-module (gnu packages icu4c)
#:use-module (gnu packages node)

View file

@ -96,6 +96,7 @@ (define-module (gnu packages version-control)
#:use-module (gnu packages check)
#:use-module (gnu packages cook)
#:use-module (gnu packages crates-io)
#:use-module (gnu packages crates-vcs)
#:use-module (gnu packages curl)
#:use-module (gnu packages databases)
#:use-module (gnu packages docbook)

View file

@ -3,7 +3,7 @@
;;; Copyright © 2014, 2015, 2016 David Thompson <davet@gnu.org>
;;; Copyright © 2014, 2015, 2016, 2018, 2020 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;;; Copyright © 2015-2023 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2015-2024 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2015, 2016 Andy Patterson <ajpatter@uwaterloo.ca>
;;; Copyright © 2015, 2018, 2019, 2020, 2021, 2023 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015, 2016, 2017, 2018, 2019 Alex Vong <alexvong1995@gmail.com>
@ -915,7 +915,7 @@ (define-public liba52
(define-public libaom
(package
(name "libaom")
(version "3.5.0")
(version "3.8.0")
(source (origin
(method git-fetch)
(uri (git-reference
@ -924,10 +924,10 @@ (define-public libaom
(file-name (git-file-name name version))
(sha256
(base32
"0arn8a88jz4mj69n8cs4qmrdjwhbvzsqgnx20wr9mq01b06kqich"))))
"04zfgvzi4h4ybvjc4zfpfsmldz8w6vasjlrry7j4p6g3g7wk64r7"))))
(build-system cmake-build-system)
(native-inputs
(list perl pkg-config python)) ; to detect the version
(list perl pkg-config python)) ; to detect the version
(arguments
`(#:tests? #f ; downloads many video clips
#:configure-flags
@ -5575,7 +5575,7 @@ (define-public shotcut
(define-public dav1d
(package
(name "dav1d")
(version "1.0.0")
(version "1.3.0")
(source
(origin
(method git-fetch)
@ -5584,9 +5584,12 @@ (define-public dav1d
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32 "0jkvb5as7danpalzlwd0w1dc9i2vijvmf39z0j6fwqvialsgnnj5"))))
(base32 "17r6qdijdnqfciqa0ia2y4gyhaav6y5gc4d9xj4dg9h7xnpyxc3k"))))
(build-system meson-build-system)
(native-inputs (list nasm))
(native-inputs
(if (target-x86?)
(list nasm)
'()))
(home-page "https://code.videolan.org/videolan/dav1d")
(synopsis "AV1 decoder")
(description "dav1d is a new AV1 cross-platform decoder, and focused on
@ -5851,84 +5854,76 @@ (define-public w-scan
(define-public rav1e
(package
(name "rav1e")
(version "0.6.6")
(version "0.7.1")
(source
(origin
(method url-fetch)
(uri (crate-uri "rav1e" version))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "1h9fhmamb7mh3cv86y1qja9qb7r6w2jv3p8ydngvsyjy59lq7hqn"))
(modules '((guix build utils)))
(snippet
'(begin (substitute* "Cargo.toml"
(("\"= ?([[:digit:]]+(\\.[[:digit:]]+)*)" _ version)
(string-append "\"^" version)))))))
(base32 "1sawva6nmj2fvynydbcirr3nb7wjyg0id2hz2771qnv6ly0cx1yd"))))
(build-system cargo-build-system)
(arguments
`(#:cargo-inputs
`(#:install-source? #f
#:cargo-inputs
(("rust-aom-sys" ,rust-aom-sys-0.3)
("rust-arbitrary" ,rust-arbitrary-0.4)
("rust-arbitrary" ,rust-arbitrary-1)
("rust-arg-enum-proc-macro" ,rust-arg-enum-proc-macro-0.3)
("rust-arrayvec" ,rust-arrayvec-0.7)
("rust-av-metrics" ,rust-av-metrics-0.9)
("rust-av1-grain" ,rust-av1-grain-0.2)
("rust-backtrace" ,rust-backtrace-0.3)
("rust-bitstream-io" ,rust-bitstream-io-1)
("rust-built" ,rust-built-0.5)
("rust-bitstream-io" ,rust-bitstream-io-2)
("rust-built" ,rust-built-0.7)
("rust-byteorder" ,rust-byteorder-1)
("rust-cc" ,rust-cc-1)
("rust-cfg-if" ,rust-cfg-if-1)
("rust-clap" ,rust-clap-4)
("rust-clap-complete" ,rust-clap-complete-4)
("rust-clap-lex" ,rust-clap-lex-0.3)
("rust-console" ,rust-console-0.15)
("rust-crossbeam" ,rust-crossbeam-0.8)
("rust-dav1d-sys" ,rust-dav1d-sys-0.7)
("rust-fern" ,rust-fern-0.6)
("rust-image" ,rust-image-0.24)
("rust-interpolate-name" ,rust-interpolate-name-0.2)
("rust-itertools" ,rust-itertools-0.10)
("rust-itertools" ,rust-itertools-0.12)
("rust-ivf" ,rust-ivf-0.1)
("rust-libc" ,rust-libc-0.2)
("rust-libfuzzer-sys" ,rust-libfuzzer-sys-0.3)
("rust-libdav1d-sys" ,rust-libdav1d-sys-0.6)
("rust-libfuzzer-sys" ,rust-libfuzzer-sys-0.4)
("rust-log" ,rust-log-0.4)
("rust-maybe-rayon" ,rust-maybe-rayon-0.1)
("rust-nasm-rs" ,rust-nasm-rs-0.2)
("rust-new-debug-unreachable" ,rust-new-debug-unreachable-1)
("rust-nom" ,rust-nom-7)
("rust-noop-proc-macro" ,rust-noop-proc-macro-0.3)
("rust-num-derive" ,rust-num-derive-0.3)
("rust-num-derive" ,rust-num-derive-0.4)
("rust-num-traits" ,rust-num-traits-0.2)
("rust-once-cell" ,rust-once-cell-1)
("rust-paste" ,rust-paste-1)
("rust-profiling" ,rust-profiling-1)
("rust-rand" ,rust-rand-0.8)
("rust-rand-chacha" ,rust-rand-chacha-0.3)
("rust-rust-hawktracer" ,rust-rust-hawktracer-0.7)
("rust-rustc-version" ,rust-rustc-version-0.4)
("rust-scan-fmt" ,rust-scan-fmt-0.2)
("rust-serde" ,rust-serde-1)
("rust-serde-big-array" ,rust-serde-big-array-0.4)
("rust-serde-big-array" ,rust-serde-big-array-0.5)
("rust-signal-hook" ,rust-signal-hook-0.3)
("rust-simd-helpers" ,rust-simd-helpers-0.1)
("rust-system-deps" ,rust-system-deps-6)
("rust-thiserror" ,rust-thiserror-1)
("rust-toml" ,rust-toml-0.5)
("rust-toml" ,rust-toml-0.8)
("rust-tracing" ,rust-tracing-0.1)
("rust-tracing-chrome" ,rust-tracing-chrome-0.7)
("rust-tracing-subscriber" ,rust-tracing-subscriber-0.3)
("rust-v-frame" ,rust-v-frame-0.3)
("rust-wasm-bindgen" ,rust-wasm-bindgen-0.2)
("rust-winnow" ,rust-winnow-0.4)
("rust-y4m" ,rust-y4m-0.8))
#:cargo-development-inputs
(("rust-assert-cmd" ,rust-assert-cmd-2)
("rust-criterion" ,rust-criterion-0.4)
("rust-criterion" ,rust-criterion-0.5)
("rust-interpolate-name" ,rust-interpolate-name-0.2)
("rust-nom" ,rust-nom-7)
("rust-predicates" ,rust-predicates-2)
("rust-predicates-core" ,rust-predicates-core-1)
("rust-predicates-tree" ,rust-predicates-tree-1)
("rust-pretty-assertions" ,rust-pretty-assertions-1)
("rust-quickcheck" ,rust-quickcheck-1)
("rust-quickcheck-macros" ,rust-quickcheck-macros-1)
("rust-rand" ,rust-rand-0.8)
("rust-rand-chacha" ,rust-rand-chacha-0.3)
("rust-semver" ,rust-semver-1))
@ -5942,9 +5937,12 @@ (define-public rav1e
"--library-type" "cdylib"
(string-append "--prefix=" out))))))))
(native-inputs
(list nasm pkg-config rust-cargo-c))
(append (if (target-x86?)
(list nasm)
'())
(list pkg-config rust-cargo-c)))
(inputs
(list libgit2 zlib))
(list libgit2-1.7 zlib))
(home-page "https://github.com/xiph/rav1e/")
(synopsis "Fast and safe AV1 encoder")
(description "@code{rav1e} is an AV1 video encoder. It is designed to

View file

@ -119,8 +119,11 @@ (define-module (gnu packages web)
#: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-crypto)
#:use-module (gnu packages crates-io)
#:use-module (gnu packages crates-gtk)
#:use-module (gnu packages crates-tls)
#:use-module (gnu packages crates-web)
#:use-module (gnu packages curl)
#:use-module (gnu packages cyrus-sasl)
#:use-module (gnu packages databases)

View file

@ -64,7 +64,7 @@
;;; Copyright © 2023 Jonathan Brielamier <jonathan.brielmaier@web.de>
;;; Copyright © 2023 Vessel Wave <vesselwave@disroot.org>
;;; Copyright © 2023 Nicolas Graves <ngraves@ngraves.fr>
;;; Copyright © 2023 Jaeme Sifat <jaeme@runbox.com>
;;; Copyright © 2023, 2024 Jaeme Sifat <jaeme@runbox.com>
;;; Copyright © 2023 Josselin Poiret <dev@jpoiret.xyz>
;;; Copyright © 2024 Timotej Lazar <timotej.lazar@araneo.si>
;;; Copyright © 2024 Ahmad Draidi <a.r.draidi@redscript.org>
@ -92,6 +92,7 @@ (define-module (gnu packages wm)
#:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix build-system asdf)
#:use-module (guix build-system cargo)
#:use-module (guix build-system cmake)
#:use-module (guix build-system copy)
#:use-module (guix build-system gnu)
@ -109,8 +110,10 @@ (define-module (gnu packages wm)
#:use-module (gnu packages bison)
#:use-module (gnu packages build-tools)
#:use-module (gnu packages calendar)
#:use-module (gnu packages compression)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages crates-io)
#:use-module (gnu packages crates-graphics)
#:use-module (gnu packages datastructures)
#:use-module (gnu packages docbook)
#:use-module (gnu packages documentation)
@ -1935,6 +1938,94 @@ (define-public swaybg
(description "Swaybg is a wallpaper utility for Wayland compositors.")
(license license:expat))) ; MIT license
(define-public swww
(package
(name "swww")
(version "0.8.2")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/LGFae/swww")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"1ps10dv6a8a0hiw7p8kg64mf81pvavskmyn5xpbfw6hrc991vdlz"))
(modules '((guix build utils)))
(snippet
'(begin (substitute* "utils/Cargo.toml"
(("\"=([[:digit:]]+(\\.[[:digit:]]+)*)" _ version)
(string-append "\"^" version)))))))
(build-system cargo-build-system)
(arguments
(list
#:install-source? #f
#:cargo-inputs
`(("rust-log" ,rust-log-0.4)
("rust-simplelog" ,rust-simplelog-0.12)
("rust-wayland-client" ,rust-wayland-client-0.31)
("rust-smithay-client-toolkit" ,rust-smithay-client-toolkit-0.18)
("rust-nix" ,rust-nix-0.27)
("rust-keyframe" ,rust-keyframe-1)
("rust-rkyv" ,rust-rkyv-0.7)
("rust-rayon" ,rust-rayon-1)
("rust-spin-sleep" ,rust-spin-sleep-1)
("rust-sd-notify" ,rust-sd-notify-0.4)
("rust-image" ,rust-image-0.24)
("rust-fast-image-resize" ,rust-fast-image-resize-2)
("rust-clap" ,rust-clap-4)
("rust-rand" ,rust-rand-0.8)
("rust-lazy-static" ,rust-lazy-static-1)
("rust-lzzzz" ,rust-lzzzz-1))
#:cargo-development-inputs
`(("rust-rand" ,rust-rand-0.8)
("rust-assert-cmd" ,rust-assert-cmd-2)
("rust-criterion" ,rust-criterion-0.5))
#:phases
#~(modify-phases %standard-phases
(add-before 'build 'build-documentation
(lambda* (#:key inputs #:allow-other-keys)
(invoke "doc/gen.sh")))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin"))
(share (string-append out "/share"))
(man1 (string-append share "/man/man1"))
(swww (car (find-files "target" "^swww$")))
(swww-daemon (car (find-files "target" "^swww-daemon$")))
(bash-completions-dir
(string-append share "/bash-completion/completions"))
(zsh-completions-dir
(string-append share "/zsh/site-functions"))
(fish-completions-dir
(string-append share "/fish/vendor_completions.d"))
(elvish-completions-dir
(string-append share "/elvish/lib")))
(install-file swww bin)
(install-file swww-daemon bin)
(copy-recursively "doc/generated" man1)
(install-file "completions/swww.bash" bash-completions-dir)
(install-file "completions/_swww" zsh-completions-dir)
(install-file "completions/swww.fish" fish-completions-dir)
(install-file "completions/swww.elv" elvish-completions-dir))))
(add-after 'install 'wrap-binaries
(lambda* (#:key outputs inputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
(lz4 (assoc-ref inputs "lz4")))
(wrap-program (string-append out "/bin/swww")
`("PATH" prefix (,(string-append lz4 "/bin"))))
(wrap-program (string-append out "/bin/swww-daemon")
`("PATH" prefix (,(string-append lz4 "/bin"))))))))))
(native-inputs (list scdoc))
(inputs (list bash-minimal lz4))
(home-page "https://github.com/LGFae/swww")
(synopsis
"Efficient animated wallpaper daemon for wayland controlled at runtime")
(description
"A Solution to your Wayland Wallpaper Woes (swww). It uses minimal resources
and provides animations for switching between backgrounds.")
(license license:gpl3+)))
(define-public swaynotificationcenter
(package

View file

@ -2,7 +2,7 @@
;;; Copyright © 2016 David Craven <david@craven.ch>
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2019 Ivan Petkov <ivanppetkov@gmail.com>
;;; Copyright © 2019-2023 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2019-2024 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
;;;
@ -162,6 +162,7 @@ (define* (configure #:key inputs
("powerpc64le-linux-gnu" "powerpc64le-unknown-linux-gnu")
("riscv64-linux-gnu" "riscv64gc-unknown-linux-gnu")
("x86_64-linux-gnu" "x86_64-unknown-linux-gnu")
("x86_64-linux-gnux32" "x86_64-unknown-linux-gnux32")
("i586-pc-gnu" "i686-unknown-hurd-gnu")
("i686-w64-mingw32" "i686-pc-windows-gnu")
("x86_64-w64-mingw32" "x86_64-pc-windows-gnu")