guix_mirror_bot pushed a commit to branch rust-team
in repository guix.
commit b4236e432ab4f9007f6b0d7103d5fbfa9aafcb30
Author: moksh <[email protected]>
AuthorDate: Mon Feb 2 23:49:45 2026 +0530
gnu: Add rust-1.91.
* gnu/packages/rust.scm (rust-1.91): New variable.
Change-Id: I5df33f594de40d714bfb8129abe777b76e8ea21a
Signed-off-by: Efraim Flashner <[email protected]>
---
gnu/packages/rust.scm | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 92 insertions(+)
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index bffac20657..01ba987a4c 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -18,6 +18,7 @@
;;; Copyright © 2022 Mark H Weaver <[email protected]>
;;; Copyright © 2023 Fries <[email protected]>
;;; Copyright © 2023 Herman Rimm <[email protected]>
+;;; Copyright © 2026 Untrusem <[email protected]>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1616,6 +1617,97 @@ ge13ca993e8ccb9ba9847cc330696e02839f328f7/jemalloc"))
(modify-inputs (package-inputs base-rust)
(replace "llvm" llvm-21))))))
+(define-public rust-1.91
+ (let ((base-rust
+ (rust-bootstrapped-package
+ rust-1.90 "1.91.0"
+ "12iysk87bmhlcdcbr939y8cdfcx0an4z9ixjlbq16c3ma60m4zrj")))
+ (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.83+curl-8.15.0/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/openssl-src-300.5.2+3.5.2/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.1/Cargo.toml"
+ "vendor/tempfile-3.20.0/Cargo.toml"
+ "vendor/tempfile-3.21.0/Cargo.toml")
+ (("features = \\[\"fs\"" all)
+ (string-append all ", \"use-libc\"")))))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments base-rust)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ ;; Adjust the stack size so we don't error out on some machines.
+ #;
+ (add-before 'build 'set-stack-size
+ (lambda _
+ (setenv "RUST_MIN_STACK" "16777216")))
+ (replace 'install
+ ;; Rust 1.91+ outputs to stage2 instead of stage1.
+ ;; Cannot use './x.py install' as it runs generate-copyright
+ ;; which fails due to patched cargo checksums.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (cargo-out (assoc-ref outputs "cargo"))
+ (build (string-append "build/"
+ ,(platform-rust-target
+ (lookup-platform-by-target-or-system
+ (or (%current-target-system)
+ (%current-system)))))))
+ (with-directory-excursion build
+ (install-file "stage2/bin/rustc"
+ (string-append out "/bin"))
+ (install-file "stage2-tools-bin/cargo"
+ (string-append cargo-out "/bin"))
+ (for-each delete-file
+ (find-files "stage2/lib" "\\.rmeta$"))
+ (for-each delete-file
+ (find-files "stage2/lib/rustlib"
+ "^librustc_driver.*\\.so$"))
+ (copy-recursively "stage2/lib"
+ (string-append out "/lib")))))))))))))
+
(define (make-ignore-test-list strs)
"Function to make creating a list to ignore tests a bit easier."
(map (lambda (str)