gnu: rust-1.71: Fix building on powerpc64le-linux.

* gnu/packages/rust.scm (rust-1.71)[source]: Adjust snippet to fix
building rustix on all architectures.

Change-Id: I1661ebd9071b3dba92e0f871fad9ed5bcbef38ea
This commit is contained in:
Efraim Flashner 2024-01-16 20:48:51 +02:00
parent fb295a6a12
commit 4e058aa7e8
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -815,6 +815,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)