gnu: r-org-dm-eg-db: Update to 3.5.0.
[jackhill/guix/guix.git] / gnu / packages / ninja.scm
CommitLineData
cd287ba1
SB
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
b40c3d09 3;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
dbd6bc5c 4;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
cd287ba1
SB
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")
cbef2796 32 (version "1.7.2")
cd287ba1
SB
33 (source (origin
34 (method url-fetch)
35 (uri (string-append "https://github.com/martine/ninja/"
36 "archive/v" version ".tar.gz"))
f586c877 37 (file-name (string-append name "-" version ".tar.gz"))
cd287ba1
SB
38 (sha256
39 (base32
cbef2796
MB
40 "1n8n3g26ppwh7zwrc37n3alkbpbj0wki34ih53s3rkhs8ajs1p9f"))
41 (patches (search-patches "ninja-zero-mtime.patch"))))
cd287ba1 42 (build-system gnu-build-system)
2e839545 43 (native-inputs `(("python" ,python-2)))
cd287ba1
SB
44 (arguments
45 '(#:phases
b40c3d09
MW
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
cd287ba1
SB
58 'check
59 (lambda _
60 (and (zero? (system* "./configure.py"))
61 (zero? (system* "./ninja" "ninja_test"))
b40c3d09
MW
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")))
96c46210
LC
69 (install-file "ninja" bin)
70 (install-file "doc/manual.asciidoc" doc)
b40c3d09 71 #t))))))
dbd6bc5c 72 (home-page "https://ninja-build.org/")
cd287ba1
SB
73 (synopsis "Small build system")
74 (description
75 "Ninja is a small build system with a focus on speed. It differs from
76other build systems in two major respects: it is designed to have its input
77files generated by a higher-level build system, and it is designed to run
78builds as fast as possible.")
79 (license asl2.0)))