summaryrefslogtreecommitdiff
path: root/gnu/packages/rust.scm
diff options
context:
space:
mode:
authorDanny Milosavljevic <dannym@scratchpost.org>2018-09-20 22:16:45 +0200
committerDanny Milosavljevic <dannym@scratchpost.org>2018-09-21 01:35:00 +0200
commite0b07ccc1ab0b763f0e9da39f56f2a7aec6116d5 (patch)
tree274ca974c63236e51f6030dc5b1f2ea391f47e8a /gnu/packages/rust.scm
parent1bfaae25fab372c8ff86e34024adf20240699b55 (diff)
gnu: rust: Work around mtime bug in rust build helpers.
* gnu/packages/rust.scm (rust-1.20)[arguments]<#:phases>[fix-mtime-bug]: Delete. [reset-timestamps-after-changes]: Modify. (rust-1.24): Don't delete "fix-mtime-bug" since now it doesn't ever get created.
Diffstat (limited to 'gnu/packages/rust.scm')
-rw-r--r--gnu/packages/rust.scm17
1 files changed, 4 insertions, 13 deletions
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index ec8b30d78f..e8eca80aa6 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -534,15 +534,6 @@ safety and thread safety guarantees.")
(substitute* "src/test/run-pass/out-of-stack.rs"
(("// ignore-android") "// ignore-test\n// ignore-android"))
#t))
- (add-after 'ignore-glibc-2.27-incompatible-test 'fix-mtime-bug
- (lambda* _
- (substitute* "src/build_helper/lib.rs"
- ;; Bug in Rust code.
- ;; Current implementation assume that if dst not exist then it's mtime
- ;; is 0, but in same time "src" have 0 mtime in guix build!
- (("let threshold = mtime\\(dst\\);")
- "if !dst.exists() {\nreturn false\n}\n let threshold = mtime(dst);"))
- #t))
(replace 'configure
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -608,10 +599,11 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
(delete 'patch-cargo-tomls)
(add-before 'build 'reset-timestamps-after-changes
(lambda* _
- (define ref (stat "README.md"))
(for-each
(lambda (filename)
- (set-file-time filename ref))
+ ;; Rust 1.20.0 treats timestamp 0 as "file doesn't exist".
+ ;; Therefore, use timestamp 1.
+ (utime filename 1 1 1 1))
(find-files "." #:directories? #t))
#t))
(replace 'build
@@ -699,8 +691,7 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
;; This test is known to fail on aarch64 and powerpc64le:
;; https://github.com/rust-lang/rust/issues/45410
(("fn test_loading_cosine") "#[ignore]\nfn test_loading_cosine"))
- #t))
- (delete 'fix-mtime-bug))))))))
+ #t)))))))))
(define-public rust-1.25
(let ((base-rust