summary refs log tree commit diff
path: root/gnu/packages/rust.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-09-15 11:29:02 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-09-15 11:43:21 -0400
commit4920f6e634eeecb37b501bdc024dfe0aab849ed0 (patch)
treec7dd5859715071cb602133b67449a29488027f70 /gnu/packages/rust.scm
parent513091dbd2eeba138b558f5f9bb1ee6e68eee01d (diff)
parent3d297a0017210f1dd135592efb10846840a8af88 (diff)
downloadguix-4920f6e634eeecb37b501bdc024dfe0aab849ed0.tar.gz
Merge branch 'staging' into core-updates
Conflicts resolved in:
	gnu/local.mk
	gnu/packages/cmake.scm
	gnu/packages/glib.scm
	gnu/packages/gnome.scm
	gnu/packages/gtk.scm
	gnu/packages/sdl.scm

pango-next, vala-next and librsvg-bootstrap were removed in the process.
Diffstat (limited to 'gnu/packages/rust.scm')
-rw-r--r--gnu/packages/rust.scm34
1 files changed, 27 insertions, 7 deletions
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 2fb43f13cb..d6e8795698 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -557,13 +557,33 @@ safety and thread safety guarantees.")
    rust-1.57 "1.58.1" "1iq7kj16qfpkx8gvw50d8rf7glbm6s0pj2y1qkrz7mi56vfsyfd8"))
 
 (define rust-1.59
-  (rust-bootstrapped-package
-   ;; Verified that it *doesn't* build with 1.57. e.g.:
-   ;; * error: `doc(primitive)` should never have been stable
-   ;; * error[E0522]: definition of an unknown language item:
-   ;;   `generator_return`
-   ;; * error[E0206]: the trait `Copy` may not be implemented for this type
-   rust-1.58 "1.59.0" "1yc5bwcbmbwyvpfq7zvra78l0r8y3lbv60kbr62fzz2vx2pfxj57"))
+  (let ((base-rust
+          (rust-bootstrapped-package
+            ;; Verified that it *doesn't* build with 1.57. e.g.:
+            ;; * error: `doc(primitive)` should never have been stable
+            ;; * error[E0522]: definition of an unknown language item:
+            ;;   `generator_return`
+            ;; * error[E0206]: the trait `Copy` may not be implemented for this type
+            rust-1.58 "1.59.0" "1yc5bwcbmbwyvpfq7zvra78l0r8y3lbv60kbr62fzz2vx2pfxj57")))
+    (package
+      (inherit base-rust)
+        (arguments
+         (if (target-riscv64?)
+           (substitute-keyword-arguments (package-arguments base-rust)
+             ((#:phases phases)
+              `(modify-phases ,phases
+                 (add-after 'unpack 'revert-riscv-pause-instruction
+                   (lambda _
+                     ;; This fails with:
+                     ;; error: unknown directive, referring to '.insn'.
+                     ;; This is due to building with llvm < 14.
+                     ;; https://github.com/rust-lang/stdarch/issues/1291
+                     ;; Partial roll-back from this commit:
+                     ;; https://github.com/rust-lang/stdarch/pull/1271
+                     (substitute*
+                       "library/stdarch/crates/core_arch/src/riscv_shared/mod.rs"
+                       (("\\.insn i 0x0F, 0, x0, x0, 0x010") ".word 0x0100000F")))))))
+           (package-arguments base-rust))))))
 
 (define rust-1.60
   (rust-bootstrapped-package