From 4e058aa7e885a0c10fdeee3e0621d580a6c35b23 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 16 Jan 2024 20:48:51 +0200 Subject: [PATCH] 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 --- gnu/packages/rust.scm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 85f497d041..5ad219f668 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -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)