gnu: attr: Use 'modify-phases'.
* gnu/packages/attr.scm (attr)[arguments]: Use 'modify-phases'.
This commit is contained in:
parent
209e09fa10
commit
20c620d0a4
|
@ -1,6 +1,6 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
|
||||
;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2012, 2013, 2016 Ludovic Courtès <ludo@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -29,8 +29,7 @@
|
|||
(package
|
||||
(name "attr")
|
||||
(version "2.4.46")
|
||||
(source
|
||||
(origin
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "mirror://savannah/attr/attr-"
|
||||
version ".src.tar.gz"))
|
||||
|
@ -40,34 +39,30 @@
|
|||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:phases
|
||||
(alist-cons-after
|
||||
'configure 'patch-makefile-SHELL
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'configure 'patch-makefile-SHELL
|
||||
(lambda _
|
||||
(patch-makefile-SHELL "include/buildmacros"))
|
||||
(alist-replace
|
||||
'install
|
||||
(patch-makefile-SHELL "include/buildmacros")))
|
||||
(replace 'install
|
||||
(lambda _
|
||||
(zero? (system* "make"
|
||||
"install"
|
||||
"install-lib"
|
||||
"install-dev")))
|
||||
|
||||
;; When building natively, adjust the test cases.
|
||||
,(if (%current-target-system)
|
||||
'%standard-phases
|
||||
'(alist-replace 'check
|
||||
(lambda _
|
||||
"install-dev"))))
|
||||
(replace 'check
|
||||
(lambda* (#:key target #:allow-other-keys)
|
||||
;; Use the right shell.
|
||||
(substitute* "test/run"
|
||||
(("/bin/sh")
|
||||
(which "bash")))
|
||||
|
||||
(system* "make" "tests" "-C" "test")
|
||||
;; When building natively, run the tests.
|
||||
(unless target
|
||||
(system* "make" "tests" "-C" "test"))
|
||||
|
||||
;; XXX: Ignore the test result since this is
|
||||
;; dependent on the underlying file system.
|
||||
#t)
|
||||
%standard-phases))))))
|
||||
#t)))))
|
||||
(inputs
|
||||
;; Perl is needed to run tests; remove it from cross builds.
|
||||
(if (%current-target-system)
|
||||
|
|
Loading…
Reference in New Issue