gnu: xorg-server: Update to 21.1.2 [security fixes].
[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")
bd6cb1d4 34 (version "1.10.2")
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
bd6cb1d4 43 "0mspq4mvx41qri2v2zlg2y3znx5gfw6d8s3czbcfpr2218qbpz55"))))
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 53 (substitute* "src/subprocess_test.cc"
bd6cb1d4 54 (("/bin/echo") (which "echo")))))
5bb12e14
TGR
55 (replace 'build
56 (lambda _
57 (invoke "./configure.py" "--bootstrap")))
58 (replace 'check
59 (lambda _
60 (invoke "./configure.py")
61 (invoke "./ninja" "ninja_test")
62 (invoke "./ninja_test")))
63 (replace 'install
64 (lambda* (#:key outputs #:allow-other-keys)
65 (let* ((out (assoc-ref outputs "out"))
66 (bin (string-append out "/bin"))
67 (doc (string-append out "/share/doc/ninja")))
68 (install-file "ninja" bin)
bd6cb1d4 69 (install-file "doc/manual.asciidoc" doc)))))))
dbd6bc5c 70 (home-page "https://ninja-build.org/")
cd287ba1
SB
71 (synopsis "Small build system")
72 (description
73 "Ninja is a small build system with a focus on speed. It differs from
74other build systems in two major respects: it is designed to have its input
75files generated by a higher-level build system, and it is designed to run
76builds as fast as possible.")
77 (license asl2.0)))