summaryrefslogtreecommitdiff
path: root/gnu/packages/rust.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/rust.scm')
-rw-r--r--gnu/packages/rust.scm16
1 files changed, 16 insertions, 0 deletions
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 73c63cf801..85f497d041 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -786,6 +786,22 @@ safety and thread safety guarantees.")
(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