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