From b40c3d09b590b463a35185bde99778bb3492ee50 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Fri, 17 Jul 2015 21:25:58 -0400 Subject: gnu: ninja: Use modify-phases. * gnu/packages/ninja.scm (ninja)[arguments]: Use modify-phases. Return a boolean result from all phase procedures. --- gnu/packages/ninja.scm | 49 ++++++++++++++++++++++++++----------------------- 1 file 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 +;;; Copyright © 2015 Mark H Weaver ;;; ;;; 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") -- cgit v1.2.3