summary refs log tree commit diff
path: root/gnu/packages/rust.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/rust.scm')
-rw-r--r--gnu/packages/rust.scm33
1 files changed, 15 insertions, 18 deletions
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index d5914f012b..35a96b5754 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -4,11 +4,12 @@
 ;;; Copyright © 2016 Nikita <nikita@n0.is>
 ;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
 ;;; Copyright © 2017, 2018 Nikolai Merinov <nikolai.merinov@member.fsf.org>
-;;; Copyright © 2017, 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Danny Milosavljevic <dannym+a@scratchpost.org>
 ;;; Copyright © 2019 Ivan Petkov <ivanppetkov@gmail.com>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
+;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -421,7 +422,9 @@ test = { path = \"../libtest\" }
      `(("bison" ,bison) ; For the tests
        ("cmake" ,cmake-minimal)
        ("flex" ,flex) ; For the tests
-       ("gdb" ,gdb)   ; For the tests
+       ;; FIXME: Rust 1.27 and some later versions require GDB 8.2 specifically.
+       ;; See <https://bugs.gnu.org/37810>.  Use it on all Rusts for simplicity.
+       ("gdb" ,gdb-8.2) ; For the tests
        ("procps" ,procps) ; For the tests
        ("python-2" ,python-2)
        ("rustc-bootstrap" ,mrustc)
@@ -449,7 +452,7 @@ test = { path = \"../libtest\" }
             (variable "LIBRARY_PATH")
             (files '("lib" "lib64")))))
 
-    (synopsis "Compiler for the Rust progamming language")
+    (synopsis "Compiler for the Rust programming language")
     (description "Rust is a systems programming language that provides memory
 safety and thread safety guarantees.")
     (home-page "https://www.rust-lang.org")
@@ -614,7 +617,8 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                      (lambda (file) (delete-manifest-file out file))
                      '("install.log"
                        "manifest-rust-docs"
-                       "manifest-rust-std-x86_64-unknown-linux-gnu"
+                       ,(string-append "manifest-rust-std-"
+                                       (nix-system->gnu-triplet-for-rust))
                        "manifest-rustc"))
                    (for-each
                      (lambda (file) (delete-manifest-file cargo-out file))
@@ -756,6 +760,9 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
           (patches (search-patches
                      "rust-coresimd-doctest.patch"
                      "rust-1.25-accept-more-detailed-gdb-lines.patch"))))
+      (inputs
+       (alist-replace "openssl" (list openssl)
+                      (package-inputs base-rust)))
       (arguments
        (substitute-keyword-arguments (package-arguments base-rust)
          ((#:phases phases)
@@ -798,7 +805,6 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                    (("fn finds_author_git") "#[ignore]\nfn finds_author_git")
                    (("fn finds_local_author_git") "#[ignore]\nfn finds_local_author_git"))
                  #t))
-             ;; TODO(rebuild-rust): Remove this phase in rust-1.28 when rebuilding.
              (add-after 'patch-cargo-tests 'disable-cargo-test-for-nightly-channel
                (lambda* _
                  ;; This test failed to work on "nightly" channel builds
@@ -827,11 +833,6 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                                    "rust-bootstrap-stage0-test.patch"
                                    "rust-1.25-accept-more-detailed-gdb-lines.patch"
                                    "rust-reproducible-builds.patch"))))
-      (native-inputs
-       ;; FIXME: Rust 1.27 and some later versions require GDB 8.2 specifically.
-       ;; See <https://bugs.gnu.org/37810>.
-       (alist-replace "gdb" (list gdb-8.2)
-                      (package-native-inputs base-rust)))
       (arguments
        (substitute-keyword-arguments (package-arguments base-rust)
          ((#:phases phases)
@@ -883,6 +884,8 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                  (substitute* "src/test/run-pass/issue-44056.rs"
                    (("only-x86_64") "ignore-test"))
                  #t))
+             ;; This is no longer needed as of 1.28
+             (delete 'disable-cargo-test-for-nightly-channel)
              ;; The thinlto test should pass with llvm 6.
              (delete 'disable-thinlto-test))))))))
 
@@ -1145,14 +1148,13 @@ move around."
                    (setenv "CARGO_HOME" cargo-home)
                    #t))))))))))
 
-;; TODO(rebuild-rust): Switch to LLVM 9 in 1.38 instead of 1.40.
 (define-public rust-1.38
   (let ((base-rust
          (rust-bootstrapped-package rust-1.37 "1.38.0"
            "101dlpsfkq67p0hbwx4acqq6n90dj4bbprndizpgh1kigk566hk4")))
     (package
       (inherit base-rust)
-      #;(inputs
+      (inputs
         (alist-replace "llvm" (list llvm-9)
                        (package-inputs base-rust)))
       (arguments
@@ -1195,9 +1197,6 @@ move around."
            "1ba9llwhqm49w7sz3z0gqscj039m53ky9wxzhaj11z6yg1ah15yx")))
     (package
       (inherit base-rust)
-      (inputs
-        (alist-replace "llvm" (list llvm-9)
-                       (package-inputs base-rust)))
       (source
         (origin
           (inherit (package-source base-rust))
@@ -1252,8 +1251,6 @@ move around."
                  ,(patch-command-exec-tests-phase
                     '(match (find-files "src/test" "command-exec\\.rs")
                        ((file) file))))
-               ;; TODO(rebuild-rust): The test in question got fixed long ago.
-               (delete 'disable-cargo-test-for-nightly-channel)
                ;; The test got removed in commit 000fe63b6fc57b09828930cacbab20c2ee6e6d15
                ;; "Remove painful test that is not pulling its weight"
                (delete 'remove-unsupported-tests)))))))))
@@ -1322,4 +1319,4 @@ move around."
     "0a17jby2pd050s24cy4dfc0gzvgcl585v3vvyfilniyvjrqknsid"))
 
 ;; TODO(staging): Bump this variable to the latest packaged rust.
-(define-public rust rust-1.39)
+(define-public rust rust-1.45)