diff mbox series

[bug#40957,2/?] gnu: rust: Add 1.41

Message ID 20200429160218.15270-1-kuba@kadziolka.net
State Accepted
Headers show
Series [bug#40957,2/?] gnu: rust: Add 1.41 | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job

Commit Message

Maja Kądziołka April 29, 2020, 4:02 p.m. UTC
---
 gnu/packages/rust.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index a82bfa5912..78cfdfc97a 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -1210,4 +1210,37 @@  move around."
                ;; "Remove painful test that is not pulling its weight"
                (delete 'remove-unsupported-tests)))))))))
 
+(define-public rust-1.41
+  (let ((base-rust
+         (rust-bootstrapped-package rust-1.40 "1.41.1"
+           "0ws5x0fxv57fyllsa6025h3q6j9v3m8nb3syl4x0hgkddq0kvj9q")))
+    (package
+      (inherit base-rust)
+      (arguments
+       (substitute-keyword-arguments (package-arguments base-rust)
+         ((#:validate-runpath? _) #t)
+         ((#:phases phases)
+          `(modify-phases ,phases
+             ;; The tests got moved.
+             (replace 'patch-command-exec-tests
+               ,(patch-command-exec-tests-phase
+                  "src/test/ui/command/command-exec.rs"))
+             (replace 'patch-command-uid-gid-test
+               (lambda _
+                 (substitute* "src/test/ui/command/command-uid-gid.rs"
+                   (("/bin/sh") (which "sh"))
+                   (("ignore-sgx") "ignore-sgx\n// ignore-tidy-linelength"))
+                 #t))
+             ;; The test in question got fixed long ago, no need to chase it
+             ;; after renames.
+             (delete 'disable-cargo-test-for-nightly-channel)
+             ;; The patch-tests phase in rust-1.19 uses the fragile approach
+             ;; of inserting additional newlines instead of disabling the tidy
+             ;; check. Fixing this retroactively requires painful rebuilds.
+             (add-after 'patch-tests 'ignore-tidy-linelength
+               (lambda _
+                 (let ((port (open-file "src/libstd/process.rs" "a")))
+                   (display "// ignore-tidy-linelength\n" port))
+                 #t)))))))))
+
 (define-public rust rust-1.37)