1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

gnu: Add rust-1.90.

* gnu/packages/rust.scm (rust-1.90): New variable.

Change-Id: I0489f61d857af8e920498452665fcbfd1345d2de
This commit is contained in:
Maxim Cournoyer
2025-10-17 14:29:41 +09:00
committed by Andreas Enge
parent d61975a7d5
commit d0402ae222

View File

@@ -1548,6 +1548,66 @@ ge13ca993e8ccb9ba9847cc330696e02839f328f7/jemalloc"))
(modify-inputs (package-inputs base-rust)
(prepend curl `(,nghttp2 "lib") libffi))))))
(define-public rust-1.90
(let ((base-rust
(rust-bootstrapped-package
rust-1.89 "1.90.0"
"0zlv3ybd8za07brxwj4n03cma1snnpvbqj0h0wg3bmafpaf9z6kr")))
(package
(inherit base-rust)
(source
(origin
(inherit (package-source base-rust))
(snippet
'(begin
(for-each delete-file-recursively
'("src/llvm-project"
"vendor/curl-sys-0.4.79+curl-8.12.0/curl"
"vendor/curl-sys-0.4.82+curl-8.14.1/curl"
"vendor/jemalloc-sys-0.5.3+5.3.0-patched/jemalloc"
"vendor/jemalloc-sys-0.5.4+5.3.0-patched/jemalloc"
"vendor/libffi-sys-3.3.2/libffi"
"vendor/libz-sys-1.1.21/src/zlib"
"vendor/libz-sys-1.1.22/src/zlib"
"vendor/libmimalloc-sys-0.1.42/c_src/mimalloc"
"vendor/openssl-src-111.28.2+1.1.1w/openssl"
"vendor/openssl-src-300.5.0+3.5.0/openssl"
"vendor/tikv-jemalloc-sys-0.5.4+5.3.0-patched/jemalloc"
"vendor/tikv-jemalloc-sys-0.6.0+5.3.0-1-\
ge13ca993e8ccb9ba9847cc330696e02839f328f7/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)$"))
;; Use the packaged nghttp2.
(for-each
(lambda (ver)
(let ((vendored-dir
(format #f "vendor/libnghttp2-sys-~a/nghttp2" ver))
(build-rs
(format #f "vendor/libnghttp2-sys-~a/build.rs" ver)))
(delete-file-recursively vendored-dir)
(delete-file build-rs)
(call-with-output-file build-rs
(lambda (port)
(format port "fn main() {~@
println!(\"cargo:rustc-link-lib=nghttp2\");~@
}~%")))))
'("0.1.11+1.64.0"))
;; Adjust vendored dependency to explicitly use rustix with libc
;; backend.
(substitute* '("vendor/tempfile-3.14.0/Cargo.toml"
"vendor/tempfile-3.16.0/Cargo.toml"
"vendor/tempfile-3.19.0/Cargo.toml"
"vendor/tempfile-3.19.1/Cargo.toml"
"vendor/tempfile-3.20.0/Cargo.toml")
(("features = \\[\"fs\"" all)
(string-append all ", \"use-libc\"")))))))
(inputs
(modify-inputs (package-inputs base-rust)
(replace "llvm" llvm-21))))))
(define (make-ignore-test-list strs)
"Function to make creating a list to ignore tests a bit easier."
(map (lambda (str)