guix-commits
[Top][All Lists]
Advanced

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

01/01: build/cargo-build-system: Use invoke.


From: guix-commits
Subject: 01/01: build/cargo-build-system: Use invoke.
Date: Mon, 2 Sep 2019 04:36:44 -0400 (EDT)

efraim pushed a commit to branch master
in repository guix.

commit 2f43e5db1c36ec93a80ed1e3cbe763a8d64adcb5
Author: Efraim Flashner <address@hidden>
Date:   Mon Sep 2 11:07:53 2019 +0300

    build/cargo-build-system: Use invoke.
    
    * guix/build/cargo-build-system.scm (crate-src?, build, check,
    install): Use 'invoke'.
---
 guix/build/cargo-build-system.scm | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/guix/build/cargo-build-system.scm 
b/guix/build/cargo-build-system.scm
index 06ed14b..f173b64 100644
--- a/guix/build/cargo-build-system.scm
+++ b/guix/build/cargo-build-system.scm
@@ -81,10 +81,10 @@ Cargo.toml file present at its root."
          ;; archive, but not nested anywhere else). We do this by cutting up
          ;; each output line and only looking at the second component. We then
          ;; check if it matches Cargo.toml exactly and short circuit if it 
does.
-         (zero? (apply system* (list "sh" "-c"
-                                     (string-append "tar -tf " path
-                                                    " | cut -d/ -f2"
-                                                    " | grep -q 
'^Cargo.toml$'"))))))
+         (apply invoke (list "sh" "-c"
+                             (string-append "tar -tf " path
+                                            " | cut -d/ -f2"
+                                            " | grep -q '^Cargo.toml$'")))))
 
 (define* (configure #:key inputs
                     (vendor-dir "guix-vendor")
@@ -157,7 +157,7 @@ directory = '" port)
                 #:allow-other-keys)
   "Build a given Cargo package."
   (or skip-build?
-      (zero? (apply system* `("cargo" "build" ,@cargo-build-flags)))))
+      (apply invoke `("cargo" "build" ,@cargo-build-flags))))
 
 (define* (check #:key
                 tests?
@@ -165,7 +165,7 @@ directory = '" port)
                 #:allow-other-keys)
   "Run tests for a given Cargo package."
   (if tests?
-      (zero? (apply system* `("cargo" "test" ,@cargo-test-flags)))
+      (apply invoke `("cargo" "test" ,@cargo-test-flags))
       #t))
 
 (define (touch file-name)
@@ -184,7 +184,7 @@ directory = '" port)
     ;; otherwise cargo will raise an error.
     (or skip-build?
         (not (has-executable-target?))
-        (zero? (system* "cargo" "install" "--path" "." "--root" out)))))
+        (invoke "cargo" "install" "--path" "." "--root" out))))
 
 (define %standard-phases
   (modify-phases gnu:%standard-phases



reply via email to

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