gnu: sbcl-cl-cffi-gtk: Update to 20200417.
[jackhill/guix/guix.git] / gnu / packages / build-tools.scm
CommitLineData
33f79a74 1;;; GNU Guix --- Functional package management for GNU
a3baaaa0 2;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
162dd290 3;;; Copyright © 2017 Corentin Bocquillon <corentin@nybble.fr>
da567fc8 4;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
71dab08d 5;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
9a588402 6;;; Copyright © 2018 Tomáš Čech <sleep_walker@gnu.org>
b7851222 7;;; Copyright © 2018, 2020 Marius Bakke <mbakke@fastmail.com>
53367e17 8;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
4b3ff362 9;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
41e09a15 10;;; Copyright © 2019 Jonathan Brielmaier <jonathan.brielmaier@web.de>
fcafee61 11;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at>
33f79a74
RW
12;;;
13;;; This file is part of GNU Guix.
14;;;
15;;; GNU Guix is free software; you can redistribute it and/or modify it
16;;; under the terms of the GNU General Public License as published by
17;;; the Free Software Foundation; either version 3 of the License, or (at
18;;; your option) any later version.
19;;;
20;;; GNU Guix is distributed in the hope that it will be useful, but
21;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23;;; GNU General Public License for more details.
24;;;
25;;; You should have received a copy of the GNU General Public License
26;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28(define-module (gnu packages build-tools)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix utils)
31 #:use-module (guix packages)
32 #:use-module (guix download)
f85af5ab 33 #:use-module (guix git-download)
71dab08d 34 #:use-module (guix build-system cmake)
33f79a74 35 #:use-module (gnu packages)
c97cef0a 36 #:use-module (gnu packages compression)
53367e17 37 #:use-module (gnu packages lua)
41e09a15 38 #:use-module (gnu packages package-management)
33f79a74 39 #:use-module (gnu packages python)
9a588402
40 #:use-module (gnu packages python-crypto)
41 #:use-module (gnu packages python-web)
162dd290
CB
42 #:use-module (gnu packages ninja)
43 #:use-module (guix build-system gnu)
44 #:use-module (guix build-system python))
33f79a74
RW
45
46(define-public bam
47 (package
48 (name "bam")
53367e17 49 (version "0.5.1")
33f79a74 50 (source (origin
53367e17
AV
51 ;; do not use auto-generated tarballs
52 (method git-fetch)
53 (uri (git-reference
54 (url "https://github.com/matricks/bam.git")
55 (commit (string-append "v" version))))
56 (file-name (git-file-name name version))
33f79a74
RW
57 (sha256
58 (base32
53367e17 59 "13br735ig7lygvzyfd15fc2rdygrqm503j6xj5xkrl1r7w2wipq6"))))
33f79a74
RW
60 (build-system gnu-build-system)
61 (arguments
53367e17
AV
62 `(#:make-flags `("CC=gcc"
63 ,(string-append "INSTALL_PREFIX="
64 (assoc-ref %outputs "out")))
65 #:test-target "test"
66 #:phases
33f79a74 67 (modify-phases %standard-phases
53367e17 68 (delete 'configure))))
33f79a74
RW
69 (native-inputs
70 `(("python" ,python-2)))
53367e17
AV
71 (inputs
72 `(("lua" ,lua)))
33f79a74
RW
73 (home-page "https://matricks.github.io/bam/")
74 (synopsis "Fast and flexible build system")
75 (description "Bam is a fast and flexible build system. Bam uses Lua to
76describe the build process. It takes its inspiration for the script files
77from scons. While scons focuses on being 100% correct when building, bam
78makes a few sacrifices to acquire fast full and incremental build times.")
79 (license license:bsd-3)))
162dd290 80
71dab08d
FT
81(define-public bear
82 (package
83 (name "bear")
da567fc8 84 (version "2.4.3")
71dab08d 85 (source (origin
f85af5ab
TGR
86 (method git-fetch)
87 (uri (git-reference
88 (url "https://github.com/rizsotto/Bear")
89 (commit version)))
90 (file-name (git-file-name name version))
71dab08d
FT
91 (sha256
92 (base32
da567fc8 93 "19fk4flfykbzhb89ppmzqf0zlrkbjm6ajl9fsayndj9km5ys0041"))))
71dab08d 94 (build-system cmake-build-system)
73d85423
FT
95 (inputs
96 `(("python" ,python-wrapper)))
71dab08d
FT
97 (home-page "https://github.com/rizsotto/Bear")
98 (synopsis "Tool for generating a compilation database")
99 (description "A JSON compilation database is used in the Clang project to
100provide information on how a given compilation unit is processed. With this,
101it is easy to re-run the compilation with alternate programs. Bear is used to
102generate such a compilation database.")
103 (license license:gpl3+)))
104
3ad0a358 105(define-public gn
b7851222
MB
106 (let ((commit "ec938ddaa276646eb8f1ab33e160c156011d8217")
107 (revision "1736")) ;as returned by `git describe`, used below
3ad0a358
MB
108 (package
109 (name "gn")
110 (version (git-version "0.0" revision commit))
111 (home-page "https://gn.googlesource.com/gn")
112 (source (origin
113 (method git-fetch)
114 (uri (git-reference (url home-page) (commit commit)))
115 (sha256
116 (base32
b7851222 117 "0j1qjwp2biw12s6npzpx4z8nvih7pyn68q6cz2k4700bk9y0d574"))
3ad0a358
MB
118 (file-name (git-file-name name version))))
119 (build-system gnu-build-system)
120 (arguments
97b672d9 121 `(#:phases (modify-phases %standard-phases
3ad0a358
MB
122 (add-before 'configure 'set-build-environment
123 (lambda _
124 (setenv "CC" "gcc") (setenv "CXX" "g++")
125 (setenv "AR" "ar")
126 #t))
127 (replace 'configure
128 (lambda _
ebee2f47 129 (invoke "python" "build/gen.py"
3ad0a358
MB
130 "--no-last-commit-position")))
131 (add-after 'configure 'create-last-commit-position
132 (lambda _
133 ;; Create "last_commit_position.h" to avoid a dependency
134 ;; on 'git' (and the checkout..).
135 (call-with-output-file "out/last_commit_position.h"
136 (lambda (port)
137 (format port
b7851222
MB
138 (string-append
139 "#define LAST_COMMIT_POSITION_NUM ~a\n"
140 "#define LAST_COMMIT_POSITION \"~a (~a)\"\n")
141 ,revision ,revision ,(string-take commit 8))
3ad0a358
MB
142 #t))))
143 (replace 'build
144 (lambda _
145 (invoke "ninja" "-C" "out" "gn"
146 "-j" (number->string (parallel-job-count)))))
97b672d9
MB
147 (replace 'check
148 (lambda* (#:key (tests? #t) #:allow-other-keys)
149 (if tests?
150 (lambda ()
151 (invoke "ninja" "-C" "out" "gn_unittests"
152 "-j" (number->string (parallel-job-count)))
153 (invoke "./out/gn_unittests"))
154 (format #t "test suite not run~%"))))
3ad0a358
MB
155 (replace 'install
156 (lambda* (#:key outputs #:allow-other-keys)
157 (let ((out (assoc-ref outputs "out")))
158 (install-file "out/gn" (string-append out "/bin"))
159 #t))))))
160 (native-inputs
161 `(("ninja" ,ninja)
162 ("python" ,python-2)))
163 (synopsis "Generate Ninja build files")
164 (description
165 "GN is a tool that collects information about a project from @file{.gn}
166files and generates build instructions for the Ninja build system.")
167 ;; GN is distributed as BSD-3, but bundles some files from ICU using the
168 ;; X11 license.
169 (license (list license:bsd-3 license:x11)))))
170
162dd290
CB
171(define-public meson
172 (package
173 (name "meson")
fd3594bf 174 (version "0.50.1")
162dd290
CB
175 (source (origin
176 (method url-fetch)
177 (uri (string-append "https://github.com/mesonbuild/meson/"
a47ed096
RW
178 "releases/download/" version "/meson-"
179 version ".tar.gz"))
162dd290
CB
180 (sha256
181 (base32
fd3594bf 182 "1k2fw5qk4mqjcb4j5dhp8xfn0caqphb11yh8zkw7v9w01kb5d3zn"))))
162dd290 183 (build-system python-build-system)
b14a04b2 184 (arguments
3f6c185e
MB
185 `(;; FIXME: Tests require many additional inputs, a fix for the RUNPATH
186 ;; patch in meson-for-build, and patching many hard-coded file system
187 ;; locations in "run_unittests.py".
188 #:tests? #f
189 #:phases (modify-phases %standard-phases
b14a04b2
MB
190 ;; Meson calls the various executables in out/bin through the
191 ;; Python interpreter, so we cannot use the shell wrapper.
192 (delete 'wrap))))
c695fb76 193 (inputs `(("ninja" ,ninja)))
67f8ba11 194 (propagated-inputs `(("python" ,python)))
162dd290
CB
195 (home-page "https://mesonbuild.com/")
196 (synopsis "Build system designed to be fast and user-friendly")
197 (description
198 "The Meson build system is focused on user-friendliness and speed.
199It can compile code written in C, C++, Fortran, Java, Rust, and other
200languages. Meson provides features comparable to those of the
201Autoconf/Automake/make combo. Build specifications, also known as @dfn{Meson
6c4da3b7
TGR
202files}, are written in a custom domain-specific language (@dfn{DSL}) that
203resembles Python.")
162dd290 204 (license license:asl2.0)))
c97cef0a 205
dab666cd
PM
206(define-public meson-for-build
207 (package
208 (inherit meson)
209 (name "meson-for-build")
dab666cd 210 (source (origin
d3155863 211 (inherit (package-source meson))
dab666cd
PM
212 (patches (search-patches "meson-for-build-rpath.patch"))))
213
214 ;; People should probably install "meson", not "meson-for-build".
215 (properties `((hidden? . #t)))))
216
c97cef0a
OP
217(define-public premake4
218 (package
219 (name "premake")
220 (version "4.3")
221 (source (origin
222 (method url-fetch)
223 (uri (string-append "mirror://sourceforge/premake/Premake/"
224 version "/premake-" version "-src.zip"))
225 (sha256
226 (base32
227 "1017rd0wsjfyq2jvpjjhpszaa7kmig6q1nimw76qx3cjz2868lrn"))))
228 (build-system gnu-build-system)
229 (native-inputs
230 `(("unzip" ,unzip))) ; for unpacking the source
231 (arguments
232 `(#:make-flags '("CC=gcc")
233 #:tests? #f ; No test suite
234 #:phases
235 (modify-phases %standard-phases
236 (delete 'configure)
237 (add-after 'unpack 'enter-source
238 (lambda _ (chdir "build/gmake.unix") #t))
239 (replace 'install
240 (lambda* (#:key outputs #:allow-other-keys)
241 (install-file "../../bin/release/premake4"
242 (string-append (assoc-ref outputs "out") "/bin"))
243 #t)))))
244 (synopsis "Portable software build tool")
245 (description "@code{premake4} is a command line utility that reads a
246scripted definition of a software project and outputs @file{Makefile}s or
247other lower-level build files.")
248 (home-page "https://premake.github.io")
249 (license license:bsd-3)))
9a588402 250
fcafee61
LP
251(define-public premake5
252 (package
253 (inherit premake4)
254 (version "5.0.0-alpha14")
255 (source (origin
256 (method url-fetch)
257 (uri (string-append "https://github.com/premake/premake-core/"
258 "releases/download/v" version
259 "/premake-" version "-src.zip"))
260 (sha256
261 (base32
262 "0236s7bjvxf7x1l5faywmfzjywflpx42ngyhkn0mqqjnh54a97vw"))))
263 (arguments
264 (substitute-keyword-arguments (package-arguments premake4)
265 ((#:phases phases)
266 `(modify-phases ,phases
267 (replace 'install
268 (lambda* (#:key outputs #:allow-other-keys)
269 (install-file "../../bin/release/premake5"
270 (string-append (assoc-ref outputs "out") "/bin"))
271 #t))))))
272 (description "@code{premake5} is a command line utility that reads a
273scripted definition of a software project and outputs @file{Makefile}s or
274other lower-level build files.")))
275
9a588402
276(define-public osc
277 (package
278 (name "osc")
844cb1b6 279 (version "0.165.2")
9a588402
280 (source
281 (origin
41e09a15
JB
282 (method git-fetch)
283 (uri (git-reference
284 (url "https://github.com/openSUSE/osc")
285 (commit version)))
286 (file-name (git-file-name name version))
9a588402 287 (sha256
844cb1b6 288 (base32 "0yjwvbvv9fgkpiyvrag89zxchyn3nbgp9jz0wn5p0z9450zwfyz6"))))
9a588402
289 (build-system python-build-system)
290 (arguments
41e09a15 291 `(#:phases
9a588402 292 (modify-phases %standard-phases
41e09a15 293 (add-after 'install 'fix-filename
9a588402
294 (lambda* (#:key outputs #:allow-other-keys)
295 (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
296 ;; Main osc tool is renamed in spec file, not setup.py, let's
297 ;; do that too.
298 (rename-file
299 (string-append bin "osc-wrapper.py")
300 (string-append bin "osc"))
41e09a15 301 #t))))))
9a588402 302 (inputs
41e09a15
JB
303 `(("python-m2crypto" ,python-m2crypto)
304 ("python-pycurl" ,python-pycurl)
52bbf5f7 305 ("rpm" ,rpm))) ; for python-rpm
9a588402
306 (home-page "https://github.com/openSUSE/osc")
307 (synopsis "Open Build Service command line tool")
308 (description "@command{osc} is a command line interface to the Open Build
309Service. It allows you to checkout, commit, perform reviews etc. The vast
310majority of the OBS functionality is available via commands and the rest can
311be reached via direct API calls.")
312 (license license:gpl2+)))