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> |
48dafe7d | 4 | ;;; Copyright © 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr> |
07592c77 | 5 | ;;; Copyright © 2018, 2019 Pierre Neidhardt <mail@ambrevar.xyz> |
40e95456 | 6 | ;;; Copyright © 2019, 2020 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> |
a5e2c9a9 LC |
15 | ;;; |
16 | ;;; This file is part of GNU Guix. | |
17 | ;;; | |
18 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
19 | ;;; under the terms of the GNU General Public License as published by | |
20 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
21 | ;;; your option) any later version. | |
22 | ;;; | |
23 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
24 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
25 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
26 | ;;; GNU General Public License for more details. | |
27 | ;;; | |
28 | ;;; You should have received a copy of the GNU General Public License | |
29 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
30 | ||
31 | (define-module (gnu packages c) | |
32 | #:use-module ((guix licenses) #:prefix license:) | |
d4228481 | 33 | #:use-module (guix gexp) |
40e95456 | 34 | #:use-module (guix utils) |
a5e2c9a9 LC |
35 | #:use-module (guix packages) |
36 | #:use-module (guix download) | |
c229fb3d | 37 | #:use-module (guix git-download) |
5f998a5c | 38 | #:use-module (guix build-system cmake) |
a5e2c9a9 | 39 | #:use-module (guix build-system gnu) |
9f088725 | 40 | #:use-module (guix build-system trivial) |
7be44e85 | 41 | #:use-module (guix store) |
4c66a8de | 42 | #:use-module (gnu packages) |
8eea80d8 | 43 | #:use-module (gnu packages bash) |
a5e2c9a9 | 44 | #:use-module (gnu packages bootstrap) |
f0316832 | 45 | #:use-module (gnu packages bison) |
07592c77 | 46 | #:use-module (gnu packages check) |
f0316832 | 47 | #:use-module (gnu packages flex) |
a5e2c9a9 | 48 | #:use-module (gnu packages perl) |
9f088725 | 49 | #:use-module (gnu packages texinfo) |
97b7201f | 50 | #:use-module (gnu packages guile) |
9acf79b2 | 51 | #:use-module (gnu packages lua) |
c229fb3d PN |
52 | #:use-module (gnu packages multiprecision) |
53 | #:use-module (gnu packages pcre) | |
54 | #:use-module (gnu packages python) | |
7def5056 | 55 | #:use-module (gnu packages python-xyz) |
c229fb3d PN |
56 | #:use-module (gnu packages autotools) |
57 | #:use-module (gnu packages gettext) | |
011ec1e5 | 58 | #:use-module (gnu packages pkg-config) |
748e2ec0 | 59 | #:use-module (gnu packages tls) |
d4228481 | 60 | #:use-module (gnu packages web) |
011ec1e5 | 61 | #:use-module (gnu packages xml)) |
a5e2c9a9 LC |
62 | |
63 | (define-public tcc | |
64 | (package | |
65 | (name "tcc") ;aka. "tinycc" | |
5d0bd1fb | 66 | (version "0.9.27") |
a5e2c9a9 LC |
67 | (source (origin |
68 | (method url-fetch) | |
69 | (uri (string-append "mirror://savannah/tinycc/tcc-" | |
70 | version ".tar.bz2")) | |
71 | (sha256 | |
72 | (base32 | |
5d0bd1fb | 73 | "177bdhwzrnqgyrdv1dwvpd04fcxj68s5pm1dzwny6359ziway8yy")))) |
a5e2c9a9 | 74 | (build-system gnu-build-system) |
8394619b | 75 | (native-inputs (list perl texinfo)) |
a5e2c9a9 LC |
76 | (arguments |
77 | `(#:configure-flags (list (string-append "--elfinterp=" | |
78 | (assoc-ref %build-inputs "libc") | |
79 | ,(glibc-dynamic-linker)) | |
80 | (string-append "--crtprefix=" | |
81 | (assoc-ref %build-inputs "libc") | |
82 | "/lib") | |
83 | (string-append "--sysincludepaths=" | |
84 | (assoc-ref %build-inputs "libc") | |
85 | "/include:" | |
86 | (assoc-ref %build-inputs | |
ce430bd6 | 87 | "kernel-headers") |
a5e2c9a9 LC |
88 | "/include:{B}/include") |
89 | (string-append "--libpaths=" | |
90 | (assoc-ref %build-inputs "libc") | |
9117d6df EF |
91 | "/lib") |
92 | ,@(if (string-prefix? "armhf-linux" | |
93 | (or (%current-target-system) | |
94 | (%current-system))) | |
95 | `("--triplet=arm-linux-gnueabihf") | |
96 | '())) | |
a5e2c9a9 | 97 | #:test-target "test")) |
4c16ffd3 AE |
98 | (native-search-paths |
99 | (list (search-path-specification | |
100 | (variable "CPATH") | |
101 | (files '("include"))) | |
102 | (search-path-specification | |
103 | (variable "LIBRARY_PATH") | |
104 | (files '("lib" "lib64"))))) | |
57a31efb | 105 | ;; Fails to build on MIPS: "Unsupported CPU" |
0270b24b | 106 | (supported-systems (delete "mips64el-linux" %supported-systems)) |
a5e2c9a9 LC |
107 | (synopsis "Tiny and fast C compiler") |
108 | (description | |
109 | "TCC, also referred to as \"TinyCC\", is a small and fast C compiler | |
110 | written in C. It supports ANSI C with GNU and extensions and most of the C99 | |
111 | standard.") | |
112 | (home-page "http://www.tinycc.org/") | |
5d0bd1fb TGR |
113 | ;; An attempt to re-licence tcc under the Expat licence is underway but not |
114 | ;; (if ever) complete. See the RELICENSING file for more information. | |
a5e2c9a9 | 115 | (license license:lgpl2.1+))) |
9f088725 | 116 | |
f0316832 RW |
117 | (define-public pcc |
118 | (package | |
119 | (name "pcc") | |
120 | (version "20170109") | |
121 | (source (origin | |
122 | (method url-fetch) | |
123 | (uri (string-append "http://pcc.ludd.ltu.se/ftp/pub/pcc/pcc-" | |
124 | version ".tgz")) | |
125 | (sha256 | |
126 | (base32 | |
127 | "1p34w496095mi0473f815w6wbi57zxil106mg7pj6sg6gzpjcgww")))) | |
128 | (build-system gnu-build-system) | |
129 | (arguments | |
130 | `(#:phases | |
131 | (modify-phases %standard-phases | |
132 | (replace 'check | |
9c30cba4 | 133 | (lambda _ (invoke "make" "-C" "cc/cpp" "test") #t))))) |
f0316832 | 134 | (native-inputs |
8394619b | 135 | (list bison flex)) |
f0316832 RW |
136 | (synopsis "Portable C compiler") |
137 | (description | |
138 | "PCC is a portable C compiler. The project goal is to write a C99 | |
139 | compiler while still keeping it small, simple, fast and understandable.") | |
140 | (home-page "http://pcc.ludd.ltu.se") | |
6a052473 | 141 | (supported-systems (delete "aarch64-linux" %supported-systems)) |
f0316832 RW |
142 | ;; PCC incorporates code under various BSD licenses; for new code bsd-2 is |
143 | ;; preferred. See http://pcc.ludd.ltu.se/licenses/ for more details. | |
144 | (license (list license:bsd-2 license:bsd-3)))) | |
c229fb3d PN |
145 | |
146 | (define-public libbytesize | |
147 | (package | |
148 | (name "libbytesize") | |
e48390cb | 149 | (version "2.2") |
c229fb3d PN |
150 | (source (origin |
151 | (method url-fetch) | |
152 | (uri (string-append | |
94617bdd TGR |
153 | "https://github.com/storaged-project/libbytesize/releases/" |
154 | "download/" version "/libbytesize-" version ".tar.gz")) | |
c229fb3d PN |
155 | (sha256 |
156 | (base32 | |
e48390cb | 157 | "1aivwypmnqcaj2230pifvf3jcgl5chja8rspkxf0j3480asm8g5r")))) |
c229fb3d | 158 | (build-system gnu-build-system) |
bf6859e4 | 159 | (arguments |
2414997a | 160 | `(#:tests? #f)) |
c229fb3d PN |
161 | (native-inputs |
162 | `(("gettext" ,gettext-minimal) | |
163 | ("pkg-config" ,pkg-config) | |
164 | ("python" ,python))) | |
165 | (inputs | |
8394619b | 166 | (list mpfr pcre2)) |
c229fb3d PN |
167 | (home-page "https://github.com/storaged-project/libbytesize") |
168 | (synopsis "Tiny C library for working with arbitrary big sizes in bytes") | |
169 | (description | |
170 | "The goal of this project is to provide a tiny library that would | |
171 | facilitate the common operations with sizes in bytes. Many projects need to | |
172 | work with sizes in bytes (be it sizes of storage space, memory...) and all of | |
173 | them need to deal with the same issues like: | |
174 | ||
175 | @itemize | |
176 | @item How to get a human-readable string for the given size? | |
177 | @item How to store the given size so that no significant information is lost? | |
178 | @item If we store the size in bytes, what if the given size gets over the | |
179 | MAXUINT64 value? | |
180 | @item How to interpret sizes entered by users according to their locale and | |
181 | typing conventions? | |
182 | @item How to deal with the decimal/binary units (MB versus MiB) ambiguity? | |
183 | @end itemize | |
184 | ||
185 | @code{libbytesize} offers a generally usable solution that could be used by | |
186 | every project that needs to deal with sizes in bytes. It is written in the C | |
187 | language with thin bindings for other languages.") | |
188 | (license license:lgpl2.1+))) | |
011ec1e5 RW |
189 | |
190 | (define-public udunits | |
191 | (package | |
192 | (name "udunits") | |
0dca2e63 TGR |
193 | ;; Four-part version numbers are development snapshots, not releases. See |
194 | ;; <https://github.com/Unidata/UDUNITS-2/issues/99#issuecomment-732323472>. | |
48dafe7d | 195 | (version "2.2.28") |
011ec1e5 RW |
196 | (source (origin |
197 | (method url-fetch) | |
198 | (uri (string-append "ftp://ftp.unidata.ucar.edu/pub/udunits/" | |
199 | "udunits-" version ".tar.gz")) | |
200 | (sha256 | |
201 | (base32 | |
48dafe7d | 202 | "17jpbp6f0rr132jn2gqy8ry8mv1w27v6dyhfq1igv8v1674aw2sr")))) |
011ec1e5 | 203 | (build-system gnu-build-system) |
2a7dce4f TGR |
204 | (arguments |
205 | `(#:configure-flags | |
206 | (list "--disable-static"))) | |
011ec1e5 | 207 | (inputs |
8394619b | 208 | (list expat)) |
011ec1e5 RW |
209 | (home-page "https://www.unidata.ucar.edu/software/udunits/") |
210 | (synopsis "C library for units of physical quantities and value-conversion utils") | |
211 | (description | |
212 | "The UDUNITS-2 package provides support for units of physical quantities. | |
213 | Its three main components are: | |
214 | ||
215 | @enumerate | |
216 | @item @code{udunits2lib}, a C library for units of physical quantities; | |
217 | @item @code{udunits2prog}, a utility for obtaining the definition of a unit | |
218 | and for converting numeric values between compatible units; and | |
219 | @item an extensive database of units. | |
220 | @end enumerate\n") | |
221 | ;; Like the BSD-3 license but with an extra anti patent clause. | |
222 | (license (license:non-copyleft "file://COPYRIGHT")))) | |
07592c77 PN |
223 | |
224 | (define-public libfixposix | |
225 | (package | |
226 | (name "libfixposix") | |
227 | (version "0.4.3") | |
228 | (home-page "https://github.com/sionescu/libfixposix") | |
229 | (source | |
230 | (origin | |
231 | (method git-fetch) | |
232 | (uri (git-reference | |
233 | (url home-page) | |
234 | (commit (string-append "v" version)))) | |
235 | (file-name (git-file-name name version)) | |
236 | (sha256 | |
237 | (base32 | |
238 | "1x4q6yspi5g2s98vq4qszw4z3zjgk9l5zs8471w4d4cs6l97w08j")))) | |
239 | (build-system gnu-build-system) | |
240 | (native-inputs | |
8394619b | 241 | (list autoconf automake libtool pkg-config check)) |
07592c77 PN |
242 | (synopsis "Thin wrapper over POSIX syscalls") |
243 | (description | |
244 | "The purpose of libfixposix is to offer replacements for parts of POSIX | |
245 | whose behaviour is inconsistent across *NIX flavours.") | |
246 | (license license:boost1.0))) | |
f170603e GLV |
247 | |
248 | (define-public libhx | |
249 | (package | |
250 | (name "libhx") | |
a7e73852 | 251 | (version "4.2") |
f170603e GLV |
252 | (source |
253 | (origin | |
254 | (method url-fetch) | |
29b9c2e6 | 255 | (uri (string-append "https://inai.de/files/libhx/" |
f170603e GLV |
256 | "libHX-" version ".tar.xz")) |
257 | (sha256 | |
a7e73852 | 258 | (base32 "1ri3sxiw5a8br27j7f20s40kihfvq6mmxzcrx68zydiwyxjvf5jj")))) |
f170603e | 259 | (build-system gnu-build-system) |
29b9c2e6 | 260 | (home-page "https://inai.de/projects/libhx/") |
f170603e GLV |
261 | (synopsis "C library with common data structures and functions") |
262 | (description | |
263 | "This is a C library (with some C++ bindings available) that provides data | |
264 | structures and functions commonly needed, such as maps, deques, linked lists, | |
265 | string formatting and autoresizing, option and config file parsing, type | |
266 | checking casts and more.") | |
267 | (license license:lgpl2.1+))) | |
7adb5299 | 268 | |
9acf79b2 MC |
269 | (define-public libwuya |
270 | ;; This commit is the one before "wuy_pool.h" was removed from libwuya, | |
271 | ;; which libleak currently requires. | |
272 | (let ((revision "1") | |
273 | (commit "883502041044f4616cfbf75c8f2bb60059f704a9")) | |
274 | (package | |
275 | (name "libwuya") | |
276 | (version (git-version "0.0" revision commit)) | |
277 | (source (origin | |
278 | (method git-fetch) | |
279 | (uri (git-reference | |
280 | (url "https://github.com/WuBingzheng/libwuya") | |
281 | (commit commit))) | |
282 | (file-name (git-file-name name version)) | |
283 | (sha256 | |
284 | (base32 | |
285 | "1xrsqbgr13g2v0ag165ryp7xrwzv41xfygzk2a3445ca98c1qpdc")))) | |
286 | (build-system gnu-build-system) | |
287 | (arguments | |
288 | `(#:tests? #f ;no test suite | |
289 | #:phases (modify-phases %standard-phases | |
290 | (add-after 'unpack 'patch-lua-includes | |
291 | (lambda _ | |
292 | (substitute* '("wuy_cflua.h" "wuy_cflua.c") | |
293 | (("<lua5\\.1/") "<")) | |
294 | #t)) | |
295 | (add-after 'unpack 'add--fPIC-to-CFLAGS | |
296 | (lambda _ | |
297 | (substitute* "Makefile" | |
298 | (("CFLAGS[^\n]*" all) | |
299 | (string-append all " -fPIC"))) | |
300 | #t)) | |
301 | (add-before 'build 'set-CC | |
302 | (lambda _ | |
303 | (setenv "CC" "gcc") | |
304 | #t)) | |
305 | (delete 'configure) ;no configure script | |
306 | (replace 'install | |
307 | (lambda* (#:key outputs #:allow-other-keys) | |
308 | (let* ((out (assoc-ref outputs "out")) | |
309 | (include-dir (string-append out "/include")) | |
310 | (headers (find-files "." "\\.h$"))) | |
311 | (for-each (lambda (h) | |
312 | (install-file h include-dir)) | |
313 | headers) | |
314 | (install-file "libwuya.a" (string-append out "/lib")) | |
315 | #t)))))) | |
8394619b | 316 | (inputs (list lua)) |
9acf79b2 MC |
317 | (home-page "https://github.com/WuBingzheng/libwuya/") |
318 | (synopsis "C library implementing various data structures") | |
319 | (description "The @code{libwuya} library implements data structures such | |
320 | as dictionaries, skip lists, and memory pools.") | |
321 | ;; There is no clear information as to what license this is distributed | |
322 | ;; under, but it is included (bundled) with libleak from the same author | |
323 | ;; under the GNU GPL v2 or later license, so use this here until it is | |
324 | ;; clarified (see: https://github.com/WuBingzheng/libwuya/issues/2). | |
325 | (license license:gpl2+)))) | |
326 | ||
d1c6b097 MB |
327 | (define-public packcc |
328 | (package | |
329 | (name "packcc") | |
8eea80d8 MB |
330 | (version "1.5.0") |
331 | (home-page "https://github.com/arithy/packcc") | |
d1c6b097 MB |
332 | (source (origin |
333 | (method git-fetch) | |
334 | (uri (git-reference | |
335 | (url home-page) | |
336 | (commit (string-append "v" version)))) | |
337 | (file-name (git-file-name name version)) | |
338 | (sha256 | |
339 | (base32 | |
8eea80d8 | 340 | "1n9ivsa6b9ps2jbh34bycjqjpbwbk85l4jjg46pfhqxzz96793wy")))) |
d1c6b097 MB |
341 | (build-system gnu-build-system) |
342 | (arguments | |
8eea80d8 | 343 | '(#:phases (modify-phases %standard-phases |
d1c6b097 | 344 | (delete 'configure) |
8eea80d8 MB |
345 | (add-before 'build 'chdir |
346 | (lambda _ | |
347 | (chdir "build/gcc"))) | |
348 | (add-before 'check 'pre-check | |
349 | (lambda _ | |
350 | (setenv "CC" "gcc") | |
351 | ;; The style tests are supposed to be skipped when | |
352 | ;; uncrustify is unavailable, but a stray version | |
353 | ;; check prevents it from working. This can be | |
354 | ;; removed for future versions of PackCC. | |
355 | (substitute* "../../tests/style.d/style.bats" | |
356 | (("^[[:blank:]]+check_uncrustify_version") | |
357 | "")))) | |
d1c6b097 MB |
358 | (replace 'install |
359 | (lambda* (#:key outputs #:allow-other-keys) | |
360 | (let ((out (assoc-ref outputs "out"))) | |
8eea80d8 MB |
361 | (install-file "release/bin/packcc" |
362 | (string-append out "/bin")) | |
363 | (install-file "../../README.md" | |
d1c6b097 MB |
364 | (string-append out "/share/doc/packcc")) |
365 | #t)))))) | |
8eea80d8 | 366 | (native-inputs |
8394619b | 367 | (list bats)) |
d1c6b097 MB |
368 | (synopsis "Packrat parser generator for C") |
369 | (description | |
370 | "PackCC is a packrat parser generator for the C programming language. | |
371 | Its main features are: | |
372 | @itemize | |
373 | @item Generates a parser in C from a grammar described in a PEG. | |
374 | @item Gives your parser great efficiency by packrat parsing. | |
375 | @item Supports direct and indirect left-recursive grammar rules. | |
376 | @end itemize | |
377 | The grammar of your parser can be described in a @acronym{PEG, Parsing | |
378 | Expression Grammar}. The PEG is a top-down parsing language, and is similar | |
379 | to the regular-expression grammar. The PEG does not require tokenization to | |
380 | be a separate step, and tokenization rules can be written in the same way as | |
381 | any other grammar rules.") | |
382 | (license license:expat))) | |
383 | ||
7adb5299 JN |
384 | (define-public sparse |
385 | (package | |
386 | (name "sparse") | |
08e32249 | 387 | (version "0.6.4") |
7adb5299 JN |
388 | (source (origin |
389 | (method url-fetch) | |
390 | (uri | |
391 | (string-append "mirror://kernel.org/software/devel/sparse/dist/" | |
392 | "sparse-" version ".tar.xz")) | |
393 | (sha256 | |
394 | (base32 | |
08e32249 | 395 | "0z1qds52144nvsdnl82r3zs3vax618v920jmffyyssmwj54qpcka")))) |
7adb5299 | 396 | (build-system gnu-build-system) |
8394619b | 397 | (inputs (list perl)) |
7adb5299 JN |
398 | (arguments |
399 | '(#:make-flags `(,(string-append "PREFIX=" (assoc-ref %outputs "out"))) | |
400 | #:phases (modify-phases %standard-phases | |
401 | (delete 'configure) | |
402 | (add-after 'unpack 'patch-cgcc | |
403 | (lambda _ | |
404 | (substitute* "cgcc" | |
08e32249 | 405 | (("'cc'") (string-append "'" (which "gcc") "'")))))))) |
7adb5299 JN |
406 | (synopsis "Semantic C parser for Linux development") |
407 | (description | |
408 | "Sparse is a semantic parser for C and is required for Linux development. | |
409 | It provides a compiler frontend capable of parsing most of ANSI C as well as | |
410 | many GCC extensions, and a collection of sample compiler backends, including a | |
411 | static analyzer also called @file{sparse}. Sparse provides a set of | |
412 | annotations designed to convey semantic information about types, such as what | |
413 | address space pointers point to, or what locks a function acquires or | |
414 | releases.") | |
415 | (home-page "https://sparse.wiki.kernel.org/index.php/Main_Page") | |
416 | (license license:expat))) | |
70a49ef7 KCB |
417 | |
418 | (define-public libestr | |
419 | (package | |
420 | (name "libestr") | |
421 | (version "0.1.11") | |
422 | (source | |
423 | (origin | |
424 | (method git-fetch) | |
425 | (uri (git-reference | |
b0e7b699 | 426 | (url "https://github.com/rsyslog/libestr") |
70a49ef7 KCB |
427 | (commit (string-append "v" version)))) |
428 | (file-name (git-file-name name version)) | |
429 | (sha256 | |
430 | (base32 | |
431 | "1ca4rj90c0dn7kqpbcchkflxjw88a7rxcnwbr0gply4a28i01nd8")))) | |
432 | (build-system gnu-build-system) | |
433 | (arguments | |
434 | `(#:phases | |
435 | (modify-phases %standard-phases | |
436 | ;; autogen.sh calls configure at the end of the script. | |
437 | (replace 'bootstrap | |
438 | (lambda _ (invoke "autoreconf" "-vfi")))))) | |
439 | (native-inputs | |
8394619b | 440 | (list autoconf automake pkg-config libtool)) |
70a49ef7 KCB |
441 | (home-page "https://github.com/rsyslog/libestr") |
442 | (synopsis "Helper functions for handling strings") | |
443 | (description | |
444 | "This C library contains some essential string manipulation functions and | |
445 | more, like escaping special characters.") | |
446 | (license license:lgpl2.1+))) | |
0aee6e51 KCB |
447 | |
448 | (define-public libfastjson | |
449 | (package | |
450 | (name "libfastjson") | |
362d4787 | 451 | (version "0.99.9") |
0aee6e51 KCB |
452 | (source |
453 | (origin | |
454 | (method git-fetch) | |
455 | (uri (git-reference | |
b0e7b699 | 456 | (url "https://github.com/rsyslog/libfastjson") |
0aee6e51 KCB |
457 | (commit (string-append "v" version)))) |
458 | (file-name (git-file-name name version)) | |
459 | (sha256 | |
362d4787 | 460 | (base32 "12rqcdqxazw8czzxbivdapdgj19pcswpw1jp2915sxbljis83g6q")))) |
0aee6e51 KCB |
461 | (build-system gnu-build-system) |
462 | (native-inputs | |
8394619b | 463 | (list autoconf automake libtool)) |
0aee6e51 KCB |
464 | (home-page "https://github.com/rsyslog/libfastjson") |
465 | (synopsis "Fast JSON library for C") | |
466 | (description | |
467 | "libfastjson is a fork from json-c aiming to provide: a small library | |
468 | with essential JSON handling functions, sufficiently good JSON support (not | |
469 | 100% standards compliant), and very fast processing.") | |
470 | (license license:expat))) | |
7def5056 KCB |
471 | |
472 | (define-public liblogging | |
473 | (package | |
474 | (name "liblogging") | |
475 | (version "1.0.6") | |
476 | (source | |
477 | (origin | |
478 | (method git-fetch) | |
479 | (uri (git-reference | |
b0e7b699 | 480 | (url "https://github.com/rsyslog/liblogging") |
7def5056 KCB |
481 | (commit (string-append "v" version)))) |
482 | (file-name (git-file-name name version)) | |
483 | (sha256 | |
484 | (base32 | |
485 | "1l32m0y65svf5vxsgw935jnqs6842rcqr56dmzwqvr00yfrjhjkp")))) | |
486 | (build-system gnu-build-system) | |
487 | (arguments | |
488 | `(#:phases | |
489 | (modify-phases %standard-phases | |
490 | ;; autogen.sh calls configure at the end of the script. | |
491 | (replace 'bootstrap | |
492 | (lambda _ (invoke "autoreconf" "-vfi")))))) | |
493 | (native-inputs | |
8394619b LC |
494 | (list autoconf |
495 | automake | |
496 | pkg-config | |
497 | libtool | |
498 | ;; For rst2man.py | |
499 | python-docutils)) | |
7def5056 KCB |
500 | (home-page "https://github.com/rsyslog/liblogging") |
501 | (synopsis "Easy to use and lightweight signal-safe logging library") | |
502 | (description | |
503 | "Liblogging is an easy to use library for logging. It offers an enhanced | |
504 | replacement for the syslog() call, but retains its ease of use.") | |
505 | (license license:bsd-2))) | |
5bc13b8e | 506 | |
d4228481 KCB |
507 | (define-public liblognorm |
508 | (package | |
509 | (name "liblognorm") | |
510 | (version "2.0.6") | |
511 | (source | |
512 | (origin | |
513 | (method git-fetch) | |
514 | (uri (git-reference | |
515 | (url "https://github.com/rsyslog/liblognorm.git") | |
516 | (commit (string-append "v" version)))) | |
517 | (file-name (git-file-name name version)) | |
518 | (sha256 | |
519 | (base32 | |
520 | "1pyy1swvq6jj12aqma42jimv71z8m66zy6ydd5v19cp2azm4krml")))) | |
521 | (build-system gnu-build-system) | |
522 | (arguments | |
523 | (list | |
524 | #:parallel-tests? #false ;not supported | |
525 | #:phases | |
526 | '(modify-phases %standard-phases | |
527 | ;; These tests fail because tmp.rulebase is never created. This | |
528 | ;; looks rather harmless. | |
529 | (add-after 'unpack 'delete-failing-tests | |
530 | (lambda _ | |
531 | (substitute* "tests/Makefile.am" | |
532 | (("string_rb_simple.sh ") "") | |
533 | (("string_rb_simple_2_lines.sh ") ""))))))) | |
534 | (inputs | |
535 | (list json-c libestr libfastjson)) | |
536 | (native-inputs | |
537 | (list autoconf automake libtool pkg-config)) | |
538 | (home-page "https://www.liblognorm.com") | |
539 | (synopsis "Fast samples-based log normalization library") | |
540 | (description | |
541 | "Liblognorm normalizes event data into well-defined name-value pairs and | |
542 | a set of tags describing the message.") | |
543 | ;; liblognorm is very slowly transitioning to ASL2.0 | |
544 | ;; See https://github.com/rsyslog/liblognorm/issues/329 | |
545 | (license license:lgpl2.1+))) | |
546 | ||
5bc13b8e MC |
547 | (define-public unifdef |
548 | (package | |
549 | (name "unifdef") | |
550 | (version "2.12") | |
551 | (source (origin | |
552 | (method url-fetch) | |
553 | ;; https://dotat.at/prog/unifdef/unifdef-2.12.tar.xz | |
554 | (uri (string-append "https://dotat.at/prog/" name "/" | |
555 | name "-" version ".tar.xz")) | |
556 | (sha256 | |
557 | (base32 | |
558 | "00647bp3m9n01ck6ilw6r24fk4mivmimamvm4hxp5p6wxh10zkj3")) | |
559 | (modules '((guix build utils))) | |
560 | (snippet | |
561 | '(begin (delete-file-recursively "FreeBSD") | |
562 | (delete-file-recursively "win32") | |
563 | #t)))) | |
564 | (build-system gnu-build-system) | |
565 | (arguments | |
566 | `(#:phases (modify-phases %standard-phases | |
567 | (delete 'configure)) | |
40e95456 EF |
568 | #:make-flags (list (string-append "CC=" ,(cc-for-target)) |
569 | (string-append "prefix=" %output)) | |
5bc13b8e MC |
570 | #:tests? #f)) ;no test suite |
571 | (native-inputs | |
8394619b | 572 | (list perl)) |
5bc13b8e MC |
573 | (home-page "https://dotat.at/prog/unifdef/") |
574 | (synopsis "Utility to selectively processes conditional C preprocessor") | |
575 | (description "The @command{unifdef} utility selectively processes | |
576 | conditional C preprocessor @code{#if} and @code{#ifdef} directives. It | |
577 | removes from a file both the directives and the additional text that they | |
578 | delimit, while otherwise leaving the file alone. It can be useful for | |
579 | avoiding distractions when studying code that uses @code{#ifdef} heavily for | |
580 | portability.") | |
581 | (license (list license:bsd-2 ;all files except... | |
582 | license:bsd-3)))) ;...the unidef.1 manual page | |
5f998a5c GH |
583 | |
584 | (define-public aws-c-common | |
585 | (package | |
586 | (name "aws-c-common") | |
5715a07a | 587 | ; Update only when updating aws-crt-cpp. |
f796dc92 | 588 | (version "0.6.20") |
5f998a5c GH |
589 | (source (origin |
590 | (method git-fetch) | |
591 | (uri (git-reference | |
592 | (url (string-append "https://github.com/awslabs/" name)) | |
593 | (commit (string-append "v" version)))) | |
594 | (file-name (git-file-name name version)) | |
595 | (sha256 | |
596 | (base32 | |
f796dc92 | 597 | "089grcj58n4xs41kmnpaqpwsalcisjbqqb5yqahxxyfx2lf1j9c9")))) |
5f998a5c | 598 | (build-system cmake-build-system) |
9d541e97 GH |
599 | (arguments |
600 | '(#:configure-flags | |
601 | '("-DBUILD_SHARED_LIBS=ON"))) | |
5f998a5c GH |
602 | (synopsis "Amazon Web Services core C library") |
603 | (description | |
604 | "This library provides common C99 primitives, configuration, data | |
605 | structures, and error handling for the @acronym{AWS,Amazon Web Services} SDK.") | |
606 | (home-page "https://github.com/awslabs/aws-c-common") | |
607 | (license license:asl2.0))) | |
4c66a8de GH |
608 | |
609 | (define-public aws-checksums | |
610 | (package | |
611 | (name "aws-checksums") | |
14f54059 | 612 | ; Update only when updating aws-crt-cpp. |
1ea17412 | 613 | (version "0.1.12") |
4c66a8de GH |
614 | (source (origin |
615 | (method git-fetch) | |
616 | (uri (git-reference | |
617 | (url (string-append "https://github.com/awslabs/" name)) | |
618 | (commit (string-append "v" version)))) | |
619 | (file-name (git-file-name name version)) | |
620 | (sha256 | |
621 | (base32 | |
14f54059 | 622 | "054f2hkmkxhw83q7zsz349k82xk6bkrvlsab088pf7kn9wd4hy4k")))) |
4c66a8de | 623 | (build-system cmake-build-system) |
cc95d03e GH |
624 | (arguments |
625 | '(#:configure-flags | |
14f54059 GH |
626 | (list "-DBUILD_SHARED_LIBS=ON" |
627 | (string-append "-DCMAKE_PREFIX_PATH=" | |
628 | (assoc-ref %build-inputs "aws-c-common"))))) | |
4c66a8de | 629 | (inputs |
8394619b | 630 | (list aws-c-common)) |
4c66a8de GH |
631 | (synopsis "Amazon Web Services checksum library") |
632 | (description | |
633 | "This library provides cross-Platform hardware accelerated CRC32c and CRC32 | |
634 | with fallback to efficient C99 software implementations.") | |
635 | (home-page "https://github.com/awslabs/aws-checksums") | |
636 | (license license:asl2.0))) | |
ddab5244 GH |
637 | |
638 | (define-public aws-c-event-stream | |
639 | (package | |
640 | (name "aws-c-event-stream") | |
963ebbc6 | 641 | ; Update only when updating aws-crt-cpp. |
97190845 | 642 | (version "0.2.7") |
ddab5244 GH |
643 | (source (origin |
644 | (method git-fetch) | |
645 | (uri (git-reference | |
646 | (url (string-append "https://github.com/awslabs/" name)) | |
647 | (commit (string-append "v" version)))) | |
648 | (file-name (git-file-name name version)) | |
649 | (sha256 | |
650 | (base32 | |
963ebbc6 | 651 | "0xwwr7gdgfrphk6j7vk12rgimfim6m4qnj6hg8hgg16cplhvsfzh")))) |
ddab5244 | 652 | (build-system cmake-build-system) |
97190845 GH |
653 | (arguments |
654 | '(#:configure-flags | |
963ebbc6 GH |
655 | (list "-DBUILD_SHARED_LIBS=ON" |
656 | (string-append "-DCMAKE_PREFIX_PATH=" | |
657 | (assoc-ref %build-inputs "aws-c-common"))))) | |
ddab5244 | 658 | (propagated-inputs |
8394619b | 659 | (list aws-c-common aws-c-io aws-checksums)) |
ddab5244 | 660 | (inputs |
8394619b | 661 | (list aws-c-cal s2n)) |
ddab5244 GH |
662 | (synopsis "Amazon Web Services client-server message format library") |
663 | (description | |
664 | "This library is a C99 implementation for @acronym{AWS,Amazon Web Services} | |
665 | event stream encoding, a binary format for bidirectional client-server | |
666 | communication.") | |
667 | (home-page "https://github.com/awslabs/aws-c-event-stream") | |
668 | (license license:asl2.0))) | |
748e2ec0 | 669 | |
8ea7b6f9 GH |
670 | (define-public aws-c-io |
671 | (package | |
672 | (name "aws-c-io") | |
2a32dedf | 673 | ; Update only when updating aws-crt-cpp. |
7c45af91 | 674 | (version "0.10.20") |
8ea7b6f9 GH |
675 | (source (origin |
676 | (method git-fetch) | |
677 | (uri (git-reference | |
678 | (url (string-append "https://github.com/awslabs/" name)) | |
679 | (commit (string-append "v" version)))) | |
680 | (file-name (git-file-name name version)) | |
681 | (sha256 | |
682 | (base32 | |
7c45af91 | 683 | "07l5rfbm1irkigfv51sfygs992af8rxicmay97frbx6z21khdjnr")))) |
8ea7b6f9 GH |
684 | (build-system cmake-build-system) |
685 | (arguments | |
686 | '(#:configure-flags | |
2a32dedf GH |
687 | (list "-DBUILD_SHARED_LIBS=ON" |
688 | (string-append "-DCMAKE_PREFIX_PATH=" | |
689 | (assoc-ref %build-inputs "aws-c-common")) | |
690 | "-DENABLE_NET_TESTS=OFF"))) | |
8ea7b6f9 | 691 | (propagated-inputs |
8394619b | 692 | (list aws-c-cal aws-c-common s2n)) |
8ea7b6f9 GH |
693 | (synopsis "Event driven framework for implementing application protocols") |
694 | (description "This library provides a C99 framework for constructing | |
695 | event-driven, asynchronous network application protocols.") | |
696 | (home-page "https://github.com/awslabs/aws-c-io") | |
697 | (license license:asl2.0))) | |
698 | ||
748e2ec0 GH |
699 | (define-public aws-c-cal |
700 | (package | |
701 | (name "aws-c-cal") | |
4ff5cd6b | 702 | ; Update only when updating aws-crt-cpp. |
139970c8 | 703 | (version "0.5.17") |
748e2ec0 GH |
704 | (source (origin |
705 | (method git-fetch) | |
706 | (uri (git-reference | |
707 | (url (string-append "https://github.com/awslabs/" name)) | |
708 | (commit (string-append "v" version)))) | |
709 | (file-name (git-file-name name version)) | |
710 | (sha256 | |
711 | (base32 | |
139970c8 | 712 | "0gd7xfzv509vcysifzfa8j2rykkc1prhiry7953snblkzm7airm5")))) |
748e2ec0 GH |
713 | (build-system cmake-build-system) |
714 | (arguments | |
715 | '(#:configure-flags | |
4ff5cd6b GH |
716 | (list "-DBUILD_SHARED_LIBS=ON" |
717 | (string-append "-DCMAKE_PREFIX_PATH=" | |
718 | (assoc-ref %build-inputs "aws-c-common"))))) | |
748e2ec0 | 719 | (propagated-inputs |
8394619b | 720 | (list aws-c-common)) |
748e2ec0 GH |
721 | (inputs |
722 | `(("openssl" ,openssl) | |
723 | ("openssl:static" ,openssl "static"))) | |
724 | (synopsis "Amazon Web Services Crypto Abstraction Layer") | |
725 | (description "This library provides a C99 wrapper for hash, HMAC, and ECC | |
726 | cryptographic primitives for the @acronym{AWS,Amazon Web Services} SDK.") | |
727 | (home-page "https://github.com/awslabs/aws-c-cal") | |
728 | (license license:asl2.0))) | |
1be97fa9 | 729 | |
4bd4c53a GH |
730 | (define-public aws-c-sdkutils |
731 | (package | |
732 | (name "aws-c-sdkutils") | |
733 | ; Update only when updating aws-crt-cpp. | |
734 | (version "0.1.2") | |
735 | (source (origin | |
736 | (method git-fetch) | |
737 | (uri (git-reference | |
738 | (url (string-append "https://github.com/awslabs/" name)) | |
739 | (commit (string-append "v" version)))) | |
740 | (file-name (git-file-name name version)) | |
741 | (sha256 | |
742 | (base32 | |
743 | "14wpl3dxwjbbzas44v6m6m3ll89rgz34x9gb140qz624gwzs9v0v")))) | |
744 | (build-system cmake-build-system) | |
745 | (arguments | |
746 | '(#:configure-flags | |
747 | (list "-DBUILD_SHARED_LIBS=ON" | |
748 | (string-append "-DCMAKE_PREFIX_PATH=" | |
749 | (assoc-ref %build-inputs "aws-c-common"))))) | |
750 | (propagated-inputs | |
751 | (list aws-c-common)) | |
752 | (synopsis "Amazon Web Service utility library") | |
753 | (description "This library provides for parsing and management of profiles | |
754 | for the @acronym{AWS,Amazon Web Services} SDK.") | |
755 | (home-page "https://github.com/awslabs/aws-c-sdkutils") | |
756 | (license license:asl2.0))) | |
757 | ||
1be97fa9 DD |
758 | (define-public pcl |
759 | (package | |
760 | (name "pcl") | |
761 | (version "1.12") | |
762 | (source | |
763 | (origin | |
764 | (method url-fetch) | |
765 | (uri (string-append | |
766 | "http://www.xmailserver.org/pcl-" version ".tar.gz")) | |
767 | (sha256 | |
768 | (base32 | |
769 | "06ly65rq4iyj2p4704i215c8y4rgspwl8sxfaifmf4ahfr30bcz7")))) | |
770 | (build-system gnu-build-system) | |
771 | (home-page "http://www.xmailserver.org/libpcl.html") | |
772 | (synopsis "Portable Coroutine Library") | |
773 | (description "The @acronym{PCL, Portable Coroutine Library} implements the | |
774 | low level functionality for coroutines.") | |
775 | (license license:gpl2+))) | |
d9b8cfd6 GH |
776 | |
777 | (define-public aws-c-http | |
778 | (package | |
779 | (name "aws-c-http") | |
1a0ed460 | 780 | ; Update only when updating aws-crt-cpp. |
fbf14355 | 781 | (version "0.6.13") |
d9b8cfd6 GH |
782 | (source (origin |
783 | (method git-fetch) | |
784 | (uri (git-reference | |
785 | (url (string-append "https://github.com/awslabs/" name)) | |
786 | (commit (string-append "v" version)))) | |
787 | (file-name (git-file-name name version)) | |
788 | (sha256 | |
789 | (base32 | |
fbf14355 | 790 | "125glc9b3906r95519zqfbzzz6wj5ib4im2n45yxrigwkkpffbq9")))) |
d9b8cfd6 GH |
791 | (build-system cmake-build-system) |
792 | (arguments | |
793 | '(#:configure-flags | |
1a0ed460 GH |
794 | (list "-DBUILD_SHARED_LIBS=ON" |
795 | (string-append "-DCMAKE_PREFIX_PATH=" | |
796 | (assoc-ref %build-inputs "aws-c-common")) | |
797 | "-DENABLE_NET_TESTS=OFF"))) | |
d9b8cfd6 | 798 | (propagated-inputs |
8394619b | 799 | (list aws-c-compression aws-c-io)) |
d9b8cfd6 GH |
800 | (synopsis "Amazon Web Services HTTP library") |
801 | (description | |
802 | "This library provides a C99 implementation of the HTTP/1.1 and HTTP/2 | |
803 | specifications.") | |
804 | (home-page "https://github.com/awslabs/aws-c-http") | |
805 | (license license:asl2.0))) | |
2069238c GH |
806 | |
807 | (define-public aws-c-compression | |
808 | (package | |
809 | (name "aws-c-compression") | |
cff8a12a GH |
810 | ; Update only when updating aws-crt-cpp. |
811 | (version "0.2.14") | |
2069238c GH |
812 | (source (origin |
813 | (method git-fetch) | |
814 | (uri (git-reference | |
815 | (url (string-append "https://github.com/awslabs/" name)) | |
816 | (commit (string-append "v" version)))) | |
817 | (file-name (git-file-name name version)) | |
818 | (sha256 | |
819 | (base32 | |
cff8a12a | 820 | "0fs3zhhzxsb9nfcjpvfbcq79hal7si2ia1c09scab9a8m264f4vd")))) |
2069238c GH |
821 | (build-system cmake-build-system) |
822 | (arguments | |
823 | '(#:configure-flags | |
cff8a12a GH |
824 | (list "-DBUILD_SHARED_LIBS=ON" |
825 | (string-append "-DCMAKE_PREFIX_PATH=" | |
826 | (assoc-ref %build-inputs "aws-c-common"))))) | |
2069238c | 827 | (propagated-inputs |
8394619b | 828 | (list aws-c-common)) |
2069238c GH |
829 | (synopsis "Amazon Web Services compression library") |
830 | (description | |
831 | "This library provides a C99 implementation of compression algorithms, | |
832 | currently limited to Huffman encoding and decoding.") | |
833 | (home-page "https://github.com/awslabs/aws-c-compression") | |
834 | (license license:asl2.0))) | |
1f1bb634 GH |
835 | |
836 | (define-public aws-c-auth | |
837 | (package | |
838 | (name "aws-c-auth") | |
05be89ac GH |
839 | ; Update only when updating aws-crt-cpp. |
840 | (version "0.6.4") | |
1f1bb634 GH |
841 | (source (origin |
842 | (method git-fetch) | |
843 | (uri (git-reference | |
844 | (url (string-append "https://github.com/awslabs/" name)) | |
845 | (commit (string-append "v" version)))) | |
846 | (file-name (git-file-name name version)) | |
847 | (sha256 | |
848 | (base32 | |
05be89ac | 849 | "120p69lj279yq3d2b81f45kgfrvf32j6m7s03m8hh27w8yd4vbfp")) |
1f1bb634 GH |
850 | (patches |
851 | (search-patches | |
05be89ac | 852 | "aws-c-auth-install-private-headers.patch")))) |
1f1bb634 GH |
853 | (build-system cmake-build-system) |
854 | (arguments | |
855 | '(#:configure-flags | |
05be89ac GH |
856 | (list "-DBUILD_SHARED_LIBS=ON" |
857 | (string-append "-DCMAKE_PREFIX_PATH=" | |
858 | (assoc-ref %build-inputs "aws-c-common")) | |
859 | "-DENABLE_NET_TESTS=OFF"))) | |
1f1bb634 | 860 | (propagated-inputs |
8394619b | 861 | (list aws-c-cal aws-c-common aws-c-http aws-c-io)) |
1f1bb634 GH |
862 | (synopsis "Amazon Web Services client-side authentication library") |
863 | (description | |
864 | "This library provides a C99 implementation for AWS client-side | |
865 | authentication.") | |
866 | (home-page "https://github.com/awslabs/aws-c-auth") | |
867 | (license license:asl2.0))) | |
b3c1c37d GH |
868 | |
869 | (define-public aws-c-s3 | |
870 | (package | |
871 | (name "aws-c-s3") | |
2d613547 GH |
872 | ; Update only when updating aws-crt-cpp. |
873 | (version "0.1.26") | |
b3c1c37d GH |
874 | (source (origin |
875 | (method git-fetch) | |
876 | (uri (git-reference | |
877 | (url (string-append "https://github.com/awslabs/" name)) | |
878 | (commit (string-append "v" version)))) | |
879 | (file-name (git-file-name name version)) | |
880 | (sha256 | |
881 | (base32 | |
2d613547 | 882 | "0gaxnwwk0jbvkgjnxcgchq13xmn7jk5vjvjsps6b0vaz6bf12wv8")))) |
b3c1c37d GH |
883 | (build-system cmake-build-system) |
884 | (arguments | |
885 | '(#:configure-flags | |
2d613547 GH |
886 | (list "-DBUILD_SHARED_LIBS=ON" |
887 | (string-append "-DCMAKE_PREFIX_PATH=" | |
888 | (assoc-ref %build-inputs "aws-c-common")) | |
889 | "-DENABLE_NET_TESTS=OFF"))) | |
b3c1c37d | 890 | (propagated-inputs |
8394619b | 891 | (list aws-c-auth aws-c-http)) |
b3c1c37d GH |
892 | (synopsis "Amazon Web Services client library for Amazon S3") |
893 | (description | |
894 | "This library provides a C99 client implementation of the Simple Storage | |
895 | Service (S3) protocol for object storage.") | |
896 | (home-page "https://github.com/awslabs/aws-c-s3") | |
897 | (license license:asl2.0))) | |
2a0fcc31 GH |
898 | |
899 | (define-public aws-c-mqtt | |
900 | (package | |
901 | (name "aws-c-mqtt") | |
d5c9f52a | 902 | ; Update only when updating aws-crt-cpp. |
1632cad6 | 903 | (version "0.7.8") |
2a0fcc31 GH |
904 | (source (origin |
905 | (method git-fetch) | |
906 | (uri (git-reference | |
907 | (url (string-append "https://github.com/awslabs/" name)) | |
908 | (commit (string-append "v" version)))) | |
909 | (file-name (git-file-name name version)) | |
910 | (sha256 | |
911 | (base32 | |
d5c9f52a | 912 | "19j6nw2v36c4yff4p0fbf0748s06fd5r9cp2yakry9ybn1ada99c")))) |
2a0fcc31 GH |
913 | (build-system cmake-build-system) |
914 | (arguments | |
915 | '(#:configure-flags | |
d5c9f52a GH |
916 | (list "-DBUILD_SHARED_LIBS=ON" |
917 | (string-append "-DCMAKE_PREFIX_PATH=" | |
918 | (assoc-ref %build-inputs "aws-c-common"))))) | |
2a0fcc31 | 919 | (propagated-inputs |
8394619b | 920 | (list aws-c-http aws-c-io)) |
2a0fcc31 GH |
921 | (synopsis "Amazon Web Services MQTT library") |
922 | (description | |
923 | "This library provides a C99 implementation of the Message Queuing | |
924 | Telemetry Transport (MQTT) publish-subscribe messaging protocol.") | |
925 | (home-page "https://github.com/awslabs/aws-c-mqtt") | |
926 | (license license:asl2.0))) | |
93c974d1 | 927 | |
7be44e85 MC |
928 | ;;; Factored out of the ck package so that it can be adjusted and called on |
929 | ;;; the host side easily, without impacting the package definition. | |
930 | (define (gnu-triplet->ck-machine target) | |
931 | (letrec-syntax | |
932 | ((matches (syntax-rules (=>) | |
933 | ((_ (target-prefix => machine) rest ...) | |
934 | (if (string-prefix? target-prefix target) | |
935 | machine | |
936 | (matches rest ...))) | |
937 | ((_) | |
938 | (error "unsupported target" target))))) | |
939 | ;; This basically reproduces the logic handling the | |
940 | ;; PLATFORM variable in the configure script of ck. | |
941 | (matches ("x86_64" => "x86_64") | |
942 | ("i586" => "x86") | |
943 | ("i686" => "x86") | |
944 | ("aarch64" => "aarch64") | |
945 | ("arm" => "arm") | |
946 | ("ppc64" => "ppc64") | |
947 | ("ppc" => "ppc") | |
948 | ("s390x" => "s390x") | |
949 | ("sparc64" => "sparcv9")))) | |
950 | ||
951 | (define-public ck | |
952 | (package | |
953 | (name "ck") | |
954 | (version "0.7.1") | |
955 | (source (origin | |
956 | (method git-fetch) | |
957 | (uri (git-reference | |
958 | (url "https://github.com/concurrencykit/ck") | |
959 | (commit version))) | |
960 | (file-name (git-file-name name version)) | |
961 | (sha256 | |
962 | (base32 | |
963 | "020yzfpvymdc8lc44znlnxmxb8mvp42g4nb4p8k814klazqvwh0x")))) | |
964 | (build-system gnu-build-system) | |
965 | (arguments | |
966 | (list | |
967 | #:phases | |
968 | #~(modify-phases %standard-phases | |
969 | (replace 'configure | |
970 | ;; ck uses a custom configure script that stumbles on | |
971 | ;; '--enable-fast-install', among other things. | |
972 | (lambda* (#:key parallel-build? #:allow-other-keys) | |
973 | (define target-machine #$(and=> (%current-target-system) | |
974 | gnu-triplet->ck-machine)) | |
975 | (when target-machine | |
976 | ;; The configure script doesn't currently work for | |
977 | ;; cross-compiling (see: | |
978 | ;; https://github.com/concurrencykit/ck/issues/191). | |
979 | (error "ck cannot currently be cross-compiled")) | |
980 | ;; The custom configure script doesn't make cross-compilation | |
981 | ;; adjustments itself, so manually set the archiver, compiler | |
982 | ;; and linker. | |
983 | (setenv "AR" #$(ar-for-target)) | |
984 | (setenv "CC" #$(cc-for-target)) | |
985 | (setenv "LD" #$(ld-for-target)) | |
986 | (apply invoke "./configure" | |
987 | `(,@(if target-machine | |
988 | (list (string-append "--profile=" target-machine)) | |
989 | '()) | |
990 | ,(string-append "--prefix=" #$output) | |
991 | ,(string-append "--mandir=" #$output "/share/man") | |
992 | ,(string-append "--cores=" | |
993 | (if parallel-build? | |
994 | (number->string (parallel-job-count)) | |
995 | "1"))))))))) | |
996 | (home-page "https://github.com/concurrencykit/ck") | |
997 | (synopsis "C library for concurrent systems") | |
998 | (description "Concurrency Kit (@code{ck}) provides concurrency primitives, | |
999 | safe memory reclamation mechanisms and non-blocking (including lock-free) data | |
1000 | structures designed to aid in the research, design and implementation of high | |
1001 | performance concurrent systems developed in C99+.") | |
1002 | (license (list license:bsd-2 ;everything except... | |
1003 | license:asl2.0)))) ;src/ck_hp.c | |
1004 | ||
93c974d1 MC |
1005 | (define-public utf8-h |
1006 | ;; The latest tag is used as there is no release. | |
1007 | (let ((commit "500d4ea9f4c3449e5243c088d8af8700f7189734") | |
1008 | (revision "0")) | |
1009 | (package | |
1010 | (name "utf8-h") | |
1011 | (version (git-version "0.0.0" revision commit)) | |
1012 | (source (origin | |
1013 | (method git-fetch) | |
1014 | (uri (git-reference | |
1015 | (url "https://github.com/sheredom/utf8.h") | |
1016 | (commit commit))) | |
1017 | (file-name (git-file-name "utf8.h" version)) | |
1018 | (sha256 | |
1019 | (base32 | |
1020 | "0x9f7ivww8c7cigf4ck0hfx2bm79qgx6q4ccwzqbzkrmcrl9shfb")))) | |
1021 | (build-system cmake-build-system) | |
1022 | (arguments | |
1023 | `(#:phases | |
1024 | (modify-phases %standard-phases | |
1025 | (delete 'build) | |
1026 | (delete 'configure) | |
1027 | (replace 'check | |
1028 | (lambda* (#:key tests? #:allow-other-keys) | |
1029 | (when tests? | |
1030 | (with-directory-excursion "test" | |
1031 | (invoke "cmake" ".") | |
1032 | (invoke "make"))))) | |
1033 | (replace 'install | |
1034 | (lambda* (#:key outputs #:allow-other-keys) | |
1035 | (let ((out (assoc-ref outputs "out"))) | |
1036 | (install-file "utf8.h" (string-append out "/include")))))))) | |
1037 | (home-page "https://github.com/sheredom/utf8.h") | |
1038 | (synopsis "Single header UTF-8 string functions for C and C++") | |
1039 | (description "A simple one header solution to supporting UTF-8 strings in | |
1040 | C and C++. The functions it provides are like those from the C header | |
1041 | string.h, but with a utf8* prefix instead of the str* prefix.") | |
1042 | (license license:unlicense)))) |