[Top][All Lists]

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

14/17: WIP: gnu: libnl: Use invoke.

From: Mark H. Weaver
Subject: 14/17: WIP: gnu: libnl: Use invoke.
Date: Mon, 23 Apr 2018 03:07:29 -0400 (EDT)

mhw pushed a commit to branch reproduce-bug-29774
in repository guix.

commit 73090ee7238befa2df5a21a8a929615798f9be55
Author: Mark H Weaver <address@hidden>
Date:   Fri Mar 16 02:10:47 2018 -0400

    WIP: gnu: libnl: Use invoke.
    TODO: Avoid using the shell.
    * gnu/packages/linux.scm (libnl)[arguments]: Use invoke and remove vestigial
    result code plumbing.
 gnu/packages/linux.scm | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index a79f9ce..6b4386f 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1437,10 +1437,7 @@ transparently through a bridge.")
        ("python-3" ,python-3)))
     (outputs '("out" "doc" "python2" "python3"))
-     `(#:modules ((guix build gnu-build-system)
-                  (guix build utils)
-                  (srfi srfi-1))
-       #:phases
+     `(#:phases
        (modify-phases %standard-phases
          (add-after 'install 'install-python
            (lambda* (#:key outputs #:allow-other-keys)
@@ -1448,22 +1445,23 @@ transparently through a bridge.")
                (let ((ldflags (format #f "LDFLAGS=-Wl,-rpath=~a/lib"
                                       (assoc-ref %outputs "out")))
                      (pyout (assoc-ref %outputs python)))
-                 (and
-                  (zero? (system (format #f "~a ~a build"
-                                         ldflags python pyout)))
-                  (zero?
-                   (system (format #f "~a ~a install --prefix=~a"
-                                   ldflags python pyout)))
-                  (zero? (system* python "" "clean")))))
+                 (invoke "sh" "-c"
+                         (format #f "~a ~a build"
+                                 ldflags python pyout))
+                 (invoke "sh" "-c"
+                         (format #f "~a ~a install --prefix=~a"
+                                 ldflags python pyout))
+                 (invoke python "" "clean")))
              (with-directory-excursion "./python"
-               (every python-inst '("python2" "python3")))))
+               (for-each python-inst '("python2" "python3")))
+             #t))
          (add-after 'install 'install-doc
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let ((dest (string-append (assoc-ref outputs "doc")
                (mkdir-p dest)
-               (zero? (system* "tar" "xf" (assoc-ref inputs "libnl3-doc")
-                               "--strip-components=1" "-C" dest))))))))
+               (invoke "tar" "xf" (assoc-ref inputs "libnl3-doc")
+                       "--strip-components=1" "-C" dest)))))))
     (home-page "";)
     (synopsis "NetLink protocol library suite")

reply via email to

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