gnu: dnsmasq: Update to 2.87.
[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>
de01d08b 4;;; Copyright © 2017–2021 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>
b6d96be8 9;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
41e09a15 10;;; Copyright © 2019 Jonathan Brielmaier <jonathan.brielmaier@web.de>
719bbcc1 11;;; Copyright © 2020 Liliana Marie Prikler <liliana.prikler@gmail.com>
6560c497 12;;; Copyright © 2020 Yuval Kogman <nothingmuch@woobling.org>
2c1d1b75 13;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
1f048676 14;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
ac11ef2f 15;;; Copyright © 2021 qblade <qblade@protonmail.com>
f4259f93 16;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
31f0e46b 17;;; Copyright © 2022 Juliana Sims <jtsims@protonmail.com>
33f79a74
RW
18;;;
19;;; This file is part of GNU Guix.
20;;;
21;;; GNU Guix is free software; you can redistribute it and/or modify it
22;;; under the terms of the GNU General Public License as published by
23;;; the Free Software Foundation; either version 3 of the License, or (at
24;;; your option) any later version.
25;;;
26;;; GNU Guix is distributed in the hope that it will be useful, but
27;;; WITHOUT ANY WARRANTY; without even the implied warranty of
28;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29;;; GNU General Public License for more details.
30;;;
31;;; You should have received a copy of the GNU General Public License
32;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33
34(define-module (gnu packages build-tools)
35 #:use-module ((guix licenses) #:prefix license:)
36 #:use-module (guix utils)
37 #:use-module (guix packages)
59bbf7e8 38 #:use-module (guix gexp)
33f79a74 39 #:use-module (guix download)
f85af5ab 40 #:use-module (guix git-download)
71dab08d 41 #:use-module (guix build-system cmake)
33f79a74 42 #:use-module (gnu packages)
b6d96be8 43 #:use-module (gnu packages adns)
ac11ef2f 44 #:use-module (gnu packages base)
45 #:use-module (gnu packages bash)
6560c497 46 #:use-module (gnu packages check)
c97cef0a 47 #:use-module (gnu packages compression)
b6d96be8 48 #:use-module (gnu packages cpp)
44d73b33 49 #:use-module (gnu packages elf)
2c1d1b75 50 #:use-module (gnu packages linux)
b6d96be8 51 #:use-module (gnu packages logging)
53367e17 52 #:use-module (gnu packages lua)
44d73b33 53 #:use-module (gnu packages ninja)
41e09a15 54 #:use-module (gnu packages package-management)
2c1d1b75
JK
55 #:use-module (gnu packages pcre)
56 #:use-module (gnu packages pkg-config)
b6d96be8
BG
57 #:use-module (gnu packages pretty-print)
58 #:use-module (gnu packages protobuf)
33f79a74 59 #:use-module (gnu packages python)
59bbf7e8 60 #:use-module (gnu packages python-build)
9a588402
61 #:use-module (gnu packages python-crypto)
62 #:use-module (gnu packages python-web)
6560c497 63 #:use-module (gnu packages python-xyz)
b6d96be8
BG
64 #:use-module (gnu packages regex)
65 #:use-module (gnu packages rpc)
2c1d1b75 66 #:use-module (gnu packages sqlite)
b6d96be8 67 #:use-module (gnu packages tls)
44d73b33 68 #:use-module (gnu packages version-control)
162dd290
CB
69 #:use-module (guix build-system gnu)
70 #:use-module (guix build-system python))
33f79a74
RW
71
72(define-public bam
73 (package
74 (name "bam")
53367e17 75 (version "0.5.1")
33f79a74 76 (source (origin
53367e17
AV
77 ;; do not use auto-generated tarballs
78 (method git-fetch)
79 (uri (git-reference
b0e7b699 80 (url "https://github.com/matricks/bam")
53367e17
AV
81 (commit (string-append "v" version))))
82 (file-name (git-file-name name version))
33f79a74
RW
83 (sha256
84 (base32
53367e17 85 "13br735ig7lygvzyfd15fc2rdygrqm503j6xj5xkrl1r7w2wipq6"))))
33f79a74
RW
86 (build-system gnu-build-system)
87 (arguments
60587450 88 `(#:make-flags `(,(string-append "CC=" ,(cc-for-target))
53367e17
AV
89 ,(string-append "INSTALL_PREFIX="
90 (assoc-ref %outputs "out")))
91 #:test-target "test"
92 #:phases
33f79a74 93 (modify-phases %standard-phases
53367e17 94 (delete 'configure))))
33f79a74
RW
95 (native-inputs
96 `(("python" ,python-2)))
53367e17 97 (inputs
8394619b 98 (list lua))
33f79a74
RW
99 (home-page "https://matricks.github.io/bam/")
100 (synopsis "Fast and flexible build system")
101 (description "Bam is a fast and flexible build system. Bam uses Lua to
102describe the build process. It takes its inspiration for the script files
103from scons. While scons focuses on being 100% correct when building, bam
104makes a few sacrifices to acquire fast full and incremental build times.")
105 (license license:bsd-3)))
162dd290 106
71dab08d
FT
107(define-public bear
108 (package
109 (name "bear")
e8b4e03e 110 (version "3.0.20")
de01d08b
TGR
111 (source
112 (origin
113 (method git-fetch)
114 (uri (git-reference
115 (url "https://github.com/rizsotto/Bear")
116 (commit version)))
117 (file-name (git-file-name name version))
118 (sha256
e8b4e03e 119 (base32 "0k89ccp9vz3x71w3r2wfpng9b8s0rxp4qr0ch9q32wq6y1ik847j"))))
71dab08d 120 (build-system cmake-build-system)
b6d96be8
BG
121 (arguments
122 `(#:phases (modify-phases %standard-phases
de01d08b
TGR
123 (add-after 'unpack 'disable-TEST_BEFORE_INSTALL
124 (lambda _
125 (substitute* "CMakeLists.txt"
126 ;; Delete the matching line—and comment out the next.
127 ((".*TEST_(BEFORE_INSTALL|COMMAND).*") "#"))))
b6d96be8
BG
128 (add-before 'check 'set-build-environment
129 (lambda _
de01d08b 130 (setenv "CC" "gcc")))
b6d96be8 131 (replace 'check
9c426e19
TGR
132 ;; TODO: Test configuration is incomplete.
133 (lambda* (#:key tests? #:allow-other-keys)
134 (when tests?
135 (invoke "ctest")))))))
73d85423 136 (inputs
b6d96be8
BG
137 `(("c-ares" ,c-ares)
138 ("fmt" ,fmt)
139 ("grpc" ,grpc)
140 ("json-modern-cxx" ,json-modern-cxx)
141 ("protobuf" ,protobuf)
142 ("python" ,python-wrapper)
143 ("re2" ,re2)
144 ("spdlog" ,spdlog)))
145 (native-inputs
146 `(("abseil-cpp" ,abseil-cpp)
b6d96be8
BG
147 ("googletest" ,googletest)
148 ("openssl" ,openssl)
149 ("pkg-config" ,pkg-config)
150 ("python-lit" ,python-lit)
151 ("zlib" ,zlib)))
71dab08d
FT
152 (home-page "https://github.com/rizsotto/Bear")
153 (synopsis "Tool for generating a compilation database")
154 (description "A JSON compilation database is used in the Clang project to
155provide information on how a given compilation unit is processed. With this,
156it is easy to re-run the compilation with alternate programs. Bear is used to
157generate such a compilation database.")
158 (license license:gpl3+)))
159
ac11ef2f 160(define-public bmake
161 (package
162 (name "bmake")
2cb86578 163 (version "20211212")
ac11ef2f 164 (source
165 (origin
166 (method url-fetch)
167 (uri (string-append
168 "http://www.crufty.net/ftp/pub/sjg/bmake-" version ".tar.gz"))
169 (sha256
2cb86578 170 (base32 "17lywks7fy5538vwyyvbvxcq5mgnd5si7f2qgw85sgqj7mdr4xdd"))))
ac11ef2f 171 (build-system gnu-build-system)
172 (inputs
87977e9e 173 (list bash-minimal))
ac11ef2f 174 (native-inputs
8394619b 175 (list coreutils))
ac11ef2f 176 (arguments
177 `(#:tests? #f ; test during build
178 #:phases
179 (modify-phases %standard-phases
180 (add-after 'configure 'fix-test ; fix from nixpkgs
181 (lambda _
182 (substitute* "unit-tests/unexport-env.mk"
183 (("PATH=\t/bin:/usr/bin:/sbin:/usr/sbin")
184 "PATH := ${PATH}"))))
185 (add-after 'configure 'remove-fail-tests
186 (lambda _
187 (substitute* "unit-tests/Makefile"
188 (("cmd-interrupt") "")
0fb4cc7a 189 (("varmod-localtime") "")))))
ac11ef2f 190 #:configure-flags
191 (list
192 (string-append
193 "--with-defshell=" (assoc-ref %build-inputs "bash") "/bin/bash")
194 (string-append
195 "--with-default-sys-path=" (assoc-ref %outputs "out") "/share/mk"))
196 #:make-flags
197 (list "INSTALL=install"))) ;; use coreutils install
198 (home-page "http://www.crufty.net/help/sjg/bmake.htm")
199 (synopsis "BSD's make")
200 (description
201 "bmake is a program designed to simplify the maintenance of other
202programs. Its input is a list of specifications as to the files upon which
203programs and other files depend.")
204 (license license:bsd-3)))
205
3ad0a358 206(define-public gn
1c4cbeee
MB
207 (let ((commit "e327ffdc503815916db2543ec000226a8df45163")
208 (revision "1819")) ;as returned by `git describe`, used below
3ad0a358
MB
209 (package
210 (name "gn")
211 (version (git-version "0.0" revision commit))
212 (home-page "https://gn.googlesource.com/gn")
213 (source (origin
214 (method git-fetch)
215 (uri (git-reference (url home-page) (commit commit)))
216 (sha256
217 (base32
1c4cbeee 218 "0kvlfj3www84zp1vmxh76x8fdjm9hyk8lkh2vdsidafpmm75fphr"))
3ad0a358
MB
219 (file-name (git-file-name name version))))
220 (build-system gnu-build-system)
221 (arguments
97b672d9 222 `(#:phases (modify-phases %standard-phases
3ad0a358
MB
223 (add-before 'configure 'set-build-environment
224 (lambda _
225 (setenv "CC" "gcc") (setenv "CXX" "g++")
8be3cd6c 226 (setenv "AR" "ar")))
3ad0a358
MB
227 (replace 'configure
228 (lambda _
ebee2f47 229 (invoke "python" "build/gen.py"
3ad0a358
MB
230 "--no-last-commit-position")))
231 (add-after 'configure 'create-last-commit-position
232 (lambda _
233 ;; Create "last_commit_position.h" to avoid a dependency
234 ;; on 'git' (and the checkout..).
235 (call-with-output-file "out/last_commit_position.h"
236 (lambda (port)
237 (format port
b7851222
MB
238 (string-append
239 "#define LAST_COMMIT_POSITION_NUM ~a\n"
240 "#define LAST_COMMIT_POSITION \"~a (~a)\"\n")
8be3cd6c 241 ,revision ,revision ,(string-take commit 8))))))
3ad0a358
MB
242 (replace 'build
243 (lambda _
244 (invoke "ninja" "-C" "out" "gn"
245 "-j" (number->string (parallel-job-count)))))
97b672d9 246 (replace 'check
8be3cd6c 247 (lambda* (#:key tests? #:allow-other-keys)
97b672d9 248 (if tests?
8be3cd6c 249 (begin
97b672d9
MB
250 (invoke "ninja" "-C" "out" "gn_unittests"
251 "-j" (number->string (parallel-job-count)))
252 (invoke "./out/gn_unittests"))
253 (format #t "test suite not run~%"))))
3ad0a358
MB
254 (replace 'install
255 (lambda* (#:key outputs #:allow-other-keys)
256 (let ((out (assoc-ref outputs "out")))
8be3cd6c 257 (install-file "out/gn" (string-append out "/bin"))))))))
3ad0a358
MB
258 (native-inputs
259 `(("ninja" ,ninja)
8be3cd6c 260 ("python" ,python-wrapper)))
3ad0a358
MB
261 (synopsis "Generate Ninja build files")
262 (description
263 "GN is a tool that collects information about a project from @file{.gn}
264files and generates build instructions for the Ninja build system.")
265 ;; GN is distributed as BSD-3, but bundles some files from ICU using the
266 ;; X11 license.
267 (license (list license:bsd-3 license:x11)))))
268
f9551e9d 269(define-public meson-0.63
162dd290
CB
270 (package
271 (name "meson")
f9551e9d 272 (version "0.63.2")
162dd290
CB
273 (source (origin
274 (method url-fetch)
275 (uri (string-append "https://github.com/mesonbuild/meson/"
a47ed096
RW
276 "releases/download/" version "/meson-"
277 version ".tar.gz"))
162dd290
CB
278 (sha256
279 (base32
f9551e9d 280 "1gwba75z47m2hv3w08gw8sgqgbknjr7rj1qwr510bgknxwbjy8hn"))))
162dd290 281 (build-system python-build-system)
021d3a32
VK
282 (arguments
283 `(;; FIXME: Tests require many additional inputs and patching many
284 ;; hard-coded file system locations in "run_unittests.py".
285 #:tests? #f
286 #:phases (modify-phases %standard-phases
287 ;; Meson calls the various executables in out/bin through the
288 ;; Python interpreter, so we cannot use the shell wrapper.
289 (replace 'wrap
290 (lambda* (#:key outputs inputs #:allow-other-keys)
291 (let ((python-version
292 (python-version (assoc-ref inputs "python")))
293 (output (assoc-ref outputs "out")))
294 (substitute* (string-append output "/bin/meson")
295 (("# EASY-INSTALL-ENTRY-SCRIPT")
296 (format #f "\
297import sys
298sys.path.insert(0, '~a/lib/python~a/site-packages')
299# EASY-INSTALL-ENTRY-SCRIPT"
300 output python-version)))))))))
6f36d0c8
MC
301 (inputs (list python-wrapper ninja))
302 (home-page "https://mesonbuild.com/")
303 (synopsis "Build system designed to be fast and user-friendly")
304 (description
305 "The Meson build system is focused on user-friendliness and speed.
306It can compile code written in C, C++, Fortran, Java, Rust, and other
307languages. Meson provides features comparable to those of the
308Autoconf/Automake/make combo. Build specifications, also known as @dfn{Meson
309files}, are written in a custom domain-specific language (@dfn{DSL}) that
310resembles Python.")
311 (license license:asl2.0)))
021d3a32 312
f9551e9d
MB
313(define-public meson-0.60
314 (package
315 (inherit meson-0.63)
316 (version "0.60.3")
06d2227e
MC
317 (source (origin
318 (method url-fetch)
319 (uri (string-append "https://github.com/mesonbuild/meson/"
320 "releases/download/" version "/meson-"
321 version ".tar.gz"))
322 (sha256
323 (base32
f9551e9d 324 "13mrrizg4vl6n5k7fz6amyafnn3i097dcarr552qc0ca6nlmzjl7"))
06d2227e
MC
325 (patches (search-patches
326 "meson-allow-dirs-outside-of-prefix.patch"))))))
327
f9551e9d
MB
328;;; This older Meson variant is kept for now for gtkmm and others that may
329;;; have problems with 0.60.
330(define-public meson-0.59
1d2b1ea6 331 (package
f9551e9d
MB
332 (inherit meson-0.60)
333 (version "0.59.4")
1d2b1ea6
MB
334 (source (origin
335 (method url-fetch)
336 (uri (string-append "https://github.com/mesonbuild/meson/"
337 "releases/download/" version "/meson-"
338 version ".tar.gz"))
339 (sha256
340 (base32
f9551e9d
MB
341 "117cm8794h291lca1wljz1pwnzidgbvrpg3mw3np6ksma368hyd7"))
342 (patches (search-patches
343 "meson-allow-dirs-outside-of-prefix.patch"))))))
344
345;; TODO: Bump this in the next rebuild cycle.
346(define-public meson meson-0.60)
1d2b1ea6 347
44d73b33
MB
348(define-public meson-python
349 (package
350 (name "meson-python")
351 (version "0.8.1")
352 (source (origin
353 (method url-fetch)
354 (uri (pypi-uri "meson_python" version))
355 (sha256
356 (base32
357 "0k2yn0iws1n184sdznzmfw4xgbqgq5cn02hpc7m0xdaxryj1ybs4"))))
358 (build-system python-build-system)
359 (arguments
360 (list #:phases
361 #~(modify-phases %standard-phases
362 (add-after 'unpack 'avoid-ninja-dependency
363 (lambda _
364 ;; Avoid dependency on the "ninja" PyPI distribution,
365 ;; which is a meta-package that simply downloads and
366 ;; installs ninja from the web ...
367 (substitute* "pyproject.toml"
368 (("'ninja',")
369 ""))))
370 (replace 'build
371 (lambda _
372 ;; ZIP does not support timestamps before 1980.
373 (setenv "SOURCE_DATE_EPOCH" "315532800")
374 (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
375 (replace 'install
376 (lambda _
377 (let ((whl (car (find-files "dist" "\\.whl$"))))
378 (invoke "pip" "--no-cache-dir" "--no-input"
379 "install" "--no-deps" "--prefix" #$output whl))))
380 (replace 'check
381 (lambda* (#:key tests? #:allow-other-keys)
382 (when tests?
383 (invoke "pytest" "-vv" "tests" "-k"
384 (string-append
385 "not "
386 ;; These tests require a git checkout.
387 (string-join '("test_contents_unstaged"
388 "test_no_pep621"
389 "test_pep621"
390 "test_dynamic_version"
391 "test_contents"
392 "test_contents_subdirs")
393 " and not ")))))))))
394 (propagated-inputs
395 (list meson-0.63 ;>=0.62 required
396 ninja
397 ;; XXX: python-meson forcefully sets the RUNPATH of binaries
398 ;; for vendoring purposes, and uses PatchELF for that(!). This
399 ;; functionality is not useful in Guix, but removing this
400 ;; dependency is tricky. There is discussion upstream about making
401 ;; it optional, but for now we'll just carry it:
402 ;; https://github.com/FFY00/meson-python/issues/125
403 patchelf
404 python-colorama
405 python-pyproject-metadata
406 python-tomli
407 python-wheel))
408 (native-inputs
409 (list python-pypa-build
410 python-wheel
411
412 ;; For tests.
413 pkg-config
414 python-gitpython
415 python-pytest
416 python-pytest-mock))
417 (home-page "https://github.com/FFY00/mesonpy")
418 (synopsis "Meson-based build backend for Python")
419 (description
420 "meson-python is a PEP 517 build backend for Meson projects.")
421 (license license:expat)))
422
c97cef0a
OP
423(define-public premake4
424 (package
425 (name "premake")
426 (version "4.3")
427 (source (origin
428 (method url-fetch)
429 (uri (string-append "mirror://sourceforge/premake/Premake/"
430 version "/premake-" version "-src.zip"))
431 (sha256
432 (base32
433 "1017rd0wsjfyq2jvpjjhpszaa7kmig6q1nimw76qx3cjz2868lrn"))))
434 (build-system gnu-build-system)
435 (native-inputs
8394619b 436 (list unzip)) ; for unpacking the source
c97cef0a 437 (arguments
1f048676 438 `(#:make-flags (list (string-append "CC=" ,(cc-for-target)))
c97cef0a
OP
439 #:tests? #f ; No test suite
440 #:phases
441 (modify-phases %standard-phases
442 (delete 'configure)
443 (add-after 'unpack 'enter-source
444 (lambda _ (chdir "build/gmake.unix") #t))
445 (replace 'install
446 (lambda* (#:key outputs #:allow-other-keys)
447 (install-file "../../bin/release/premake4"
448 (string-append (assoc-ref outputs "out") "/bin"))
449 #t)))))
450 (synopsis "Portable software build tool")
451 (description "@code{premake4} is a command line utility that reads a
452scripted definition of a software project and outputs @file{Makefile}s or
453other lower-level build files.")
454 (home-page "https://premake.github.io")
455 (license license:bsd-3)))
9a588402 456
fcafee61
LP
457(define-public premake5
458 (package
459 (inherit premake4)
7c475372 460 (version "5.0.0-alpha15")
fcafee61
LP
461 (source (origin
462 (method url-fetch)
463 (uri (string-append "https://github.com/premake/premake-core/"
464 "releases/download/v" version
465 "/premake-" version "-src.zip"))
466 (sha256
467 (base32
7c475372 468 "0lyxfyqxyhjqsb3kmx1fyrxinb26i68hb7w7rg8lajczrgkmc3w8"))))
fcafee61
LP
469 (arguments
470 (substitute-keyword-arguments (package-arguments premake4)
471 ((#:phases phases)
472 `(modify-phases ,phases
7c475372
TGR
473 (replace 'enter-source
474 (lambda _ (chdir "build/gmake2.unix") #t))
fcafee61
LP
475 (replace 'install
476 (lambda* (#:key outputs #:allow-other-keys)
477 (install-file "../../bin/release/premake5"
478 (string-append (assoc-ref outputs "out") "/bin"))
479 #t))))))
480 (description "@code{premake5} is a command line utility that reads a
481scripted definition of a software project and outputs @file{Makefile}s or
482other lower-level build files.")))
483
ada35de3
MB
484(define-public scons
485 (package
486 (name "scons")
59bbf7e8
MB
487 (version "4.4.0")
488 (source (origin
489 (method git-fetch)
490 (uri (git-reference
491 (url "https://github.com/SCons/scons")
492 (commit version)))
493 (file-name (git-file-name name version))
494 (patches (search-patches "scons-test-environment.patch"))
495 (sha256
496 (base32
497 "1czswx1fj2j48rspkrvarkr43k0vii9rsmz054c9yby1dq362fgr"))))
498 (build-system python-build-system)
499 (arguments
500 (list
501 #:modules (append %python-build-system-modules
502 '((ice-9 ftw) (srfi srfi-26)))
503 #:phases
504 #~(modify-phases (@ (guix build python-build-system) %standard-phases)
505 (add-after 'unpack 'adjust-hard-coded-paths
506 (lambda _
507 (substitute* "SCons/Script/Main.py"
508 (("/usr/share/scons")
509 (string-append #$output "/share/scons")))))
510 (add-before 'build 'bootstrap
511 (lambda _
512 ;; XXX: Otherwise setup.py bdist_wheel fails.
513 (setenv "PYTHONPATH" (getenv "GUIX_PYTHONPATH"))
514 (invoke "python" "scripts/scons.py")))
515 (replace 'check
516 (lambda* (#:key tests? #:allow-other-keys)
517 (when tests?
518 (invoke "python" "runtest.py" "--all" "--unit-only"))))
519 (add-after 'install 'move-manuals
520 (lambda _
521 ;; XXX: For some reason manuals get installed to the top-level
522 ;; #$output directory.
523 (with-directory-excursion #$output
524 (let ((man1 (string-append #$output "/share/man/man1"))
525 (stray-manuals (scandir "."
526 (cut string-suffix? ".1" <>))))
527 (mkdir-p man1)
528 (for-each (lambda (manual)
529 (link manual (string-append man1 "/" manual))
530 (delete-file manual))
531 stray-manuals))))))))
532 (native-inputs
533 ;; TODO: Add 'fop' when available in Guix to generate manuals.
534 (list python-wheel
535 ;;For tests.
536 python-psutil))
537 (home-page "https://scons.org/")
538 (synopsis "Software construction tool written in Python")
539 (description
540 "SCons is a software construction tool. Think of SCons as an improved,
541cross-platform substitute for the classic Make utility with integrated
542functionality similar to autoconf/automake and compiler caches such as ccache.
543In short, SCons is an easier, more reliable and faster way to build
544software.")
545 (license license:x11)))
546
547(define-public scons-3
548 (package
549 (inherit scons)
ada35de3
MB
550 (version "3.0.4")
551 (source (origin
552 (method git-fetch)
553 (uri (git-reference
554 (url "https://github.com/SCons/scons")
555 (commit version)))
59bbf7e8 556 (file-name (git-file-name "scons" version))
ada35de3
MB
557 (sha256
558 (base32
559 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
ada35de3
MB
560 (arguments
561 `(#:use-setuptools? #f ; still relies on distutils
562 #:tests? #f ; no 'python setup.py test' command
563 #:phases
564 (modify-phases %standard-phases
565 (add-before 'build 'bootstrap
566 (lambda _
567 (substitute* "src/engine/SCons/compat/__init__.py"
568 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
569 "sys.modules[new] = __import__(old)"))
570 (substitute* "src/engine/SCons/Platform/__init__.py"
571 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
572 "mod = __import__(full_name)"))
573 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
574 (chdir "build/scons")
575 #t)))))
59bbf7e8 576 (native-inputs '())))
ada35de3
MB
577
578(define-public scons-python2
579 (package
59bbf7e8 580 (inherit (package-with-python2 scons-3))
ada35de3
MB
581 (name "scons-python2")))
582
2c1d1b75
JK
583(define-public tup
584 (package
585 (name "tup")
0f99da2b 586 (version "0.7.9")
2c1d1b75
JK
587 (source (origin
588 (method url-fetch)
589 (uri (string-append "http://gittup.org/tup/releases/tup-v"
590 version ".tar.gz"))
591 (sha256
592 (base32
0f99da2b 593 "0gnd2598xqgwihdkfkx7qn0q6p4n7npam1fy83mp7s04zwj99syc"))
2c1d1b75
JK
594 (patches (search-patches "tup-unbundle-dependencies.patch"))
595 (modules '((guix build utils)))
596 (snippet
597 '(begin
598 ;; NOTE: Tup uses a slightly modified Lua, so it cannot be
599 ;; unbundled. See: src/lula/tup-lua.patch
600 (delete-file-recursively "src/pcre")
601 (delete-file-recursively "src/sqlite3")
602 #t))))
603 (build-system gnu-build-system)
604 (arguments
605 `(#:phases
606 (modify-phases %standard-phases
607 ;; There is a bootstrap script, but it doesn't do what you think - it
608 ;; builds tup.
609 (delete 'bootstrap)
610 (replace 'configure
611 (lambda _
612 (substitute* "src/tup/link.sh"
613 (("`git describe`") ,version))
614 (with-output-to-file "tup.config"
615 (lambda _
616 (format #t "CONFIG_TUP_USE_SYSTEM_SQLITE=y~%")))
617 #t))
618 (delete 'check)
619 (replace 'build
620 (lambda _
621 ;; Based on bootstrap-nofuse.sh, but with a detour to patch-shebang.
622 (invoke "./build.sh")
623 (invoke "./build/tup" "init")
624 (invoke "./build/tup" "generate" "--verbose" "build-nofuse.sh")
625 (patch-shebang "build-nofuse.sh")
626 (invoke "./build-nofuse.sh")))
627 (replace 'install
628 (lambda* (#:key outputs #:allow-other-keys)
629 (let* ((outdir (assoc-ref outputs "out"))
630 (ftdetect (string-append outdir
631 "/share/vim/vimfiles/ftdetect")))
632 (install-file "tup" (string-append outdir "/bin"))
633 (install-file "tup.1" (string-append outdir "/share/man/man1"))
634 (install-file "contrib/syntax/tup.vim"
635 (string-append outdir "/share/vim/vimfiles/syntax"))
636 (mkdir-p ftdetect)
637 (with-output-to-file (string-append ftdetect "/tup.vim")
638 (lambda _
639 (display "au BufNewFile,BufRead Tupfile,*.tup setf tup")))
640 #t))))))
641 (inputs
8394619b
LC
642 (list fuse pcre
643 `(,pcre "bin") ; pcre-config
644 sqlite))
2c1d1b75 645 (native-inputs
8394619b 646 (list pkg-config))
2c1d1b75
JK
647 (home-page "http://gittup.org/tup/")
648 (synopsis "Fast build system that's hard to get wrong")
649 (description "Tup is a generic build system based on a directed acyclic
650graphs of commands to be executed. Tup instruments your build to detect the
651exact dependencies of the commands, allowing you to take advantage of ideal
652parallelism during incremental builds, and detecting any situations where
653a build worked by accident.")
654 (license license:gpl2)))
655
9a588402
656(define-public osc
657 (package
658 (name "osc")
ca15eaeb 659 (version "0.172.0")
9a588402
660 (source
661 (origin
41e09a15
JB
662 (method git-fetch)
663 (uri (git-reference
664 (url "https://github.com/openSUSE/osc")
665 (commit version)))
666 (file-name (git-file-name name version))
9a588402 667 (sha256
ca15eaeb 668 (base32 "1sqdnkka3c6b6hwnrmlwrgy7w62cp8raq8mph9pgd2lydzzbvwlp"))))
9a588402
669 (build-system python-build-system)
670 (arguments
41e09a15 671 `(#:phases
9a588402 672 (modify-phases %standard-phases
41e09a15 673 (add-after 'install 'fix-filename
9a588402
674 (lambda* (#:key outputs #:allow-other-keys)
675 (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
676 ;; Main osc tool is renamed in spec file, not setup.py, let's
677 ;; do that too.
678 (rename-file
679 (string-append bin "osc-wrapper.py")
680 (string-append bin "osc"))
41e09a15 681 #t))))))
ca15eaeb 682 (native-inputs
8394619b 683 (list python-chardet))
9a588402 684 (inputs
8394619b 685 (list python-m2crypto python-pycurl rpm)) ; for python-rpm
9a588402
686 (home-page "https://github.com/openSUSE/osc")
687 (synopsis "Open Build Service command line tool")
688 (description "@command{osc} is a command line interface to the Open Build
689Service. It allows you to checkout, commit, perform reviews etc. The vast
690majority of the OBS functionality is available via commands and the rest can
691be reached via direct API calls.")
692 (license license:gpl2+)))
6560c497
YK
693
694(define-public compiledb
695 (package
696 (name "compiledb")
697 (version "0.10.1")
698 (source
699 (origin
700 (method url-fetch)
701 (uri (pypi-uri "compiledb" version))
702 (sha256
703 (base32 "0vlngsdxfakyl8b7rnvn8h3l216lhbrrydr04yhy6kd03zflgfq6"))))
704 (build-system python-build-system)
705 (arguments
706 `(#:phases
707 (modify-phases %standard-phases
708 (add-after 'unpack 'no-compat-shim-dependency
709 ;; shutilwhich is only needed for python 3.3 and earlier
710 (lambda _
711 (substitute* "setup.py" (("^ *'shutilwhich'\n") ""))
712 (substitute* "compiledb/compiler.py" (("shutilwhich") "shutil")))))))
713 (propagated-inputs
8394619b 714 (list python-bashlex python-click))
6560c497 715 (native-inputs
8394619b 716 (list python-pytest))
6560c497
YK
717 (home-page
718 "https://github.com/nickdiego/compiledb")
719 (synopsis
720 "Generate Clang JSON Compilation Database files for make-based build systems")
721 (description
722 "@code{compiledb} provides a @code{make} python wrapper script which,
723besides executing the make build command, updates the JSON compilation
724database file corresponding to that build, resulting in a command-line
725interface similar to Bear.")
726 (license license:gpl3)))
65719505
MC
727
728(define-public build
729 (package
730 (name "build")
731 (version "0.3.10")
732 (source
733 (origin
734 (method url-fetch)
735 (uri (string-append "https://www.codesynthesis.com/download/"
736 "build/" (version-major+minor version)
737 "/build-" version ".tar.bz2"))
738 (sha256
739 (base32 "1lx5rpnmsbip43zpp0a57sl5rm7pjb0y6i2si6rfglfp4p9d3z76"))))
740 (build-system gnu-build-system)
741 (arguments
742 `(#:make-flags (list (string-append "install_prefix=" %output))
743 #:tests? #f
744 #:phases (modify-phases %standard-phases
745 (delete 'build)
746 (delete 'configure))))
747 (home-page "https://www.codesynthesis.com/projects/build/")
748 (synopsis "Massively-parallel build system implemented on top of GNU make")
749 (description "Build is a massively-parallel software build system
750implemented on top of GNU Make, designed with the following tasks in mind:
751@itemize
752@item configuration
753@item building
754@item testing
755@item installation
756@end itemize
757Build has features such as:
758@itemize
759@item Position-independent makefiles.
760@item Non-recursive multi-makefile include-based structure.
761@item Leaf makefiles are full-fledged GNU makefiles, not just variable definitions.
762@item Complete dependency graph.
763@item Inter-project dependency tracking.
764@item Extensible language/compiler framework.
765@end itemize")
766 (license license:gpl2+)))
31f0e46b
S
767
768(define-public genie
769 (let ((commit "b139103697bbb62db895e4cc7bfe202bcff4ff25")
770 (revision "0"))
771 (package
772 (name "genie")
773 (version (git-version "1167" revision commit))
774 (source (origin
775 (method git-fetch)
776 (uri (git-reference
777 (url "https://github.com/bkaradzic/genie")
778 (commit commit)))
779 (file-name (git-file-name name version))
780 (sha256
781 (base32
782 "16plshzkyjjzpfcxnwjskrs7i4gg0qn92h2k0rbfl4a79fgmwvwv"))))
783 (build-system gnu-build-system)
784 (arguments
785 (list #:phases #~(modify-phases %standard-phases
786 (delete 'configure)
787 (replace 'install
788 (lambda _
789 (install-file "bin/linux/genie"
790 (string-append #$output "/bin")))))
791 #:tests? #f)) ;no tests
792 (home-page "https://github.com/bkaradzic/genie")
793 (synopsis "Project generator")
794 (description
795 "GENie generates projects from Lua scripts, making it easy to apply the
796same settings to multiple projects. It supports generating projects using GNU
797Makefiles, JSON Compilation Database, and experimentally Ninja.")
798 (license license:bsd-3))))