GNU bug report logs -
#31040
[PATCH] gnu: rust: Add rust 1.25.0 release and enable cargo tests
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 31040 in the body.
You can then email your comments to 31040 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#31040
; Package
guix-patches
.
(Tue, 03 Apr 2018 11:02:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Nikolai Merinov <nikolai.merinov <at> member.fsf.org>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Tue, 03 Apr 2018 11:02:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/rust.scm (rust-1.23): Add "patch-cargo-tests" stage to disable
tests that incompatible with guix build environemnt; start tests for "cargo"
on "check" stage.
(rust-1.24): Rename "rust" to "rust-1.24".
(rust): Add "rust" package for "1.25.0" release. Disable new cargo test that
required network access
---
gnu/packages/rust.scm | 43 +++++++++++++++++++++++++++++++++++++++----
1 file changed, 39 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 70140579b..cbca2dc7e 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -179,9 +179,12 @@ in turn be used to build the final Rust.")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'set-env
- (lambda _
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Disable test for cross compilation support
+ (setenv "CFG_DISABLE_CROSS_TESTS" "1")
(setenv "SHELL" (which "sh"))
(setenv "CONFIG_SHELL" (which "sh"))
+ (setenv "CC" (string-append (assoc-ref inputs "gcc") "/bin/gcc"))
;; guix llvm-3.9.1 package installs only shared libraries
(setenv "LLVM_LINK_SHARED" "1")
#t))
@@ -204,7 +207,16 @@ in turn be used to build the final Rust.")
;; <https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00193.html>
(delete-file-recursively "src/test/run-make/linker-output-non-utf8")
#t)))
- (add-after 'patch-tests 'fix-mtime-bug
+ (add-after 'patch-tests 'patch-cargo-tests
+ (lambda* _
+ (substitute* "src/tools/cargo/tests/build.rs"
+ (("/usr/bin/env") (which "env"))
+ ;; Guix llvm compiled without asmjs-unknown-emscripten at all
+ (("fn wasm32_final_outputs") "#[ignore]\nfn wasm32_final_outputs"))
+ (substitute* "src/tools/cargo/tests/death.rs"
+ ;; Stuck when built in container
+ (("fn ctrl_c_kills_everyone") "#[ignore]\nfn ctrl_c_kills_everyone"))))
+ (add-after 'patch-cargo-tests 'fix-mtime-bug
(lambda* _
(substitute* "src/build_helper/lib.rs"
;; Bug in Rust code.
@@ -289,7 +301,8 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
(invoke "./x.py" "build" "src/tools/cargo")))
(replace 'check
(lambda* _
- (invoke "./x.py" "test")))
+ (invoke "./x.py" "test")
+ (invoke "./x.py" "test" "src/tools/cargo")))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(invoke "./x.py" "install")
@@ -318,7 +331,7 @@ safety and thread safety guarantees.")
;; Dual licensed.
(license (list license:asl2.0 license:expat))))
-(define-public rust
+(define-public rust-1.24
(let ((base-rust rust-1.23))
(package
(inherit base-rust)
@@ -334,3 +347,25 @@ safety and thread safety guarantees.")
(substitute-keyword-arguments (package-arguments base-rust)
((#:phases phases) `(modify-phases ,phases
(delete 'fix-mtime-bug))))))))
+
+(define-public rust
+ (let ((base-rust rust-1.24))
+ (package
+ (inherit base-rust)
+ (version "1.25.0")
+ (source
+ (rust-source version
+ "0baxjr99311lvwdq0s38bipbnj72pn6fgbk6lcq7j555xq53mxpf"))
+ (native-inputs
+ (alist-replace "cargo-bootstrap" (list base-rust "cargo")
+ (alist-replace "rustc-bootstrap" (list base-rust)
+ (package-native-inputs base-rust))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments base-rust)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'patch-cargo-tests 'patch-cargo-index-update
+ (lambda* _
+ (substitute* "src/tools/cargo/tests/generate-lockfile.rs"
+ ;; This test want to update crate index
+ (("fn no_index_update") "#[ignore]\nfn no_index_update")))))))))))
--
2.16.2
bug closed, send any further explanations to
31040 <at> debbugs.gnu.org and Nikolai Merinov <nikolai.merinov <at> member.fsf.org>
Request was from
Danny Milosavljevic <dannym <at> scratchpost.org>
to
control <at> debbugs.gnu.org
.
(Sun, 15 Apr 2018 08:16:01 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 13 May 2018 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 42 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.