gnu: python-pandas: Fix build on 32-bit.
[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")
dbd6bc5c 32 (version "1.7.1")
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
dbd6bc5c 40 "06dy2dc1aafm61ynw9gzig88la3km9dsh53bxf4mnw7l7kjisn2i"))
fc1adab1
AK
41 (patches (search-patches "ninja-zero-mtime.patch"
42 "ninja-tests.patch"))))
cd287ba1 43 (build-system gnu-build-system)
2e839545 44 (native-inputs `(("python" ,python-2)))
cd287ba1
SB
45 (arguments
46 '(#:phases
b40c3d09
MW
47 (modify-phases %standard-phases
48 (replace
49 'configure
50 (lambda _
51 (substitute* "src/subprocess-posix.cc"
52 (("/bin/sh") (which "sh")))
53 #t))
54 (replace
55 'build
56 (lambda _
57 (zero? (system* "./configure.py" "--bootstrap"))))
58 (replace
cd287ba1
SB
59 'check
60 (lambda _
61 (and (zero? (system* "./configure.py"))
62 (zero? (system* "./ninja" "ninja_test"))
b40c3d09
MW
63 (zero? (system* "./ninja_test")))))
64 (replace
65 'install
66 (lambda* (#:key outputs #:allow-other-keys)
67 (let* ((out (assoc-ref outputs "out"))
68 (bin (string-append out "/bin"))
69 (doc (string-append out "/share/doc/ninja")))
96c46210
LC
70 (install-file "ninja" bin)
71 (install-file "doc/manual.asciidoc" doc)
b40c3d09 72 #t))))))
dbd6bc5c 73 (home-page "https://ninja-build.org/")
cd287ba1
SB
74 (synopsis "Small build system")
75 (description
76 "Ninja is a small build system with a focus on speed. It differs from
77other build systems in two major respects: it is designed to have its input
78files generated by a higher-level build system, and it is designed to run
79builds as fast as possible.")
80 (license asl2.0)))