gnu: emacs-consult: Fix grammar.
[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>
5bb12e14 5;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
181171ff 6;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
cd287ba1
SB
7;;;
8;;; This file is part of GNU Guix.
9;;;
10;;; GNU Guix is free software; you can redistribute it and/or modify it
11;;; under the terms of the GNU General Public License as published by
12;;; the Free Software Foundation; either version 3 of the License, or (at
13;;; your option) any later version.
14;;;
15;;; GNU Guix is distributed in the hope that it will be useful, but
16;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;;; GNU General Public License for more details.
19;;;
20;;; You should have received a copy of the GNU General Public License
21;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23(define-module (gnu packages ninja)
24 #:use-module ((guix licenses) #:select (asl2.0))
25 #:use-module (guix packages)
181171ff 26 #:use-module (guix git-download)
cd287ba1
SB
27 #:use-module (guix build-system gnu)
28 #:use-module (gnu packages)
29 #:use-module (gnu packages python))
30
31(define-public ninja
32 (package
33 (name "ninja")
89284257 34 (version "1.10.0")
cd287ba1 35 (source (origin
181171ff
MB
36 (method git-fetch)
37 (uri (git-reference
38 (url "https://github.com/ninja-build/ninja")
39 (commit (string-append "v" version))))
40 (file-name (git-file-name name version))
cd287ba1
SB
41 (sha256
42 (base32
89284257 43 "1fbzl7mrcrwp527sgkc1npfl3k6bbpydpiq98xcf1a1hkrx0z5x4"))))
cd287ba1 44 (build-system gnu-build-system)
2c886af9 45 (inputs `(("python" ,python-wrapper)))
cd287ba1
SB
46 (arguments
47 '(#:phases
b40c3d09 48 (modify-phases %standard-phases
5bb12e14
TGR
49 (replace 'configure
50 (lambda _
51 (substitute* "src/subprocess-posix.cc"
52 (("/bin/sh") (which "sh")))
6d796220
MB
53 (substitute* "src/subprocess_test.cc"
54 (("/bin/echo") (which "echo")))
5bb12e14
TGR
55 #t))
56 (replace 'build
57 (lambda _
58 (invoke "./configure.py" "--bootstrap")))
59 (replace 'check
60 (lambda _
61 (invoke "./configure.py")
62 (invoke "./ninja" "ninja_test")
63 (invoke "./ninja_test")))
64 (replace '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))))))
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)))