summaryrefslogtreecommitdiff
path: root/gnu/packages/ninja.scm
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2015-07-17 21:25:58 -0400
committerMark H Weaver <mhw@netris.org>2015-07-17 21:25:58 -0400
commitb40c3d09b590b463a35185bde99778bb3492ee50 (patch)
treeede63594f0af69f8789a1980a7504be61f12d71a /gnu/packages/ninja.scm
parentf90ef3c355a009e0d41ce02a9138b841165dcb49 (diff)
downloadgnu-guix-b40c3d09b590b463a35185bde99778bb3492ee50.tar
gnu-guix-b40c3d09b590b463a35185bde99778bb3492ee50.tar.gz
gnu: ninja: Use modify-phases.
* gnu/packages/ninja.scm (ninja)[arguments]: Use modify-phases. Return a boolean result from all phase procedures.
Diffstat (limited to 'gnu/packages/ninja.scm')
-rw-r--r--gnu/packages/ninja.scm49
1 files changed, 26 insertions, 23 deletions
diff --git a/gnu/packages/ninja.scm b/gnu/packages/ninja.scm
index 2483cc51fe..82f3e44013 100644
--- a/gnu/packages/ninja.scm
+++ b/gnu/packages/ninja.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
+;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -40,33 +41,35 @@
(build-system gnu-build-system)
(arguments
'(#:phases
- (alist-replace
- 'configure
- (lambda _
- (substitute* "src/subprocess-posix.cc"
- (("/bin/sh") (which "sh"))))
- (alist-replace
- 'build
- (lambda _
- (zero? (system* "./configure.py" "--bootstrap")))
- (alist-replace
+ (modify-phases %standard-phases
+ (replace
+ 'configure
+ (lambda _
+ (substitute* "src/subprocess-posix.cc"
+ (("/bin/sh") (which "sh")))
+ #t))
+ (replace
+ 'build
+ (lambda _
+ (zero? (system* "./configure.py" "--bootstrap"))))
+ (replace
'check
(lambda _
(and (zero? (system* "./configure.py"))
(zero? (system* "./ninja" "ninja_test"))
- (zero? (system* "./ninja_test"))))
- (alist-replace
- 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (bin (string-append out "/bin"))
- (doc (string-append out "/share/doc/ninja")))
- (mkdir-p bin)
- (copy-file "ninja" (string-append bin "/ninja"))
- (mkdir-p doc)
- (copy-file "doc/manual.asciidoc"
- (string-append doc "/manual.asciidoc"))))
- %standard-phases))))))
+ (zero? (system* "./ninja_test")))))
+ (replace
+ 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (doc (string-append out "/share/doc/ninja")))
+ (mkdir-p bin)
+ (copy-file "ninja" (string-append bin "/ninja"))
+ (mkdir-p doc)
+ (copy-file "doc/manual.asciidoc"
+ (string-append doc "/manual.asciidoc"))
+ #t))))))
(native-inputs `(("python" ,python-2)))
(home-page "http://martine.github.io/ninja/")
(synopsis "Small build system")