mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-27 04:59:27 -05:00
gnu: rust: Add 1.38
All packages are still built with rustc 1.37, but users will see rustc 1.38 in their profiles, and packages that require newer compiler versions will be possible to add. * gnu/packages/rust.scm (rust-1.31): Factor out the patch-command-exec-tests phase to a separate procedure. (patch-command-exec-tests-phase): New procedure. (rust): Rename to rust-1.37, make rust an alias. (rust-1.38): New variable.
This commit is contained in:
parent
1a7247c629
commit
444bc2ddf2
1 changed files with 53 additions and 22 deletions
|
@ -912,20 +912,15 @@ (define-public rust-1.30
|
|||
(("only-x86_64") "ignore-test"))
|
||||
#t)))))))))
|
||||
|
||||
(define-public rust-1.31
|
||||
(let ((base-rust
|
||||
(rust-bootstrapped-package rust-1.30 "1.31.1"
|
||||
"0sk84ff0cklybcp0jbbxcw7lk7mrm6kb6km5nzd6m64dy0igrlli")))
|
||||
(package
|
||||
(inherit base-rust)
|
||||
(arguments
|
||||
(substitute-keyword-arguments (package-arguments base-rust)
|
||||
((#:phases phases)
|
||||
`(modify-phases ,phases
|
||||
(add-after 'patch-tests 'patch-command-exec-tests
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
(define (patch-command-exec-tests-phase test-path)
|
||||
"The command-exec.rs test moves around between releases. We need to apply
|
||||
a Guix-specific patch to it for each release. This function generates the phase
|
||||
that applies said patch, parametrized by the test-path. This is done this way
|
||||
because the phase is more complex than the equivalents for other tests that
|
||||
move around."
|
||||
`(lambda* (#:key inputs #:allow-other-keys)
|
||||
(let ((coreutils (assoc-ref inputs "coreutils")))
|
||||
(substitute* "src/test/run-pass/command-exec.rs"
|
||||
(substitute* ,test-path
|
||||
;; This test suite includes some tests that the stdlib's
|
||||
;; `Command` execution properly handles situations where
|
||||
;; the environment or PATH variable are empty, but this
|
||||
|
@ -937,6 +932,20 @@ (define-public rust-1.31
|
|||
((" Command::new\\(\"echo\"\\)")
|
||||
(string-append "\nCommand::new(\"" coreutils "/bin/echo\")\n")))
|
||||
#t)))
|
||||
|
||||
(define-public rust-1.31
|
||||
(let ((base-rust
|
||||
(rust-bootstrapped-package rust-1.30 "1.31.1"
|
||||
"0sk84ff0cklybcp0jbbxcw7lk7mrm6kb6km5nzd6m64dy0igrlli")))
|
||||
(package
|
||||
(inherit base-rust)
|
||||
(arguments
|
||||
(substitute-keyword-arguments (package-arguments base-rust)
|
||||
((#:phases phases)
|
||||
`(modify-phases ,phases
|
||||
(add-after 'patch-tests 'patch-command-exec-tests
|
||||
,(patch-command-exec-tests-phase
|
||||
"src/test/run-pass/command-exec.rs"))
|
||||
;; The test has been moved elsewhere.
|
||||
(replace 'disable-amd64-avx-test
|
||||
(lambda _
|
||||
|
@ -1084,7 +1093,7 @@ (define-public rust-1.36
|
|||
`(modify-phases ,phases
|
||||
(delete 'patch-process-docs-rev-cmd))))))))
|
||||
|
||||
(define-public rust
|
||||
(define-public rust-1.37
|
||||
(let ((base-rust
|
||||
(rust-bootstrapped-package rust-1.36 "1.37.0"
|
||||
"1hrqprybhkhs6d9b5pjskfnc5z9v2l2gync7nb39qjb5s0h703hj")))
|
||||
|
@ -1100,3 +1109,25 @@ (define-public rust
|
|||
(mkdir-p cargo-home)
|
||||
(setenv "CARGO_HOME" cargo-home)
|
||||
#t))))))))))
|
||||
|
||||
(define-public rust-1.38
|
||||
(let ((base-rust
|
||||
(rust-bootstrapped-package rust-1.37 "1.38.0"
|
||||
"101dlpsfkq67p0hbwx4acqq6n90dj4bbprndizpgh1kigk566hk4")))
|
||||
(package
|
||||
(inherit base-rust)
|
||||
(arguments
|
||||
(substitute-keyword-arguments (package-arguments base-rust)
|
||||
((#:phases phases)
|
||||
`(modify-phases ,phases
|
||||
(replace 'patch-command-exec-tests
|
||||
,(patch-command-exec-tests-phase
|
||||
"src/test/ui/command-exec.rs"))
|
||||
(add-after 'patch-tests 'patch-command-uid-gid-test
|
||||
(lambda _
|
||||
(substitute* "src/test/ui/command-uid-gid.rs"
|
||||
(("/bin/sh") (which "sh"))
|
||||
(("ignore-sgx") "ignore-sgx\n// ignore-tidy-linelength"))
|
||||
#t)))))))))
|
||||
|
||||
(define-public rust rust-1.37)
|
||||
|
|
Loading…
Reference in a new issue