guix-commits
[Top][All Lists]
Advanced

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

01/02: gnu: attr: Use 'modify-phases'.


From: Ludovic Courtès
Subject: 01/02: gnu: attr: Use 'modify-phases'.
Date: Fri, 08 Jan 2016 15:53:35 +0000

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

commit 20c620d0a4cd4146262df3195856f2d9ce40de23
Author: Ludovic Courtès <address@hidden>
Date:   Fri Jan 8 10:58:05 2016 +0100

    gnu: attr: Use 'modify-phases'.
    
    * gnu/packages/attr.scm (attr)[arguments]: Use 'modify-phases'.
---
 gnu/packages/attr.scm |   65 ++++++++++++++++++++++--------------------------
 1 files changed, 30 insertions(+), 35 deletions(-)

diff --git a/gnu/packages/attr.scm b/gnu/packages/attr.scm
index f4f6c46..2b55ccd 100644
--- a/gnu/packages/attr.scm
+++ b/gnu/packages/attr.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012 Nikita Karetnikov <address@hidden>
-;;; Copyright © 2012, 2013 Ludovic Courtès <address@hidden>
+;;; Copyright © 2012, 2013, 2016 Ludovic Courtès <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -29,45 +29,40 @@
   (package
     (name "attr")
     (version "2.4.46")
-    (source
-     (origin
-      (method url-fetch)
-      (uri (string-append "mirror://savannah/attr/attr-"
-                          version ".src.tar.gz"))
-      (sha256
-       (base32
-        "07qf6kb2zk512az481bbnsk9jycn477xpva1a726n5pzlzf9pmnw"))))
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://savannah/attr/attr-"
+                                  version ".src.tar.gz"))
+              (sha256
+               (base32
+                "07qf6kb2zk512az481bbnsk9jycn477xpva1a726n5pzlzf9pmnw"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
-       (alist-cons-after
-        'configure 'patch-makefile-SHELL
-        (lambda _
-          (patch-makefile-SHELL "include/buildmacros"))
-        (alist-replace
-         'install
-         (lambda _
-           (zero? (system* "make"
-                           "install"
-                           "install-lib"
-                           "install-dev")))
+       (modify-phases %standard-phases
+         (add-after 'configure 'patch-makefile-SHELL
+           (lambda _
+             (patch-makefile-SHELL "include/buildmacros")))
+         (replace 'install
+           (lambda _
+             (zero? (system* "make"
+                             "install"
+                             "install-lib"
+                             "install-dev"))))
+         (replace 'check
+           (lambda* (#:key target #:allow-other-keys)
+             ;; Use the right shell.
+             (substitute* "test/run"
+               (("/bin/sh")
+                (which "bash")))
 
-         ;; When building natively, adjust the test cases.
-         ,(if (%current-target-system)
-              '%standard-phases
-              '(alist-replace 'check
-                              (lambda _
-                                ;; Use the right shell.
-                                (substitute* "test/run"
-                                  (("/bin/sh")
-                                   (which "bash")))
+             ;; When building natively, run the tests.
+             (unless target
+               (system* "make" "tests" "-C" "test"))
 
-                                (system* "make" "tests" "-C" "test")
-
-                                ;; XXX: Ignore the test result since this is
-                                ;; dependent on the underlying file system.
-                                #t)
-                              %standard-phases))))))
+             ;; XXX: Ignore the test result since this is
+             ;; dependent on the underlying file system.
+             #t)))))
     (inputs
      ;; Perl is needed to run tests; remove it from cross builds.
      (if (%current-target-system)



reply via email to

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