summaryrefslogtreecommitdiff
path: root/gnu/packages/rust.scm
diff options
context:
space:
mode:
authorJakub Kądziołka <kuba@kadziolka.net>2020-07-15 22:02:24 +0200
committerJakub Kądziołka <kuba@kadziolka.net>2020-07-17 14:21:38 +0200
commit17666c090b6329bf0be3bb068382d9cd4aafab01 (patch)
treef3d66f8248e33cfb559a947fa57359517e50d82a /gnu/packages/rust.scm
parent7d49e1897c79cc6b397a1bdf0eeda5077d9edfb1 (diff)
gnu: Add Rust 1.45.
* gnu/packages/rust.scm (rust-1.45): New variable. * gnu/packages/patches/rust-1.45-linker-locale.patch: New file. * gnu/local.mk (dist_patch_DATA): Add the patch to the list.
Diffstat (limited to 'gnu/packages/rust.scm')
-rw-r--r--gnu/packages/rust.scm37
1 files changed, 36 insertions, 1 deletions
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 851a996e4b..b0ad992138 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -1280,7 +1280,42 @@ move around."
(rust-bootstrapped-package rust-1.43 "1.44.1"
"0ww4z2v3gxgn3zddqzwqya1gln04p91ykbrflnpdbmcd575n8bky"))
-;; NOTE: An update to LLVM 10 is coming in 1.45, make sure not to miss it.
+(define-public rust-1.45
+ (let ((base-rust
+ (rust-bootstrapped-package rust-1.44 "1.45.0"
+ "0z6dh0yd3fcm3qh960wi4s6fa6pxz9mh77psycsqfkkx5kqra15s")))
+ (package
+ (inherit base-rust)
+ (source
+ (origin
+ (inherit (package-source base-rust))
+ (patches (search-patches "rust-1.45-linker-locale.patch"))))
+ (inputs
+ (alist-replace "llvm" (list llvm-10)
+ (package-inputs base-rust)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments base-rust)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ ;; These tests make sure that the parser behaves properly when
+ ;; a source file starts with a shebang. Unfortunately,
+ ;; the patch-shebangs phase changes the meaning of these edge-cases.
+ ;; We skip the test since it's drastically unlikely Guix's packaging
+ ;; will introduce a bug here.
+ (add-after 'patch-tests 'skip-shebang-tests
+ (lambda _
+ (with-directory-excursion "src/test/ui/parser/shebang"
+ (delete-file "shebang-doc-comment.rs")
+ (delete-file "sneaky-attrib.rs")
+ #t)))
+ ;; This test case synchronizes itself by starting a localhost TCP
+ ;; server. This doesn't work as networking is not available.
+ (add-after 'patch-tests 'skip-networking-test
+ (lambda _
+ (substitute* "src/tools/cargo/tests/testsuite/freshness.rs"
+ (("fn linking_interrupted" all)
+ (string-append "#[ignore] " all)))
+ #t)))))))))
;; TODO(staging): Bump this variable to the latest packaged rust.
(define-public rust rust-1.39)