gnu: ninja: Use modify-phases.
* gnu/packages/ninja.scm (ninja)[arguments]: Use modify-phases. Return a boolean result from all phase procedures.
This commit is contained in:
parent
f90ef3c355
commit
b40c3d09b5
@ -1,5 +1,6 @@
|
|||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
|
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
|
||||||
|
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
@ -40,33 +41,35 @@
|
|||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
'(#:phases
|
'(#:phases
|
||||||
(alist-replace
|
(modify-phases %standard-phases
|
||||||
'configure
|
(replace
|
||||||
(lambda _
|
'configure
|
||||||
(substitute* "src/subprocess-posix.cc"
|
(lambda _
|
||||||
(("/bin/sh") (which "sh"))))
|
(substitute* "src/subprocess-posix.cc"
|
||||||
(alist-replace
|
(("/bin/sh") (which "sh")))
|
||||||
'build
|
#t))
|
||||||
(lambda _
|
(replace
|
||||||
(zero? (system* "./configure.py" "--bootstrap")))
|
'build
|
||||||
(alist-replace
|
(lambda _
|
||||||
|
(zero? (system* "./configure.py" "--bootstrap"))))
|
||||||
|
(replace
|
||||||
'check
|
'check
|
||||||
(lambda _
|
(lambda _
|
||||||
(and (zero? (system* "./configure.py"))
|
(and (zero? (system* "./configure.py"))
|
||||||
(zero? (system* "./ninja" "ninja_test"))
|
(zero? (system* "./ninja" "ninja_test"))
|
||||||
(zero? (system* "./ninja_test"))))
|
(zero? (system* "./ninja_test")))))
|
||||||
(alist-replace
|
(replace
|
||||||
'install
|
'install
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
(bin (string-append out "/bin"))
|
(bin (string-append out "/bin"))
|
||||||
(doc (string-append out "/share/doc/ninja")))
|
(doc (string-append out "/share/doc/ninja")))
|
||||||
(mkdir-p bin)
|
(mkdir-p bin)
|
||||||
(copy-file "ninja" (string-append bin "/ninja"))
|
(copy-file "ninja" (string-append bin "/ninja"))
|
||||||
(mkdir-p doc)
|
(mkdir-p doc)
|
||||||
(copy-file "doc/manual.asciidoc"
|
(copy-file "doc/manual.asciidoc"
|
||||||
(string-append doc "/manual.asciidoc"))))
|
(string-append doc "/manual.asciidoc"))
|
||||||
%standard-phases))))))
|
#t))))))
|
||||||
(native-inputs `(("python" ,python-2)))
|
(native-inputs `(("python" ,python-2)))
|
||||||
(home-page "http://martine.github.io/ninja/")
|
(home-page "http://martine.github.io/ninja/")
|
||||||
(synopsis "Small build system")
|
(synopsis "Small build system")
|
||||||
|
Loading…
Reference in New Issue
Block a user