guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: fixup merge commit


From: guix-commits
Subject: 02/02: fixup merge commit
Date: Wed, 24 Mar 2021 14:59:26 -0400 (EDT)

efraim pushed a commit to branch core-updates
in repository guix.

commit bbc2627ccbd64cb43e48384d7b9d7dbb48a600d9
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Wed Mar 24 19:15:27 2021 +0200

    fixup merge commit
---
 gnu/packages/rust.scm | 50 ++++++++++++++++----------------------------------
 1 file changed, 16 insertions(+), 34 deletions(-)

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index efa0c6e..d7bf149 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -267,40 +267,22 @@
          (replace 'install
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
-                    (target-system ,(or (%current-target-system)
-                                        (nix-system->gnu-triplet
-                                         (%current-system))))
-                    (out-libs (string-append out "/lib/rustlib/"
-                                             target-system "/lib")))
-                                        ;(setenv "CFG_PREFIX" out)
-               (mkdir-p out-libs)
-               (copy-recursively "output/target-libs" out-libs)
-               (install-file "output/rustc-build/rustc"
-                             (string-append out "/bin"))
-               (install-file "output/rustc-build/rustdoc"
-                             (string-append out "/bin"))
-               (install-file "output/cargo-build/cargo"
-                             (string-append (assoc-ref outputs "cargo")
-                                            "/bin")))
-             #t)))))
-
-    ;; rustc invokes gcc, so we need to set its search paths accordingly.
-    ;; Note: duplicate its value here to cope with circular dependencies among
-    ;; modules (see <https://bugs.gnu.org/31392>).
-    (native-search-paths
-     (list (search-path-specification
-            (variable "C_INCLUDE_PATH")
-            (files '("include")))
-           (search-path-specification
-            (variable "CPLUS_INCLUDE_PATH")
-            (files '("include/c++" "include")))
-           (search-path-specification
-            (variable "LIBRARY_PATH")
-            (files '("lib" "lib64")))))
-
-    (supported-systems
-     (delete "i686-linux"               ; fails to build, see #35519
-             %supported-systems))
+                    (cargo (assoc-ref outputs "cargo"))
+                    (bin (string-append out "/bin"))
+                    (rustc (string-append bin "/rustc"))
+                    (cargo-bin (string-append cargo "/bin"))
+                    (lib (string-append out "/lib"))
+                    (gnu-triplet ,(or (%current-target-system)
+                                      (nix-system->gnu-triplet-for-rust)))
+                    (system-lib-prefix (string-append lib "/rustlib/"
+                                                      gnu-triplet "/lib")))
+               (mkdir-p (dirname rustc))
+               (copy-file "run_rustc/output/prefix/bin/rustc_binary" rustc)
+               (wrap-program rustc
+                 `("LD_LIBRARY_PATH" = (,system-lib-prefix)))
+               (mkdir-p lib)
+               (copy-recursively "run_rustc/output/prefix/lib" lib)
+               (install-file "run_rustc/output/prefix/bin/cargo" 
cargo-bin)))))))
     (synopsis "Compiler for the Rust programming language")
     (description "Rust is a systems programming language that provides memory
 safety and thread safety guarantees.")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]