gnu: python-unidecode: Fix typo in description.
[jackhill/guix/guix.git] / gnu / packages / ninja.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
3 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
5 ;;;
6 ;;; This file is part of GNU Guix.
7 ;;;
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
12 ;;;
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
17 ;;;
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21 (define-module (gnu packages ninja)
22 #:use-module ((guix licenses) #:select (asl2.0))
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix build-system gnu)
26 #:use-module (gnu packages)
27 #:use-module (gnu packages python))
28
29 (define-public ninja
30 (package
31 (name "ninja")
32 (version "1.7.2")
33 (source (origin
34 (method url-fetch)
35 (uri (string-append "https://github.com/martine/ninja/"
36 "archive/v" version ".tar.gz"))
37 (file-name (string-append name "-" version ".tar.gz"))
38 (sha256
39 (base32
40 "1n8n3g26ppwh7zwrc37n3alkbpbj0wki34ih53s3rkhs8ajs1p9f"))
41 (patches (search-patches "ninja-zero-mtime.patch"))))
42 (build-system gnu-build-system)
43 (native-inputs `(("python" ,python-2)))
44 (arguments
45 '(#:phases
46 (modify-phases %standard-phases
47 (replace
48 'configure
49 (lambda _
50 (substitute* "src/subprocess-posix.cc"
51 (("/bin/sh") (which "sh")))
52 #t))
53 (replace
54 'build
55 (lambda _
56 (zero? (system* "./configure.py" "--bootstrap"))))
57 (replace
58 'check
59 (lambda _
60 (and (zero? (system* "./configure.py"))
61 (zero? (system* "./ninja" "ninja_test"))
62 (zero? (system* "./ninja_test")))))
63 (replace
64 'install
65 (lambda* (#:key outputs #:allow-other-keys)
66 (let* ((out (assoc-ref outputs "out"))
67 (bin (string-append out "/bin"))
68 (doc (string-append out "/share/doc/ninja")))
69 (install-file "ninja" bin)
70 (install-file "doc/manual.asciidoc" doc)
71 #t))))))
72 (home-page "https://ninja-build.org/")
73 (synopsis "Small build system")
74 (description
75 "Ninja is a small build system with a focus on speed. It differs from
76 other build systems in two major respects: it is designed to have its input
77 files generated by a higher-level build system, and it is designed to run
78 builds as fast as possible.")
79 (license asl2.0)))