Commit | Line | Data |
---|---|---|
a5e2c9a9 | 1 | ;;; GNU Guix --- Functional package management for GNU |
350f50cb | 2 | ;;; Copyright © 2016, 2018 Ludovic Courtès <ludo@gnu.org> |
d4228481 | 3 | ;;; Copyright © 2016, 2017, 2018, 2019, 2021 Ricardo Wurmus <rekado@elephly.net> |
4a0e0fc7 | 4 | ;;; Copyright © 2018, 2020–2022 Tobias Geerinckx-Rice <me@tobias.gr> |
07592c77 | 5 | ;;; Copyright © 2018, 2019 Pierre Neidhardt <mail@ambrevar.xyz> |
8161c61a | 6 | ;;; Copyright © 2019, 2020, 2022 Efraim Flashner <efraim@flashner.co.il> |
c1ea1a94 | 7 | ;;; Copyright © 2019, 2021 Guillaume Le Vaillant <glv@posteo.net> |
4c16ffd3 | 8 | ;;; Copyright © 2019 Andreas Enge <andreas@enge.fr> |
7adb5299 | 9 | ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> |
8eea80d8 | 10 | ;;; Copyright © 2020, 2021 Marius Bakke <marius@gnu.org> |
6c273ee4 | 11 | ;;; Copyright © 2020 Katherine Cox-Buday <cox.katherine.e@gmail.com> |
93c974d1 | 12 | ;;; Copyright © 2020, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> |
9d541e97 | 13 | ;;; Copyright © 2020, 2021 Greg Hogan <code@greghogan.com> |
1be97fa9 | 14 | ;;; Copyright © 2021 David Dashyan <mail@davie.li> |
312879fd | 15 | ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com> |
dc5707f2 | 16 | ;;; Copyright © 2022 (unmatched parenthesis <paren@disroot.org> |
91a51765 | 17 | ;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com> |
18bb89c2 | 18 | ;;; Copyright © 2022 Ekaitz Zarraga <ekaitz@elenq.tech> |
dfda2cc5 | 19 | ;;; Copyright © 2022 ( <paren@disroot.org> |
a5e2c9a9 LC |
20 | ;;; |
21 | ;;; This file is part of GNU Guix. | |
22 | ;;; | |
23 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
24 | ;;; under the terms of the GNU General Public License as published by | |
25 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
26 | ;;; your option) any later version. | |
27 | ;;; | |
28 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
29 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
30 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
31 | ;;; GNU General Public License for more details. | |
32 | ;;; | |
33 | ;;; You should have received a copy of the GNU General Public License | |
34 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
35 | ||
36 | (define-module (gnu packages c) | |
37 | #:use-module ((guix licenses) #:prefix license:) | |
d4228481 | 38 | #:use-module (guix gexp) |
40e95456 | 39 | #:use-module (guix utils) |
a5e2c9a9 LC |
40 | #:use-module (guix packages) |
41 | #:use-module (guix download) | |
c229fb3d | 42 | #:use-module (guix git-download) |
5f998a5c | 43 | #:use-module (guix build-system cmake) |
a5e2c9a9 | 44 | #:use-module (guix build-system gnu) |
dcd97606 | 45 | #:use-module (guix build-system python) |
9f088725 | 46 | #:use-module (guix build-system trivial) |
7be44e85 | 47 | #:use-module (guix store) |
4c66a8de | 48 | #:use-module (gnu packages) |
8eea80d8 | 49 | #:use-module (gnu packages bash) |
a5e2c9a9 | 50 | #:use-module (gnu packages bootstrap) |
f0316832 | 51 | #:use-module (gnu packages bison) |
07592c77 | 52 | #:use-module (gnu packages check) |
f0316832 | 53 | #:use-module (gnu packages flex) |
96eb2337 | 54 | #:use-module (gnu packages gcc) |
a5e2c9a9 | 55 | #:use-module (gnu packages perl) |
9f088725 | 56 | #:use-module (gnu packages texinfo) |
97b7201f | 57 | #:use-module (gnu packages guile) |
c59d3d67 | 58 | #:use-module (gnu packages llvm) |
9acf79b2 | 59 | #:use-module (gnu packages lua) |
c229fb3d PN |
60 | #:use-module (gnu packages multiprecision) |
61 | #:use-module (gnu packages pcre) | |
62 | #:use-module (gnu packages python) | |
7def5056 | 63 | #:use-module (gnu packages python-xyz) |
c229fb3d PN |
64 | #:use-module (gnu packages autotools) |
65 | #:use-module (gnu packages gettext) | |
011ec1e5 | 66 | #:use-module (gnu packages pkg-config) |
748e2ec0 | 67 | #:use-module (gnu packages tls) |
d4228481 | 68 | #:use-module (gnu packages web) |
011ec1e5 | 69 | #:use-module (gnu packages xml)) |
a5e2c9a9 | 70 | |
96eb2337 | 71 | (define-public cproc |
72 | (let ((commit "70fe9ef1810cc6c05bde9eb0970363c35fa7e802") | |
73 | (revision "1")) | |
74 | (package | |
75 | (name "cproc") | |
76 | (version (git-version "0.0" revision commit)) | |
77 | (source | |
78 | (origin | |
79 | (method git-fetch) | |
80 | (uri (git-reference | |
81 | (url "https://git.sr.ht/~mcf/cproc") | |
82 | (commit commit))) | |
83 | (file-name (git-file-name name version)) | |
84 | (sha256 | |
85 | (base32 "1qmgzll7z7mn587azkj4cizyyd8ii6iznfxpc66ja08140sbn9yx")))) | |
86 | (build-system gnu-build-system) | |
87 | (arguments | |
88 | (list | |
89 | #:make-flags | |
90 | #~(list (string-append "CC=" #$(cc-for-target)) | |
91 | (string-append "PREFIX=" #$output)) | |
92 | #:phases | |
93 | #~(modify-phases %standard-phases | |
94 | (replace 'configure | |
95 | (lambda* (#:key inputs #:allow-other-keys) | |
96 | (let ((gcc-lib (assoc-ref inputs "gcc:lib")) | |
97 | (host-system #$(nix-system->gnu-triplet | |
98 | (%current-system))) | |
99 | (target-system #$(nix-system->gnu-triplet | |
100 | (or (%current-target-system) | |
101 | (%current-system))))) | |
102 | (invoke "./configure" | |
103 | (string-append "--prefix=" #$output) | |
104 | (string-append "--host=" host-system) | |
105 | (string-append "--target=" target-system) | |
106 | (string-append "--with-ld=" #$(ld-for-target)) | |
107 | (string-append "--with-gcc-libdir=" gcc-lib)))))))) | |
108 | (inputs `(("qbe" ,qbe) | |
109 | ("gcc:lib" ,gcc "lib"))) | |
110 | (supported-systems (list "x86_64-linux" "aarch64-linux")) | |
111 | (synopsis "Simple C11 compiler backed by QBE") | |
112 | (description "@code{cproc} is a C compiler using QBE as a backend, | |
113 | supporting most of C11 along with some GCC and C2x extensions.") | |
114 | (home-page "https://sr.ht/~mcf/cproc") | |
115 | (license license:expat)))) | |
116 | ||
a5e2c9a9 | 117 | (define-public tcc |
18bb89c2 EZ |
118 | ;; There's currently no release fixing <https://issues.guix.gnu.org/52140>. |
119 | (let ((revision "1") | |
120 | (commit "a83b28568596afd8792fd58d1a5bd157fc6b6634")) | |
121 | (package | |
122 | (name "tcc") ;aka. "tinycc" | |
123 | (version (git-version "0.9.27" revision commit)) | |
124 | (source (origin | |
125 | (method git-fetch) | |
126 | (uri (git-reference | |
127 | (url "git://repo.or.cz/tinycc.git") | |
128 | (commit commit))) | |
129 | (file-name (git-file-name name version)) | |
130 | (sha256 | |
131 | (base32 | |
132 | "01znw86fg73x3k0clafica4b6glbhz69p588kvp766i0zgvs68dh")))) | |
133 | (build-system gnu-build-system) | |
134 | (native-inputs (list perl texinfo)) | |
135 | (arguments | |
136 | `(#:configure-flags (list (string-append "--elfinterp=" | |
137 | (assoc-ref %build-inputs | |
138 | "libc") | |
139 | ,(glibc-dynamic-linker)) | |
140 | (string-append "--crtprefix=" | |
141 | (assoc-ref %build-inputs | |
142 | "libc") "/lib") | |
143 | (string-append "--sysincludepaths=" | |
144 | (assoc-ref %build-inputs | |
145 | "libc") "/include:" | |
146 | (assoc-ref %build-inputs | |
147 | "kernel-headers") | |
148 | "/include:{B}/include") | |
149 | (string-append "--libpaths=" | |
150 | (assoc-ref %build-inputs | |
151 | "libc") "/lib") | |
152 | ,@(if (string-prefix? "armhf-linux" | |
153 | (or (%current-target-system) | |
154 | (%current-system))) | |
155 | `("--triplet=arm-linux-gnueabihf") | |
156 | '())) | |
157 | #:test-target "test")) | |
158 | (native-search-paths | |
159 | (list (search-path-specification | |
160 | (variable "CPATH") | |
161 | (files '("include"))) | |
162 | (search-path-specification | |
163 | (variable "LIBRARY_PATH") | |
164 | (files '("lib" "lib64"))))) | |
165 | ;; Fails to build on MIPS: "Unsupported CPU" | |
166 | (supported-systems (delete "mips64el-linux" %supported-systems)) | |
167 | (synopsis "Tiny and fast C compiler") | |
168 | (description | |
169 | "TCC, also referred to as \"TinyCC\", is a small and fast C compiler | |
a5e2c9a9 LC |
170 | written in C. It supports ANSI C with GNU and extensions and most of the C99 |
171 | standard.") | |
18bb89c2 EZ |
172 | (home-page "http://www.tinycc.org/") |
173 | ;; An attempt to re-licence tcc under the Expat licence is underway but not | |
174 | ;; (if ever) complete. See the RELICENSING file for more information. | |
175 | (license license:lgpl2.1+)))) | |
9f088725 | 176 | |
f0316832 RW |
177 | (define-public pcc |
178 | (package | |
179 | (name "pcc") | |
180 | (version "20170109") | |
181 | (source (origin | |
182 | (method url-fetch) | |
183 | (uri (string-append "http://pcc.ludd.ltu.se/ftp/pub/pcc/pcc-" | |
184 | version ".tgz")) | |
185 | (sha256 | |
186 | (base32 | |
187 | "1p34w496095mi0473f815w6wbi57zxil106mg7pj6sg6gzpjcgww")))) | |
188 | (build-system gnu-build-system) | |
189 | (arguments | |
dfda2cc5 | 190 | (list #:phases |
191 | #~(modify-phases %standard-phases | |
192 | (add-after 'unpack 'fix-multiple-definitions | |
193 | (lambda _ | |
194 | ;; Certain variables are defined multiple times. This | |
195 | ;; upsets the linker and causes a build failure. | |
196 | (substitute* "cc/ccom/pass1.h" | |
197 | (("FLT flt_zero;") "extern FLT flt_zero;")) | |
198 | (substitute* (list "cc/ccom/scan.l" "cc/cxxcom/scan.l") | |
199 | (("lineno, ") "")))) | |
200 | (replace 'check | |
fba67be2 | 201 | (lambda* (#:key tests? #:allow-other-keys) |
202 | (when tests? | |
203 | (invoke "make" "-C" "cc/cpp" "test"))))))) | |
dfda2cc5 | 204 | (native-inputs (list bison flex)) |
f0316832 RW |
205 | (synopsis "Portable C compiler") |
206 | (description | |
207 | "PCC is a portable C compiler. The project goal is to write a C99 | |
208 | compiler while still keeping it small, simple, fast and understandable.") | |
209 | (home-page "http://pcc.ludd.ltu.se") | |
6a052473 | 210 | (supported-systems (delete "aarch64-linux" %supported-systems)) |
f0316832 RW |
211 | ;; PCC incorporates code under various BSD licenses; for new code bsd-2 is |
212 | ;; preferred. See http://pcc.ludd.ltu.se/licenses/ for more details. | |
213 | (license (list license:bsd-2 license:bsd-3)))) | |
c229fb3d | 214 | |
dc5707f2 | 215 | (define-public qbe |
0de4318b | 216 | (package |
217 | (name "qbe") | |
218 | (version "1.0") | |
219 | (source (origin | |
220 | (method git-fetch) | |
221 | (uri (git-reference | |
222 | (url "git://c9x.me/qbe") | |
223 | (commit (string-append "v" version)))) | |
224 | (file-name (git-file-name name version)) | |
225 | (sha256 | |
226 | (base32 | |
227 | "0qx4a3fjjrp2m4dsn19rpbjf89k9w7w7l09s96jx8vv15vzsdgis")))) | |
228 | (build-system gnu-build-system) | |
229 | (arguments | |
230 | (list #:make-flags | |
231 | #~(list (string-append "CC=" #$(cc-for-target)) | |
232 | (string-append "PREFIX=" #$output)) | |
233 | #:phases | |
234 | #~(modify-phases %standard-phases | |
235 | (add-after 'unpack 'allow-cross-compilation | |
236 | (lambda _ | |
237 | (substitute* "Makefile" | |
238 | (("`uname -m`") #$(or (%current-target-system) | |
239 | (%current-system)))))) | |
240 | (delete 'configure)))) | |
241 | (supported-systems (list "x86_64-linux" "aarch64-linux" "riscv64-linux")) | |
242 | (synopsis "Simple compiler backend") | |
243 | (description | |
244 | "QBE is a small compiler backend using an SSA-based intermediate | |
dc5707f2 | 245 | language as input.") |
0de4318b | 246 | (home-page "https://c9x.me/compile/") |
247 | (license license:expat))) | |
dc5707f2 | 248 | |
dcd97606 MC |
249 | (define-public python-pcpp |
250 | (package | |
251 | (name "python-pcpp") | |
252 | (version "1.30") | |
253 | (source | |
254 | (origin | |
255 | (method git-fetch) | |
256 | (uri (git-reference | |
257 | (url "https://github.com/ned14/pcpp") | |
258 | (commit (string-append "v" version)))) | |
259 | (file-name (git-file-name name version)) | |
260 | (sha256 | |
261 | (base32 | |
262 | "1rihvlg11nzk70kfzz4i3gi5izcy46w05ismcx04p5j1hlim0brb")))) | |
263 | (build-system python-build-system) | |
264 | (arguments | |
265 | (list | |
266 | #:phases #~(modify-phases %standard-phases | |
267 | (add-after 'unpack 'unbundle-ply | |
268 | (lambda _ | |
269 | (rmdir "pcpp/ply") | |
270 | (substitute* "setup.py" | |
271 | (("'pcpp/ply/ply'") ""))))))) | |
272 | (native-inputs (list python-pytest)) | |
273 | (propagated-inputs (list python-ply)) | |
274 | (home-page "https://github.com/ned14/pcpp") | |
275 | (synopsis "C99 preprocessor written in Python") | |
276 | (description "This package provides a C99 preprocessor written in pure | |
277 | Python.") | |
278 | (license license:bsd-3))) | |
279 | ||
c229fb3d PN |
280 | (define-public libbytesize |
281 | (package | |
282 | (name "libbytesize") | |
4a0e0fc7 | 283 | (version "2.6") |
c229fb3d PN |
284 | (source (origin |
285 | (method url-fetch) | |
286 | (uri (string-append | |
94617bdd TGR |
287 | "https://github.com/storaged-project/libbytesize/releases/" |
288 | "download/" version "/libbytesize-" version ".tar.gz")) | |
c229fb3d PN |
289 | (sha256 |
290 | (base32 | |
4a0e0fc7 | 291 | "0h87ryi0mp8msq43h1cna453cqaw5knx1xaggfzm4fxvn8sjpapg")))) |
c229fb3d | 292 | (build-system gnu-build-system) |
bf6859e4 | 293 | (arguments |
2414997a | 294 | `(#:tests? #f)) |
c229fb3d | 295 | (native-inputs |
067b746e | 296 | (list gettext-minimal pkg-config python)) |
c229fb3d | 297 | (inputs |
8394619b | 298 | (list mpfr pcre2)) |
c229fb3d PN |
299 | (home-page "https://github.com/storaged-project/libbytesize") |
300 | (synopsis "Tiny C library for working with arbitrary big sizes in bytes") | |
301 | (description | |
302 | "The goal of this project is to provide a tiny library that would | |
303 | facilitate the common operations with sizes in bytes. Many projects need to | |
304 | work with sizes in bytes (be it sizes of storage space, memory...) and all of | |
305 | them need to deal with the same issues like: | |
306 | ||
307 | @itemize | |
308 | @item How to get a human-readable string for the given size? | |
309 | @item How to store the given size so that no significant information is lost? | |
310 | @item If we store the size in bytes, what if the given size gets over the | |
311 | MAXUINT64 value? | |
312 | @item How to interpret sizes entered by users according to their locale and | |
313 | typing conventions? | |
314 | @item How to deal with the decimal/binary units (MB versus MiB) ambiguity? | |
315 | @end itemize | |
316 | ||
317 | @code{libbytesize} offers a generally usable solution that could be used by | |
318 | every project that needs to deal with sizes in bytes. It is written in the C | |
319 | language with thin bindings for other languages.") | |
320 | (license license:lgpl2.1+))) | |
011ec1e5 RW |
321 | |
322 | (define-public udunits | |
323 | (package | |
324 | (name "udunits") | |
0dca2e63 TGR |
325 | ;; Four-part version numbers are development snapshots, not releases. See |
326 | ;; <https://github.com/Unidata/UDUNITS-2/issues/99#issuecomment-732323472>. | |
48dafe7d | 327 | (version "2.2.28") |
011ec1e5 RW |
328 | (source (origin |
329 | (method url-fetch) | |
330 | (uri (string-append "ftp://ftp.unidata.ucar.edu/pub/udunits/" | |
331 | "udunits-" version ".tar.gz")) | |
332 | (sha256 | |
333 | (base32 | |
48dafe7d | 334 | "17jpbp6f0rr132jn2gqy8ry8mv1w27v6dyhfq1igv8v1674aw2sr")))) |
011ec1e5 | 335 | (build-system gnu-build-system) |
2a7dce4f TGR |
336 | (arguments |
337 | `(#:configure-flags | |
338 | (list "--disable-static"))) | |
011ec1e5 | 339 | (inputs |
8394619b | 340 | (list expat)) |
011ec1e5 RW |
341 | (home-page "https://www.unidata.ucar.edu/software/udunits/") |
342 | (synopsis "C library for units of physical quantities and value-conversion utils") | |
343 | (description | |
344 | "The UDUNITS-2 package provides support for units of physical quantities. | |
345 | Its three main components are: | |
346 | ||
347 | @enumerate | |
348 | @item @code{udunits2lib}, a C library for units of physical quantities; | |
349 | @item @code{udunits2prog}, a utility for obtaining the definition of a unit | |
350 | and for converting numeric values between compatible units; and | |
351 | @item an extensive database of units. | |
352 | @end enumerate\n") | |
353 | ;; Like the BSD-3 license but with an extra anti patent clause. | |
354 | (license (license:non-copyleft "file://COPYRIGHT")))) | |
07592c77 PN |
355 | |
356 | (define-public libfixposix | |
357 | (package | |
358 | (name "libfixposix") | |
359 | (version "0.4.3") | |
360 | (home-page "https://github.com/sionescu/libfixposix") | |
361 | (source | |
362 | (origin | |
363 | (method git-fetch) | |
364 | (uri (git-reference | |
365 | (url home-page) | |
366 | (commit (string-append "v" version)))) | |
367 | (file-name (git-file-name name version)) | |
368 | (sha256 | |
369 | (base32 | |
370 | "1x4q6yspi5g2s98vq4qszw4z3zjgk9l5zs8471w4d4cs6l97w08j")))) | |
371 | (build-system gnu-build-system) | |
372 | (native-inputs | |
8394619b | 373 | (list autoconf automake libtool pkg-config check)) |
13cc3da6 PN |
374 | (native-search-paths |
375 | (list | |
376 | (search-path-specification | |
377 | (variable "C_INCLUDE_PATH") | |
378 | (files '("include"))))) | |
07592c77 PN |
379 | (synopsis "Thin wrapper over POSIX syscalls") |
380 | (description | |
381 | "The purpose of libfixposix is to offer replacements for parts of POSIX | |
382 | whose behaviour is inconsistent across *NIX flavours.") | |
383 | (license license:boost1.0))) | |
f170603e GLV |
384 | |
385 | (define-public libhx | |
386 | (package | |
387 | (name "libhx") | |
31d037ec | 388 | (version "4.3") |
f170603e GLV |
389 | (source |
390 | (origin | |
391 | (method url-fetch) | |
29b9c2e6 | 392 | (uri (string-append "https://inai.de/files/libhx/" |
f170603e GLV |
393 | "libHX-" version ".tar.xz")) |
394 | (sha256 | |
31d037ec | 395 | (base32 "06zkzaya6j3vaafz80qcgn5qcri047003bhmjisv5sbikcw97jqy")))) |
f170603e | 396 | (build-system gnu-build-system) |
29b9c2e6 | 397 | (home-page "https://inai.de/projects/libhx/") |
f170603e GLV |
398 | (synopsis "C library with common data structures and functions") |
399 | (description | |
400 | "This is a C library (with some C++ bindings available) that provides data | |
401 | structures and functions commonly needed, such as maps, deques, linked lists, | |
402 | string formatting and autoresizing, option and config file parsing, type | |
403 | checking casts and more.") | |
404 | (license license:lgpl2.1+))) | |
7adb5299 | 405 | |
9acf79b2 MC |
406 | (define-public libwuya |
407 | ;; This commit is the one before "wuy_pool.h" was removed from libwuya, | |
408 | ;; which libleak currently requires. | |
409 | (let ((revision "1") | |
410 | (commit "883502041044f4616cfbf75c8f2bb60059f704a9")) | |
411 | (package | |
412 | (name "libwuya") | |
413 | (version (git-version "0.0" revision commit)) | |
414 | (source (origin | |
415 | (method git-fetch) | |
416 | (uri (git-reference | |
417 | (url "https://github.com/WuBingzheng/libwuya") | |
418 | (commit commit))) | |
419 | (file-name (git-file-name name version)) | |
420 | (sha256 | |
421 | (base32 | |
422 | "1xrsqbgr13g2v0ag165ryp7xrwzv41xfygzk2a3445ca98c1qpdc")))) | |
423 | (build-system gnu-build-system) | |
424 | (arguments | |
425 | `(#:tests? #f ;no test suite | |
426 | #:phases (modify-phases %standard-phases | |
427 | (add-after 'unpack 'patch-lua-includes | |
428 | (lambda _ | |
429 | (substitute* '("wuy_cflua.h" "wuy_cflua.c") | |
430 | (("<lua5\\.1/") "<")) | |
431 | #t)) | |
432 | (add-after 'unpack 'add--fPIC-to-CFLAGS | |
433 | (lambda _ | |
434 | (substitute* "Makefile" | |
435 | (("CFLAGS[^\n]*" all) | |
436 | (string-append all " -fPIC"))) | |
437 | #t)) | |
438 | (add-before 'build 'set-CC | |
439 | (lambda _ | |
440 | (setenv "CC" "gcc") | |
441 | #t)) | |
442 | (delete 'configure) ;no configure script | |
443 | (replace 'install | |
444 | (lambda* (#:key outputs #:allow-other-keys) | |
445 | (let* ((out (assoc-ref outputs "out")) | |
446 | (include-dir (string-append out "/include")) | |
447 | (headers (find-files "." "\\.h$"))) | |
448 | (for-each (lambda (h) | |
449 | (install-file h include-dir)) | |
450 | headers) | |
451 | (install-file "libwuya.a" (string-append out "/lib")) | |
452 | #t)))))) | |
8394619b | 453 | (inputs (list lua)) |
9acf79b2 MC |
454 | (home-page "https://github.com/WuBingzheng/libwuya/") |
455 | (synopsis "C library implementing various data structures") | |
456 | (description "The @code{libwuya} library implements data structures such | |
457 | as dictionaries, skip lists, and memory pools.") | |
458 | ;; There is no clear information as to what license this is distributed | |
459 | ;; under, but it is included (bundled) with libleak from the same author | |
460 | ;; under the GNU GPL v2 or later license, so use this here until it is | |
461 | ;; clarified (see: https://github.com/WuBingzheng/libwuya/issues/2). | |
462 | (license license:gpl2+)))) | |
463 | ||
d1c6b097 MB |
464 | (define-public packcc |
465 | (package | |
466 | (name "packcc") | |
4230b47c | 467 | (version "1.8.0") |
8eea80d8 | 468 | (home-page "https://github.com/arithy/packcc") |
d1c6b097 MB |
469 | (source (origin |
470 | (method git-fetch) | |
471 | (uri (git-reference | |
472 | (url home-page) | |
473 | (commit (string-append "v" version)))) | |
474 | (file-name (git-file-name name version)) | |
475 | (sha256 | |
476 | (base32 | |
4230b47c | 477 | "0b25p7ri1l2l20awyknljfnj7r4rg7cf2x3bljijx5q6j8rxdcsg")))) |
d1c6b097 MB |
478 | (build-system gnu-build-system) |
479 | (arguments | |
8eea80d8 | 480 | '(#:phases (modify-phases %standard-phases |
d1c6b097 | 481 | (delete 'configure) |
8eea80d8 MB |
482 | (add-before 'build 'chdir |
483 | (lambda _ | |
484 | (chdir "build/gcc"))) | |
485 | (add-before 'check 'pre-check | |
486 | (lambda _ | |
487 | (setenv "CC" "gcc") | |
488 | ;; The style tests are supposed to be skipped when | |
489 | ;; uncrustify is unavailable, but a stray version | |
490 | ;; check prevents it from working. This can be | |
491 | ;; removed for future versions of PackCC. | |
492 | (substitute* "../../tests/style.d/style.bats" | |
493 | (("^[[:blank:]]+check_uncrustify_version") | |
494 | "")))) | |
d1c6b097 MB |
495 | (replace 'install |
496 | (lambda* (#:key outputs #:allow-other-keys) | |
497 | (let ((out (assoc-ref outputs "out"))) | |
8eea80d8 MB |
498 | (install-file "release/bin/packcc" |
499 | (string-append out "/bin")) | |
500 | (install-file "../../README.md" | |
8161c61a | 501 | (string-append out "/share/doc/packcc")))))))) |
8eea80d8 | 502 | (native-inputs |
8394619b | 503 | (list bats)) |
d1c6b097 MB |
504 | (synopsis "Packrat parser generator for C") |
505 | (description | |
506 | "PackCC is a packrat parser generator for the C programming language. | |
507 | Its main features are: | |
508 | @itemize | |
509 | @item Generates a parser in C from a grammar described in a PEG. | |
510 | @item Gives your parser great efficiency by packrat parsing. | |
511 | @item Supports direct and indirect left-recursive grammar rules. | |
512 | @end itemize | |
513 | The grammar of your parser can be described in a @acronym{PEG, Parsing | |
514 | Expression Grammar}. The PEG is a top-down parsing language, and is similar | |
515 | to the regular-expression grammar. The PEG does not require tokenization to | |
516 | be a separate step, and tokenization rules can be written in the same way as | |
517 | any other grammar rules.") | |
518 | (license license:expat))) | |
519 | ||
7adb5299 JN |
520 | (define-public sparse |
521 | (package | |
522 | (name "sparse") | |
08e32249 | 523 | (version "0.6.4") |
7adb5299 JN |
524 | (source (origin |
525 | (method url-fetch) | |
526 | (uri | |
527 | (string-append "mirror://kernel.org/software/devel/sparse/dist/" | |
528 | "sparse-" version ".tar.xz")) | |
529 | (sha256 | |
530 | (base32 | |
08e32249 | 531 | "0z1qds52144nvsdnl82r3zs3vax618v920jmffyyssmwj54qpcka")))) |
7adb5299 | 532 | (build-system gnu-build-system) |
8394619b | 533 | (inputs (list perl)) |
7adb5299 JN |
534 | (arguments |
535 | '(#:make-flags `(,(string-append "PREFIX=" (assoc-ref %outputs "out"))) | |
536 | #:phases (modify-phases %standard-phases | |
537 | (delete 'configure) | |
538 | (add-after 'unpack 'patch-cgcc | |
539 | (lambda _ | |
540 | (substitute* "cgcc" | |
08e32249 | 541 | (("'cc'") (string-append "'" (which "gcc") "'")))))))) |
7adb5299 JN |
542 | (synopsis "Semantic C parser for Linux development") |
543 | (description | |
544 | "Sparse is a semantic parser for C and is required for Linux development. | |
545 | It provides a compiler frontend capable of parsing most of ANSI C as well as | |
546 | many GCC extensions, and a collection of sample compiler backends, including a | |
547 | static analyzer also called @file{sparse}. Sparse provides a set of | |
548 | annotations designed to convey semantic information about types, such as what | |
549 | address space pointers point to, or what locks a function acquires or | |
550 | releases.") | |
551 | (home-page "https://sparse.wiki.kernel.org/index.php/Main_Page") | |
552 | (license license:expat))) | |
70a49ef7 KCB |
553 | |
554 | (define-public libestr | |
555 | (package | |
556 | (name "libestr") | |
557 | (version "0.1.11") | |
558 | (source | |
559 | (origin | |
560 | (method git-fetch) | |
561 | (uri (git-reference | |
b0e7b699 | 562 | (url "https://github.com/rsyslog/libestr") |
70a49ef7 KCB |
563 | (commit (string-append "v" version)))) |
564 | (file-name (git-file-name name version)) | |
565 | (sha256 | |
566 | (base32 | |
567 | "1ca4rj90c0dn7kqpbcchkflxjw88a7rxcnwbr0gply4a28i01nd8")))) | |
568 | (build-system gnu-build-system) | |
569 | (arguments | |
570 | `(#:phases | |
571 | (modify-phases %standard-phases | |
572 | ;; autogen.sh calls configure at the end of the script. | |
573 | (replace 'bootstrap | |
574 | (lambda _ (invoke "autoreconf" "-vfi")))))) | |
575 | (native-inputs | |
8394619b | 576 | (list autoconf automake pkg-config libtool)) |
70a49ef7 KCB |
577 | (home-page "https://github.com/rsyslog/libestr") |
578 | (synopsis "Helper functions for handling strings") | |
579 | (description | |
580 | "This C library contains some essential string manipulation functions and | |
581 | more, like escaping special characters.") | |
582 | (license license:lgpl2.1+))) | |
0aee6e51 KCB |
583 | |
584 | (define-public libfastjson | |
585 | (package | |
586 | (name "libfastjson") | |
362d4787 | 587 | (version "0.99.9") |
0aee6e51 KCB |
588 | (source |
589 | (origin | |
590 | (method git-fetch) | |
591 | (uri (git-reference | |
b0e7b699 | 592 | (url "https://github.com/rsyslog/libfastjson") |
0aee6e51 KCB |
593 | (commit (string-append "v" version)))) |
594 | (file-name (git-file-name name version)) | |
595 | (sha256 | |
362d4787 | 596 | (base32 "12rqcdqxazw8czzxbivdapdgj19pcswpw1jp2915sxbljis83g6q")))) |
0aee6e51 KCB |
597 | (build-system gnu-build-system) |
598 | (native-inputs | |
8394619b | 599 | (list autoconf automake libtool)) |
0aee6e51 KCB |
600 | (home-page "https://github.com/rsyslog/libfastjson") |
601 | (synopsis "Fast JSON library for C") | |
602 | (description | |
603 | "libfastjson is a fork from json-c aiming to provide: a small library | |
604 | with essential JSON handling functions, sufficiently good JSON support (not | |
605 | 100% standards compliant), and very fast processing.") | |
606 | (license license:expat))) | |
7def5056 KCB |
607 | |
608 | (define-public liblogging | |
609 | (package | |
610 | (name "liblogging") | |
611 | (version "1.0.6") | |
612 | (source | |
613 | (origin | |
614 | (method git-fetch) | |
615 | (uri (git-reference | |
b0e7b699 | 616 | (url "https://github.com/rsyslog/liblogging") |
7def5056 KCB |
617 | (commit (string-append "v" version)))) |
618 | (file-name (git-file-name name version)) | |
619 | (sha256 | |
620 | (base32 | |
621 | "1l32m0y65svf5vxsgw935jnqs6842rcqr56dmzwqvr00yfrjhjkp")))) | |
622 | (build-system gnu-build-system) | |
623 | (arguments | |
624 | `(#:phases | |
625 | (modify-phases %standard-phases | |
626 | ;; autogen.sh calls configure at the end of the script. | |
627 | (replace 'bootstrap | |
628 | (lambda _ (invoke "autoreconf" "-vfi")))))) | |
629 | (native-inputs | |
8394619b LC |
630 | (list autoconf |
631 | automake | |
632 | pkg-config | |
633 | libtool | |
634 | ;; For rst2man.py | |
635 | python-docutils)) | |
7def5056 KCB |
636 | (home-page "https://github.com/rsyslog/liblogging") |
637 | (synopsis "Easy to use and lightweight signal-safe logging library") | |
638 | (description | |
639 | "Liblogging is an easy to use library for logging. It offers an enhanced | |
640 | replacement for the syslog() call, but retains its ease of use.") | |
641 | (license license:bsd-2))) | |
5bc13b8e | 642 | |
d4228481 KCB |
643 | (define-public liblognorm |
644 | (package | |
645 | (name "liblognorm") | |
646 | (version "2.0.6") | |
647 | (source | |
648 | (origin | |
649 | (method git-fetch) | |
650 | (uri (git-reference | |
651 | (url "https://github.com/rsyslog/liblognorm.git") | |
652 | (commit (string-append "v" version)))) | |
653 | (file-name (git-file-name name version)) | |
654 | (sha256 | |
655 | (base32 | |
656 | "1pyy1swvq6jj12aqma42jimv71z8m66zy6ydd5v19cp2azm4krml")))) | |
657 | (build-system gnu-build-system) | |
658 | (arguments | |
659 | (list | |
660 | #:parallel-tests? #false ;not supported | |
661 | #:phases | |
662 | '(modify-phases %standard-phases | |
663 | ;; These tests fail because tmp.rulebase is never created. This | |
664 | ;; looks rather harmless. | |
665 | (add-after 'unpack 'delete-failing-tests | |
666 | (lambda _ | |
667 | (substitute* "tests/Makefile.am" | |
668 | (("string_rb_simple.sh ") "") | |
669 | (("string_rb_simple_2_lines.sh ") ""))))))) | |
670 | (inputs | |
671 | (list json-c libestr libfastjson)) | |
672 | (native-inputs | |
673 | (list autoconf automake libtool pkg-config)) | |
674 | (home-page "https://www.liblognorm.com") | |
675 | (synopsis "Fast samples-based log normalization library") | |
676 | (description | |
677 | "Liblognorm normalizes event data into well-defined name-value pairs and | |
678 | a set of tags describing the message.") | |
679 | ;; liblognorm is very slowly transitioning to ASL2.0 | |
680 | ;; See https://github.com/rsyslog/liblognorm/issues/329 | |
681 | (license license:lgpl2.1+))) | |
682 | ||
5bc13b8e MC |
683 | (define-public unifdef |
684 | (package | |
685 | (name "unifdef") | |
686 | (version "2.12") | |
687 | (source (origin | |
688 | (method url-fetch) | |
689 | ;; https://dotat.at/prog/unifdef/unifdef-2.12.tar.xz | |
690 | (uri (string-append "https://dotat.at/prog/" name "/" | |
691 | name "-" version ".tar.xz")) | |
692 | (sha256 | |
693 | (base32 | |
694 | "00647bp3m9n01ck6ilw6r24fk4mivmimamvm4hxp5p6wxh10zkj3")) | |
695 | (modules '((guix build utils))) | |
696 | (snippet | |
697 | '(begin (delete-file-recursively "FreeBSD") | |
698 | (delete-file-recursively "win32") | |
699 | #t)))) | |
700 | (build-system gnu-build-system) | |
701 | (arguments | |
702 | `(#:phases (modify-phases %standard-phases | |
703 | (delete 'configure)) | |
40e95456 EF |
704 | #:make-flags (list (string-append "CC=" ,(cc-for-target)) |
705 | (string-append "prefix=" %output)) | |
5bc13b8e MC |
706 | #:tests? #f)) ;no test suite |
707 | (native-inputs | |
8394619b | 708 | (list perl)) |
5bc13b8e MC |
709 | (home-page "https://dotat.at/prog/unifdef/") |
710 | (synopsis "Utility to selectively processes conditional C preprocessor") | |
711 | (description "The @command{unifdef} utility selectively processes | |
712 | conditional C preprocessor @code{#if} and @code{#ifdef} directives. It | |
713 | removes from a file both the directives and the additional text that they | |
714 | delimit, while otherwise leaving the file alone. It can be useful for | |
715 | avoiding distractions when studying code that uses @code{#ifdef} heavily for | |
716 | portability.") | |
717 | (license (list license:bsd-2 ;all files except... | |
718 | license:bsd-3)))) ;...the unidef.1 manual page | |
5f998a5c | 719 | |
312879fd FCW |
720 | (define-public byacc |
721 | (package | |
722 | (name "byacc") | |
f226e051 | 723 | (version "20220128") |
312879fd FCW |
724 | (source (origin |
725 | (method url-fetch) | |
726 | (uri (string-append | |
727 | "https://invisible-mirror.net/archives/byacc/byacc-" | |
728 | version ".tgz")) | |
729 | (sha256 | |
730 | (base32 | |
f226e051 | 731 | "173l5pdzgqk2ld6lf0ablii0iiw07sry2vrjfrm4wc99qmf81ha2")))) |
312879fd FCW |
732 | (build-system gnu-build-system) |
733 | (home-page "https://invisible-island.net/byacc/byacc.html") | |
734 | (synopsis "Berkeley Yacc LALR parser generator") | |
735 | (description | |
736 | "Berkeley Yacc is an LALR(1) parser generator. Yacc reads the grammar | |
737 | specification from a file and generates an LALR(1) parser for it. The parsers | |
738 | consist of a set of LALR(1) parsing tables and a driver routine written in the | |
739 | C programming language.") | |
740 | (license license:public-domain))) | |
741 | ||
5f998a5c GH |
742 | (define-public aws-c-common |
743 | (package | |
744 | (name "aws-c-common") | |
acbf5b10 | 745 | ;; Update only when updating aws-crt-cpp. |
f796dc92 | 746 | (version "0.6.20") |
5f998a5c GH |
747 | (source (origin |
748 | (method git-fetch) | |
749 | (uri (git-reference | |
750 | (url (string-append "https://github.com/awslabs/" name)) | |
751 | (commit (string-append "v" version)))) | |
752 | (file-name (git-file-name name version)) | |
753 | (sha256 | |
754 | (base32 | |
f796dc92 | 755 | "089grcj58n4xs41kmnpaqpwsalcisjbqqb5yqahxxyfx2lf1j9c9")))) |
5f998a5c | 756 | (build-system cmake-build-system) |
9d541e97 GH |
757 | (arguments |
758 | '(#:configure-flags | |
759 | '("-DBUILD_SHARED_LIBS=ON"))) | |
5f998a5c | 760 | (synopsis "Amazon Web Services core C library") |
acbf5b10 | 761 | (supported-systems '("i686-linux" "x86_64-linux")) |
5f998a5c GH |
762 | (description |
763 | "This library provides common C99 primitives, configuration, data | |
764 | structures, and error handling for the @acronym{AWS,Amazon Web Services} SDK.") | |
765 | (home-page "https://github.com/awslabs/aws-c-common") | |
766 | (license license:asl2.0))) | |
4c66a8de GH |
767 | |
768 | (define-public aws-checksums | |
769 | (package | |
770 | (name "aws-checksums") | |
a9b4d69c | 771 | ;; Update only when updating aws-crt-cpp. |
1ea17412 | 772 | (version "0.1.12") |
4c66a8de GH |
773 | (source (origin |
774 | (method git-fetch) | |
775 | (uri (git-reference | |
776 | (url (string-append "https://github.com/awslabs/" name)) | |
777 | (commit (string-append "v" version)))) | |
778 | (file-name (git-file-name name version)) | |
779 | (sha256 | |
780 | (base32 | |
14f54059 | 781 | "054f2hkmkxhw83q7zsz349k82xk6bkrvlsab088pf7kn9wd4hy4k")))) |
4c66a8de | 782 | (build-system cmake-build-system) |
cc95d03e GH |
783 | (arguments |
784 | '(#:configure-flags | |
14f54059 GH |
785 | (list "-DBUILD_SHARED_LIBS=ON" |
786 | (string-append "-DCMAKE_PREFIX_PATH=" | |
787 | (assoc-ref %build-inputs "aws-c-common"))))) | |
4c66a8de | 788 | (inputs |
8394619b | 789 | (list aws-c-common)) |
4c66a8de GH |
790 | (synopsis "Amazon Web Services checksum library") |
791 | (description | |
792 | "This library provides cross-Platform hardware accelerated CRC32c and CRC32 | |
793 | with fallback to efficient C99 software implementations.") | |
794 | (home-page "https://github.com/awslabs/aws-checksums") | |
795 | (license license:asl2.0))) | |
ddab5244 GH |
796 | |
797 | (define-public aws-c-event-stream | |
798 | (package | |
799 | (name "aws-c-event-stream") | |
4dbb1520 | 800 | ;; Update only when updating aws-crt-cpp. |
97190845 | 801 | (version "0.2.7") |
ddab5244 GH |
802 | (source (origin |
803 | (method git-fetch) | |
804 | (uri (git-reference | |
805 | (url (string-append "https://github.com/awslabs/" name)) | |
806 | (commit (string-append "v" version)))) | |
807 | (file-name (git-file-name name version)) | |
808 | (sha256 | |
809 | (base32 | |
963ebbc6 | 810 | "0xwwr7gdgfrphk6j7vk12rgimfim6m4qnj6hg8hgg16cplhvsfzh")))) |
ddab5244 | 811 | (build-system cmake-build-system) |
97190845 GH |
812 | (arguments |
813 | '(#:configure-flags | |
963ebbc6 GH |
814 | (list "-DBUILD_SHARED_LIBS=ON" |
815 | (string-append "-DCMAKE_PREFIX_PATH=" | |
816 | (assoc-ref %build-inputs "aws-c-common"))))) | |
ddab5244 | 817 | (propagated-inputs |
8394619b | 818 | (list aws-c-common aws-c-io aws-checksums)) |
ddab5244 | 819 | (inputs |
8394619b | 820 | (list aws-c-cal s2n)) |
ddab5244 GH |
821 | (synopsis "Amazon Web Services client-server message format library") |
822 | (description | |
823 | "This library is a C99 implementation for @acronym{AWS,Amazon Web Services} | |
824 | event stream encoding, a binary format for bidirectional client-server | |
825 | communication.") | |
826 | (home-page "https://github.com/awslabs/aws-c-event-stream") | |
827 | (license license:asl2.0))) | |
748e2ec0 | 828 | |
8ea7b6f9 GH |
829 | (define-public aws-c-io |
830 | (package | |
831 | (name "aws-c-io") | |
d230c670 | 832 | ;; Update only when updating aws-crt-cpp. |
7c45af91 | 833 | (version "0.10.20") |
8ea7b6f9 GH |
834 | (source (origin |
835 | (method git-fetch) | |
836 | (uri (git-reference | |
837 | (url (string-append "https://github.com/awslabs/" name)) | |
838 | (commit (string-append "v" version)))) | |
839 | (file-name (git-file-name name version)) | |
840 | (sha256 | |
841 | (base32 | |
7c45af91 | 842 | "07l5rfbm1irkigfv51sfygs992af8rxicmay97frbx6z21khdjnr")))) |
8ea7b6f9 GH |
843 | (build-system cmake-build-system) |
844 | (arguments | |
845 | '(#:configure-flags | |
2a32dedf GH |
846 | (list "-DBUILD_SHARED_LIBS=ON" |
847 | (string-append "-DCMAKE_PREFIX_PATH=" | |
848 | (assoc-ref %build-inputs "aws-c-common")) | |
849 | "-DENABLE_NET_TESTS=OFF"))) | |
8ea7b6f9 | 850 | (propagated-inputs |
8394619b | 851 | (list aws-c-cal aws-c-common s2n)) |
8ea7b6f9 GH |
852 | (synopsis "Event driven framework for implementing application protocols") |
853 | (description "This library provides a C99 framework for constructing | |
854 | event-driven, asynchronous network application protocols.") | |
855 | (home-page "https://github.com/awslabs/aws-c-io") | |
856 | (license license:asl2.0))) | |
857 | ||
748e2ec0 GH |
858 | (define-public aws-c-cal |
859 | (package | |
860 | (name "aws-c-cal") | |
c7805de4 | 861 | ;; Update only when updating aws-crt-cpp. |
139970c8 | 862 | (version "0.5.17") |
748e2ec0 GH |
863 | (source (origin |
864 | (method git-fetch) | |
865 | (uri (git-reference | |
866 | (url (string-append "https://github.com/awslabs/" name)) | |
867 | (commit (string-append "v" version)))) | |
868 | (file-name (git-file-name name version)) | |
869 | (sha256 | |
870 | (base32 | |
139970c8 | 871 | "0gd7xfzv509vcysifzfa8j2rykkc1prhiry7953snblkzm7airm5")))) |
748e2ec0 GH |
872 | (build-system cmake-build-system) |
873 | (arguments | |
874 | '(#:configure-flags | |
4ff5cd6b GH |
875 | (list "-DBUILD_SHARED_LIBS=ON" |
876 | (string-append "-DCMAKE_PREFIX_PATH=" | |
877 | (assoc-ref %build-inputs "aws-c-common"))))) | |
748e2ec0 | 878 | (propagated-inputs |
8394619b | 879 | (list aws-c-common)) |
748e2ec0 GH |
880 | (inputs |
881 | `(("openssl" ,openssl) | |
882 | ("openssl:static" ,openssl "static"))) | |
883 | (synopsis "Amazon Web Services Crypto Abstraction Layer") | |
884 | (description "This library provides a C99 wrapper for hash, HMAC, and ECC | |
885 | cryptographic primitives for the @acronym{AWS,Amazon Web Services} SDK.") | |
886 | (home-page "https://github.com/awslabs/aws-c-cal") | |
887 | (license license:asl2.0))) | |
1be97fa9 | 888 | |
4bd4c53a GH |
889 | (define-public aws-c-sdkutils |
890 | (package | |
891 | (name "aws-c-sdkutils") | |
e8f2855d | 892 | ;; Update only when updating aws-crt-cpp. |
4bd4c53a GH |
893 | (version "0.1.2") |
894 | (source (origin | |
895 | (method git-fetch) | |
896 | (uri (git-reference | |
897 | (url (string-append "https://github.com/awslabs/" name)) | |
898 | (commit (string-append "v" version)))) | |
899 | (file-name (git-file-name name version)) | |
900 | (sha256 | |
901 | (base32 | |
902 | "14wpl3dxwjbbzas44v6m6m3ll89rgz34x9gb140qz624gwzs9v0v")))) | |
903 | (build-system cmake-build-system) | |
904 | (arguments | |
905 | '(#:configure-flags | |
906 | (list "-DBUILD_SHARED_LIBS=ON" | |
907 | (string-append "-DCMAKE_PREFIX_PATH=" | |
908 | (assoc-ref %build-inputs "aws-c-common"))))) | |
909 | (propagated-inputs | |
910 | (list aws-c-common)) | |
911 | (synopsis "Amazon Web Service utility library") | |
912 | (description "This library provides for parsing and management of profiles | |
913 | for the @acronym{AWS,Amazon Web Services} SDK.") | |
914 | (home-page "https://github.com/awslabs/aws-c-sdkutils") | |
915 | (license license:asl2.0))) | |
916 | ||
1be97fa9 DD |
917 | (define-public pcl |
918 | (package | |
919 | (name "pcl") | |
920 | (version "1.12") | |
921 | (source | |
922 | (origin | |
923 | (method url-fetch) | |
924 | (uri (string-append | |
925 | "http://www.xmailserver.org/pcl-" version ".tar.gz")) | |
926 | (sha256 | |
927 | (base32 | |
928 | "06ly65rq4iyj2p4704i215c8y4rgspwl8sxfaifmf4ahfr30bcz7")))) | |
929 | (build-system gnu-build-system) | |
930 | (home-page "http://www.xmailserver.org/libpcl.html") | |
931 | (synopsis "Portable Coroutine Library") | |
932 | (description "The @acronym{PCL, Portable Coroutine Library} implements the | |
933 | low level functionality for coroutines.") | |
934 | (license license:gpl2+))) | |
d9b8cfd6 GH |
935 | |
936 | (define-public aws-c-http | |
937 | (package | |
938 | (name "aws-c-http") | |
d7c8a835 | 939 | ;; Update only when updating aws-crt-cpp. |
fbf14355 | 940 | (version "0.6.13") |
d9b8cfd6 GH |
941 | (source (origin |
942 | (method git-fetch) | |
943 | (uri (git-reference | |
944 | (url (string-append "https://github.com/awslabs/" name)) | |
945 | (commit (string-append "v" version)))) | |
946 | (file-name (git-file-name name version)) | |
947 | (sha256 | |
948 | (base32 | |
fbf14355 | 949 | "125glc9b3906r95519zqfbzzz6wj5ib4im2n45yxrigwkkpffbq9")))) |
d9b8cfd6 GH |
950 | (build-system cmake-build-system) |
951 | (arguments | |
952 | '(#:configure-flags | |
1a0ed460 GH |
953 | (list "-DBUILD_SHARED_LIBS=ON" |
954 | (string-append "-DCMAKE_PREFIX_PATH=" | |
955 | (assoc-ref %build-inputs "aws-c-common")) | |
956 | "-DENABLE_NET_TESTS=OFF"))) | |
d9b8cfd6 | 957 | (propagated-inputs |
8394619b | 958 | (list aws-c-compression aws-c-io)) |
d9b8cfd6 GH |
959 | (synopsis "Amazon Web Services HTTP library") |
960 | (description | |
961 | "This library provides a C99 implementation of the HTTP/1.1 and HTTP/2 | |
962 | specifications.") | |
963 | (home-page "https://github.com/awslabs/aws-c-http") | |
964 | (license license:asl2.0))) | |
2069238c GH |
965 | |
966 | (define-public aws-c-compression | |
967 | (package | |
968 | (name "aws-c-compression") | |
b8c4bb3e | 969 | ;; Update only when updating aws-crt-cpp. |
cff8a12a | 970 | (version "0.2.14") |
2069238c GH |
971 | (source (origin |
972 | (method git-fetch) | |
973 | (uri (git-reference | |
974 | (url (string-append "https://github.com/awslabs/" name)) | |
975 | (commit (string-append "v" version)))) | |
976 | (file-name (git-file-name name version)) | |
977 | (sha256 | |
978 | (base32 | |
cff8a12a | 979 | "0fs3zhhzxsb9nfcjpvfbcq79hal7si2ia1c09scab9a8m264f4vd")))) |
2069238c GH |
980 | (build-system cmake-build-system) |
981 | (arguments | |
982 | '(#:configure-flags | |
cff8a12a GH |
983 | (list "-DBUILD_SHARED_LIBS=ON" |
984 | (string-append "-DCMAKE_PREFIX_PATH=" | |
985 | (assoc-ref %build-inputs "aws-c-common"))))) | |
2069238c | 986 | (propagated-inputs |
8394619b | 987 | (list aws-c-common)) |
2069238c GH |
988 | (synopsis "Amazon Web Services compression library") |
989 | (description | |
990 | "This library provides a C99 implementation of compression algorithms, | |
991 | currently limited to Huffman encoding and decoding.") | |
992 | (home-page "https://github.com/awslabs/aws-c-compression") | |
993 | (license license:asl2.0))) | |
1f1bb634 GH |
994 | |
995 | (define-public aws-c-auth | |
996 | (package | |
997 | (name "aws-c-auth") | |
d62c1019 | 998 | ;; Update only when updating aws-crt-cpp. |
d2cb3f99 | 999 | (version "0.6.11") |
1f1bb634 GH |
1000 | (source (origin |
1001 | (method git-fetch) | |
1002 | (uri (git-reference | |
1003 | (url (string-append "https://github.com/awslabs/" name)) | |
1004 | (commit (string-append "v" version)))) | |
1005 | (file-name (git-file-name name version)) | |
1006 | (sha256 | |
1007 | (base32 | |
d2cb3f99 | 1008 | "0frfnbifkrib9l68mj92a3g1x8xc8hpdlzbga2a801zgf2flx4fy")) |
1f1bb634 GH |
1009 | (patches |
1010 | (search-patches | |
05be89ac | 1011 | "aws-c-auth-install-private-headers.patch")))) |
1f1bb634 GH |
1012 | (build-system cmake-build-system) |
1013 | (arguments | |
1014 | '(#:configure-flags | |
05be89ac GH |
1015 | (list "-DBUILD_SHARED_LIBS=ON" |
1016 | (string-append "-DCMAKE_PREFIX_PATH=" | |
1017 | (assoc-ref %build-inputs "aws-c-common")) | |
1018 | "-DENABLE_NET_TESTS=OFF"))) | |
1f1bb634 | 1019 | (propagated-inputs |
d2cb3f99 | 1020 | (list aws-c-cal aws-c-common aws-c-http aws-c-io aws-c-sdkutils)) |
1f1bb634 GH |
1021 | (synopsis "Amazon Web Services client-side authentication library") |
1022 | (description | |
1023 | "This library provides a C99 implementation for AWS client-side | |
1024 | authentication.") | |
1025 | (home-page "https://github.com/awslabs/aws-c-auth") | |
1026 | (license license:asl2.0))) | |
b3c1c37d GH |
1027 | |
1028 | (define-public aws-c-s3 | |
1029 | (package | |
1030 | (name "aws-c-s3") | |
b62d4872 | 1031 | ;; Update only when updating aws-crt-cpp. |
4773664e | 1032 | (version "0.1.38") |
b3c1c37d GH |
1033 | (source (origin |
1034 | (method git-fetch) | |
1035 | (uri (git-reference | |
1036 | (url (string-append "https://github.com/awslabs/" name)) | |
1037 | (commit (string-append "v" version)))) | |
1038 | (file-name (git-file-name name version)) | |
1039 | (sha256 | |
1040 | (base32 | |
4773664e | 1041 | "0n2y8hzb1bx3vnzlpb5hsav18dg33pwav0mpji6krz98y2l8msya")))) |
b3c1c37d GH |
1042 | (build-system cmake-build-system) |
1043 | (arguments | |
1044 | '(#:configure-flags | |
2d613547 GH |
1045 | (list "-DBUILD_SHARED_LIBS=ON" |
1046 | (string-append "-DCMAKE_PREFIX_PATH=" | |
1047 | (assoc-ref %build-inputs "aws-c-common")) | |
1048 | "-DENABLE_NET_TESTS=OFF"))) | |
b3c1c37d | 1049 | (propagated-inputs |
4773664e | 1050 | (list aws-c-auth aws-c-http aws-checksums)) |
b3c1c37d GH |
1051 | (synopsis "Amazon Web Services client library for Amazon S3") |
1052 | (description | |
1053 | "This library provides a C99 client implementation of the Simple Storage | |
1054 | Service (S3) protocol for object storage.") | |
1055 | (home-page "https://github.com/awslabs/aws-c-s3") | |
1056 | (license license:asl2.0))) | |
2a0fcc31 GH |
1057 | |
1058 | (define-public aws-c-mqtt | |
1059 | (package | |
1060 | (name "aws-c-mqtt") | |
a822f3e2 | 1061 | ;; Update only when updating aws-crt-cpp. |
fe75dc25 | 1062 | (version "0.7.10") |
2a0fcc31 GH |
1063 | (source (origin |
1064 | (method git-fetch) | |
1065 | (uri (git-reference | |
1066 | (url (string-append "https://github.com/awslabs/" name)) | |
1067 | (commit (string-append "v" version)))) | |
1068 | (file-name (git-file-name name version)) | |
1069 | (sha256 | |
1070 | (base32 | |
fe75dc25 | 1071 | "0qmzx8b4wcsq9s99q2zrhx1s3jdmfy8zs16qys9bqv45gspi3ybr")))) |
2a0fcc31 GH |
1072 | (build-system cmake-build-system) |
1073 | (arguments | |
1074 | '(#:configure-flags | |
d5c9f52a GH |
1075 | (list "-DBUILD_SHARED_LIBS=ON" |
1076 | (string-append "-DCMAKE_PREFIX_PATH=" | |
1077 | (assoc-ref %build-inputs "aws-c-common"))))) | |
2a0fcc31 | 1078 | (propagated-inputs |
8394619b | 1079 | (list aws-c-http aws-c-io)) |
2a0fcc31 GH |
1080 | (synopsis "Amazon Web Services MQTT library") |
1081 | (description | |
1082 | "This library provides a C99 implementation of the Message Queuing | |
1083 | Telemetry Transport (MQTT) publish-subscribe messaging protocol.") | |
1084 | (home-page "https://github.com/awslabs/aws-c-mqtt") | |
1085 | (license license:asl2.0))) | |
93c974d1 | 1086 | |
7fabdffc KLM |
1087 | ;; Note: there is another mimalloc embedded in rust-mimalloc (version 1.6.4). |
1088 | (define-public mimalloc | |
1089 | (package | |
1090 | (name "mimalloc") | |
1091 | (version "2.0.6") | |
1092 | (source (origin | |
1093 | (method git-fetch) | |
1094 | (uri (git-reference | |
1095 | (url "https://github.com/microsoft/mimalloc") | |
1096 | (commit (string-append "v" version)))) | |
1097 | (file-name (git-file-name name version)) | |
1098 | (sha256 | |
1099 | (base32 | |
1100 | "05x2dl3zimflfj91ns3vrphmzpdlyyr230p9adqgfds101f16qmv")))) | |
1101 | (build-system cmake-build-system) | |
1102 | (arguments | |
1103 | `(#:build-type "Release")) | |
1104 | (synopsis "General purpose memory allocator") | |
1105 | (description "@code{mimalloc} is a drop-in replacement for @code{malloc}.") | |
1106 | (home-page "https://microsoft.github.io/mimalloc/") | |
1107 | (license license:expat))) | |
1108 | ||
7be44e85 MC |
1109 | ;;; Factored out of the ck package so that it can be adjusted and called on |
1110 | ;;; the host side easily, without impacting the package definition. | |
1111 | (define (gnu-triplet->ck-machine target) | |
1112 | (letrec-syntax | |
1113 | ((matches (syntax-rules (=>) | |
1114 | ((_ (target-prefix => machine) rest ...) | |
1115 | (if (string-prefix? target-prefix target) | |
1116 | machine | |
1117 | (matches rest ...))) | |
1118 | ((_) | |
1119 | (error "unsupported target" target))))) | |
1120 | ;; This basically reproduces the logic handling the | |
1121 | ;; PLATFORM variable in the configure script of ck. | |
1122 | (matches ("x86_64" => "x86_64") | |
1123 | ("i586" => "x86") | |
1124 | ("i686" => "x86") | |
1125 | ("aarch64" => "aarch64") | |
1126 | ("arm" => "arm") | |
1127 | ("ppc64" => "ppc64") | |
1128 | ("ppc" => "ppc") | |
1129 | ("s390x" => "s390x") | |
1130 | ("sparc64" => "sparcv9")))) | |
1131 | ||
1132 | (define-public ck | |
1133 | (package | |
1134 | (name "ck") | |
1135 | (version "0.7.1") | |
1136 | (source (origin | |
1137 | (method git-fetch) | |
1138 | (uri (git-reference | |
1139 | (url "https://github.com/concurrencykit/ck") | |
1140 | (commit version))) | |
1141 | (file-name (git-file-name name version)) | |
1142 | (sha256 | |
1143 | (base32 | |
1144 | "020yzfpvymdc8lc44znlnxmxb8mvp42g4nb4p8k814klazqvwh0x")))) | |
1145 | (build-system gnu-build-system) | |
1146 | (arguments | |
1147 | (list | |
1148 | #:phases | |
1149 | #~(modify-phases %standard-phases | |
1150 | (replace 'configure | |
1151 | ;; ck uses a custom configure script that stumbles on | |
1152 | ;; '--enable-fast-install', among other things. | |
1153 | (lambda* (#:key parallel-build? #:allow-other-keys) | |
1154 | (define target-machine #$(and=> (%current-target-system) | |
1155 | gnu-triplet->ck-machine)) | |
1156 | (when target-machine | |
1157 | ;; The configure script doesn't currently work for | |
1158 | ;; cross-compiling (see: | |
1159 | ;; https://github.com/concurrencykit/ck/issues/191). | |
1160 | (error "ck cannot currently be cross-compiled")) | |
1161 | ;; The custom configure script doesn't make cross-compilation | |
1162 | ;; adjustments itself, so manually set the archiver, compiler | |
1163 | ;; and linker. | |
1164 | (setenv "AR" #$(ar-for-target)) | |
1165 | (setenv "CC" #$(cc-for-target)) | |
1166 | (setenv "LD" #$(ld-for-target)) | |
1167 | (apply invoke "./configure" | |
1168 | `(,@(if target-machine | |
1169 | (list (string-append "--profile=" target-machine)) | |
1170 | '()) | |
1171 | ,(string-append "--prefix=" #$output) | |
1172 | ,(string-append "--mandir=" #$output "/share/man") | |
1173 | ,(string-append "--cores=" | |
1174 | (if parallel-build? | |
1175 | (number->string (parallel-job-count)) | |
1176 | "1"))))))))) | |
1177 | (home-page "https://github.com/concurrencykit/ck") | |
1178 | (synopsis "C library for concurrent systems") | |
1179 | (description "Concurrency Kit (@code{ck}) provides concurrency primitives, | |
1180 | safe memory reclamation mechanisms and non-blocking (including lock-free) data | |
1181 | structures designed to aid in the research, design and implementation of high | |
1182 | performance concurrent systems developed in C99+.") | |
1183 | (license (list license:bsd-2 ;everything except... | |
1184 | license:asl2.0)))) ;src/ck_hp.c | |
1185 | ||
c59d3d67 HC |
1186 | (define-public libdispatch |
1187 | (package | |
1188 | (name "libdispatch") | |
1189 | (version "5.7") | |
1190 | (source | |
1191 | (origin | |
1192 | (method git-fetch) | |
1193 | (uri (git-reference | |
1194 | (url "https://github.com/apple/swift-corelibs-libdispatch") | |
1195 | (commit (string-append "swift-" version "-RELEASE")))) | |
1196 | (file-name (git-file-name name version)) | |
1197 | (sha256 | |
1198 | (base32 | |
1199 | "0skg1azbhbg7y0ql2a5sx6lmfip8l1rajqm95zzf9xv45n4dg9nn")))) | |
1200 | (build-system cmake-build-system) | |
1201 | (arguments | |
1202 | (list #:phases | |
1203 | #~(modify-phases %standard-phases | |
1204 | ;; Use Clang instead of GCC. | |
1205 | (add-before 'configure 'prepare-build-environment | |
1206 | (lambda _ | |
1207 | (setenv "AR" "llvm-ar") | |
1208 | (setenv "NM" "llvm-nm") | |
1209 | (setenv "CC" "clang") | |
1210 | (setenv "CXX" "clang++")))))) | |
1211 | (native-inputs (list clang llvm)) | |
1212 | (home-page "https://apple.github.io/swift-corelibs-libdispatch/") | |
1213 | (synopsis "Concurrent code execution on multicore hardware") | |
1214 | (description | |
1215 | "Grand Central Dispatch (GCD or libdispatch) implements a concurrency model | |
1216 | wherein program tasks are divided into work items. These can be run | |
1217 | sequentially or in parallel, with optional synchronization in between, and GCD | |
1218 | will take care of dispatching tasks to available cores.") | |
1219 | (license license:asl2.0))) | |
1220 | ||
93c974d1 MC |
1221 | (define-public utf8-h |
1222 | ;; The latest tag is used as there is no release. | |
1223 | (let ((commit "500d4ea9f4c3449e5243c088d8af8700f7189734") | |
1224 | (revision "0")) | |
1225 | (package | |
1226 | (name "utf8-h") | |
1227 | (version (git-version "0.0.0" revision commit)) | |
1228 | (source (origin | |
1229 | (method git-fetch) | |
1230 | (uri (git-reference | |
1231 | (url "https://github.com/sheredom/utf8.h") | |
1232 | (commit commit))) | |
1233 | (file-name (git-file-name "utf8.h" version)) | |
1234 | (sha256 | |
1235 | (base32 | |
1236 | "0x9f7ivww8c7cigf4ck0hfx2bm79qgx6q4ccwzqbzkrmcrl9shfb")))) | |
1237 | (build-system cmake-build-system) | |
1238 | (arguments | |
1239 | `(#:phases | |
1240 | (modify-phases %standard-phases | |
1241 | (delete 'build) | |
1242 | (delete 'configure) | |
1243 | (replace 'check | |
1244 | (lambda* (#:key tests? #:allow-other-keys) | |
1245 | (when tests? | |
1246 | (with-directory-excursion "test" | |
1247 | (invoke "cmake" ".") | |
1248 | (invoke "make"))))) | |
1249 | (replace 'install | |
1250 | (lambda* (#:key outputs #:allow-other-keys) | |
1251 | (let ((out (assoc-ref outputs "out"))) | |
1252 | (install-file "utf8.h" (string-append out "/include")))))))) | |
1253 | (home-page "https://github.com/sheredom/utf8.h") | |
1254 | (synopsis "Single header UTF-8 string functions for C and C++") | |
1255 | (description "A simple one header solution to supporting UTF-8 strings in | |
1256 | C and C++. The functions it provides are like those from the C header | |
1257 | string.h, but with a utf8* prefix instead of the str* prefix.") | |
1258 | (license license:unlicense)))) | |
91a51765 AP |
1259 | |
1260 | (define-public utest-h | |
1261 | ;; The latest commit is used as there is no release. | |
1262 | (let ((commit "54458e248f875f1a51f0af8bec8ca6ae7761b9d1") | |
1263 | (revision "0")) | |
1264 | (package | |
1265 | (name "utest-h") | |
1266 | (version (git-version "0.0.0" revision commit)) | |
1267 | (source (origin | |
1268 | (method git-fetch) | |
1269 | (uri (git-reference | |
1270 | (url "https://github.com/sheredom/utest.h") | |
1271 | (commit commit))) | |
1272 | (file-name (git-file-name "utest.h" version)) | |
1273 | (sha256 | |
1274 | (base32 | |
1275 | "1ikl5jwmjdw1mblqyl2kvnqwkjgaz78c1h7mjcfmzjc0d3h8kh44")))) | |
1276 | (build-system cmake-build-system) | |
1277 | (arguments | |
1278 | `(#:phases (modify-phases %standard-phases | |
1279 | (delete 'build) | |
1280 | (delete 'configure) | |
1281 | (replace 'check | |
1282 | (lambda* (#:key tests? #:allow-other-keys) | |
1283 | (when tests? | |
1284 | (with-directory-excursion "test" | |
1285 | (invoke "cmake" ".") | |
1286 | (invoke "make"))))) | |
1287 | (replace 'install | |
1288 | (lambda* (#:key outputs #:allow-other-keys) | |
1289 | (let ((out (assoc-ref outputs "out"))) | |
1290 | (install-file "utest.h" | |
1291 | (string-append out "/include")))))))) | |
1292 | (home-page "https://www.duskborn.com/utest_h/") | |
1293 | (synopsis "Single-header unit testing framework for C and C++") | |
1294 | (description | |
1295 | "This package provides a header-only unit testing library for C/C++.") | |
1296 | (license license:unlicense)))) |