f00317e949135898c0f1a2a3d89854e7adb6746e
[jackhill/guix/guix.git] / gnu / packages / cpp.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2017 Ethan R. Jones <doubleplusgood23@gmail.com>
3 ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
5 ;;; Copyright © 2018, 2021 Ludovic Courtès <ludo@gnu.org>
6 ;;; Copyright © 2019, 2020, 2022 Mathieu Othacehe <m.othacehe@gmail.com>
7 ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
8 ;;; Copyright © 2019 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
9 ;;; Copyright © 2020, 2021 Nicolò Balzarotti <nicolo@nixo.xyz>
10 ;;; Copyright © 2020 Roel Janssen <roel@gnu.org>
11 ;;; Copyright © 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
12 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
13 ;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
14 ;;; Copyright © 2020, 2022 Marius Bakke <marius@gnu.org>
15 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
16 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
17 ;;; Copyright © 2020-2022 Greg Hogan <code@greghogan.com>
18 ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
19 ;;; Copyright © 2020 Milkey Mouse <milkeymouse@meme.institute>
20 ;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
21 ;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
22 ;;; Copyright © 2021 Nicolò Balzarotti <nicolo@nixo.xyz>
23 ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
24 ;;; Copyright © 2021 Nikolay Korotkiy <sikmir@disroot.org>
25 ;;; Copyright © 2021 jgart <jgart@dismail.de>
26 ;;; Copyright © 2021 Julien Lepiller <julien@lepiller.eu>
27 ;;; Copyright © 2021 Disseminate Dissent <disseminatedissent@protonmail.com>
28 ;;; Copyright © 2022 Efraim Flashner <efraim@flashner.co.il>
29 ;;; Copyright © 2022 muradm <mail@muradm.net>
30 ;;; Copyright © 2022 Attila Lendvai <attila@lendvai.name>
31 ;;; Copyright © 2022 Arun Isaac <arunisaac@systemreboot.net>
32 ;;;
33 ;;; This file is part of GNU Guix.
34 ;;;
35 ;;; GNU Guix is free software; you can redistribute it and/or modify it
36 ;;; under the terms of the GNU General Public License as published by
37 ;;; the Free Software Foundation; either version 3 of the License, or (at
38 ;;; your option) any later version.
39 ;;;
40 ;;; GNU Guix is distributed in the hope that it will be useful, but
41 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
42 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
43 ;;; GNU General Public License for more details.
44 ;;;
45 ;;; You should have received a copy of the GNU General Public License
46 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
47
48 (define-module (gnu packages cpp)
49 #:use-module ((guix licenses) #:prefix license:)
50 #:use-module (guix packages)
51 #:use-module (guix download)
52 #:use-module (guix utils)
53 #:use-module (guix git-download)
54 #:use-module (guix build-system cmake)
55 #:use-module (guix build-system copy)
56 #:use-module (guix build-system gnu)
57 #:use-module (guix build-system meson)
58 #:use-module (guix build-system python)
59 #:use-module (guix modules)
60 #:use-module (guix gexp)
61 #:use-module (gnu packages)
62 #:use-module (gnu packages autotools)
63 #:use-module (gnu packages boost)
64 #:use-module (gnu packages build-tools)
65 #:use-module (gnu packages c)
66 #:use-module (gnu packages check)
67 #:use-module (gnu packages code)
68 #:use-module (gnu packages compression)
69 #:use-module (gnu packages crypto)
70 #:use-module (gnu packages curl)
71 #:use-module (gnu packages documentation)
72 #:use-module (gnu packages gcc)
73 #:use-module (gnu packages libevent)
74 #:use-module (gnu packages libunwind)
75 #:use-module (gnu packages linux)
76 #:use-module (gnu packages llvm)
77 #:use-module (gnu packages logging)
78 #:use-module (gnu packages maths)
79 #:use-module (gnu packages onc-rpc)
80 #:use-module (gnu packages perl)
81 #:use-module (gnu packages python)
82 #:use-module (gnu packages python-check)
83 #:use-module (gnu packages pkg-config)
84 #:use-module (gnu packages popt)
85 #:use-module (gnu packages pretty-print)
86 #:use-module (gnu packages pulseaudio)
87 #:use-module (gnu packages tls)
88 #:use-module (gnu packages web)
89 #:use-module (gnu packages xml)
90 #:use-module (ice-9 match))
91
92 (define-public argagg
93 (let ((commit "79e4adfa2c6e2bfbe63da05cc668eb9ad5596748") (revision "0"))
94 (package
95 (name "argagg")
96 (version (git-version "0.4.6" revision commit))
97 (source (origin
98 (method git-fetch)
99 (uri (git-reference
100 (url "https://github.com/vietjtnguyen/argagg")
101 (commit commit)))
102 (file-name (git-file-name name version))
103 (sha256
104 (base32
105 "1flkgh524lq3024p7ld5lg743s1v7qnbmgv77578rzmn2rjzr77n"))))
106 (build-system cmake-build-system)
107 (outputs '("out" "doc"))
108 (arguments
109 `(#:phases (modify-phases %standard-phases
110 (add-after 'install 'move-doc
111 (lambda* (#:key outputs #:allow-other-keys)
112 (let* ((name ,(package-name argagg)) (out (assoc-ref
113 outputs
114 "out"))
115 (doc (assoc-ref outputs "doc")))
116 (mkdir-p (string-append doc "/share/doc"))
117 (rename-file
118 (string-append out "/share/doc/" name)
119 (string-append doc "/share/doc/" name))))))))
120 (native-inputs (list doxygen))
121 (home-page "https://github.com/vietjtnguyen/argagg")
122 (synopsis "C++11 command line argument parser")
123 (description
124 "ArgAgg is yet another C++ command line argument/option
125 parser. It was written as a simple and idiomatic alternative to other
126 frameworks like getopt, Boost program options, TCLAP, and others. The goal is
127 to achieve the majority of argument parsing needs in a simple manner with an
128 easy to use API.")
129 (license license:expat))))
130
131 (define-public asmjit
132 (let ((commit "4ec760a3d1f69e32ba460ecd2513f29b8428700b")
133 (revision "0"))
134 (package
135 (name "asmjit")
136 (version (git-version "0.0.0" revision commit))
137 (source
138 (origin
139 (method git-fetch)
140 (uri
141 (git-reference
142 (url "https://github.com/asmjit/asmjit")
143 (commit commit)))
144 (file-name (git-file-name name version))
145 (sha256
146 (base32 "0skgccbpamcbg1byawfq5n6jzxgj64hnc7jznvk35nkskaaz1nlb"))))
147 (build-system cmake-build-system)
148 (arguments
149 (list #:configure-flags #~(list "-DASMJIT_TEST=TRUE")))
150 (home-page "https://asmjit.com/")
151 (synopsis "Machine code generation for C++")
152 (description "AsmJit is a lightweight library for machine code
153 generation written in C++ language. It can generate machine code for X86 and
154 X86_64 architectures with the support for the whole instruction set from
155 legacy MMX to the newest AVX-512 and AMX. It has a type-safe API that allows
156 C++ compiler to do semantic checks at compile-time even before the assembled
157 code is generated or executed. It also provides an optional register
158 allocator that makes it easy to generate complex code without a significant
159 development effort.")
160 (license license:zlib))))
161
162 (define-public range-v3
163 (package
164 (name "range-v3")
165 (version "0.11.0")
166 (source
167 (origin
168 (method git-fetch)
169 (uri
170 (git-reference
171 (url "https://github.com/ericniebler/range-v3.git")
172 (commit version)))
173 (file-name
174 (git-file-name name version))
175 (patches (search-patches "range-v3-build-with-gcc10.patch"))
176 (sha256
177 (base32 "18230bg4rq9pmm5f8f65j444jpq56rld4fhmpham8q3vr1c1bdjh"))))
178 (build-system cmake-build-system)
179 (arguments
180 (list
181 #:configure-flags
182 #~(list "-DRANGES_NATIVE=OFF")))
183 (native-inputs
184 (list doxygen gcc-9 perl))
185 (inputs
186 (list boost))
187 (synopsis "Range library for C++14/17/20")
188 (description "Range-v3 is an extension of the Standard Template Library that
189 makes its iterators and algorithms more powerful by making them composable.
190 Unlike other range-like solutions which, seek to do away with iterators, in
191 range-v3 ranges are an abstraction layer on top of iterators.")
192 (home-page "https://github.com/ericniebler/range-v3/")
193 (license
194 (list
195 ;; Elements of Programming
196 (license:x11-style "file:///LICENSE.txt")
197 ;; SGI STL
198 license:sgifreeb2.0
199 ;;; LibC++ (dual-licensed)
200 license:expat
201 license:ncsa
202 ;; Others
203 license:boost1.0))))
204
205 (define-public c++-gsl
206 (package
207 (name "c++-gsl")
208 (version "3.1.0")
209 (source
210 (origin
211 (method git-fetch)
212 (uri
213 (git-reference
214 (url "https://github.com/microsoft/GSL.git")
215 (commit
216 (string-append "v" version))))
217 (file-name
218 (git-file-name name version))
219 (patches
220 (search-patches
221 "c++-gsl-find-system-gtest.patch"
222 "c++-gsl-move-array-bounds-tests.patch"))
223 (sha256
224 (base32 "0gbvr48f03830g3154bjhw92b8ggmg6wwh5xyb8nppk9v6w752l0"))))
225 (build-system cmake-build-system)
226 (native-inputs
227 (list googletest pkg-config))
228 (synopsis "Guidelines Support Library")
229 (description "c++-gsl contains functions and types that are suggested for
230 use by the C++ Core Guidelines maintained by the Standard C++ Foundation.")
231 (home-page "https://github.com/microsoft/GSL/")
232 (license license:expat)))
233
234 (define-public c2ffi
235 (package
236 (name "c2ffi")
237 ;; As per the c2ffi README: the first three elements are encoding the
238 ;; required Clang/LLVM version, and the last one is the c2ffi revision.
239 (version "12.0.0.0")
240 (source
241 (origin
242 (method git-fetch)
243 (uri (git-reference
244 (url "https://github.com/rpav/c2ffi")
245 (commit (string-append "v" version))))
246 (file-name (git-file-name name version))
247 (sha256
248 (base32 "1qq8dfismd20d9kfxpfvwz07v9mfvd0y7p5r3c92mk2pm4xnmzfy"))
249 (modules '((guix build utils)))
250 (snippet
251 '(substitute* "CMakeLists.txt"
252 ;; Guix seems to be packaging LLVM libs separately thus -lLLVM
253 ;; won't work, every used library must be specified explicitly.
254 (("c2ffi PUBLIC clang-cpp LLVM")
255 "c2ffi PUBLIC clang-cpp LLVMCore LLVMSupport LLVMMCParser \
256 LLVMOption LLVMBitReader LLVMProfileData")))))
257 (build-system cmake-build-system)
258 (arguments
259 '(;; If LLVM was built without RTTI, we need to also be built without
260 ;; it. See: https://stackoverflow.com/q/11904519
261 #:configure-flags '("-DCMAKE_CXX_FLAGS=-fno-rtti")
262 #:phases
263 (modify-phases %standard-phases
264 (replace 'check
265 (lambda* (#:key tests? #:allow-other-keys)
266 (when tests?
267 (invoke "./bin/c2ffi" "--help")))))))
268 (native-inputs
269 (list clang-12)) ; CMakeLists.txt invokes `clang -print-resource-dir`
270 (inputs
271 (list clang-12)) ; Compiled with gcc, but links against libclang-cpp.so
272 (home-page "https://github.com/rpav/c2ffi")
273 (synopsis "Clang-based FFI wrapper generator")
274 (description
275 "@code{c2ffi} is a tool for extracting definitions from C, C++, and
276 Objective C headers for use with foreign function call interfaces. It uses
277 the @code{Clang/LLVM} infrastructure to extract the data, and emits it in
278 various formats, including @code{json}.")
279 (license license:gpl2+)))
280
281 (define-public libzen
282 (package
283 (name "libzen")
284 (version "0.4.39")
285 (source (origin
286 (method url-fetch)
287 ;; Warning: This source has proved unreliable 1 time at least.
288 ;; Consider an alternate source or report upstream if this
289 ;; happens again.
290 (uri (string-append "https://mediaarea.net/download/source/"
291 "libzen/" version "/"
292 "libzen_" version ".tar.bz2"))
293 (sha256
294 (base32
295 "1rwaxmid9iv65n0y6xlcyxxydsvihjni9ldxpg6pbqz43amp49xx"))))
296 (native-inputs
297 (list autoconf automake libtool))
298 (build-system gnu-build-system)
299 (arguments
300 '(#:phases
301 ;; The build scripts are not at the root of the archive.
302 (modify-phases %standard-phases
303 (add-after 'unpack 'pre-configure
304 (lambda _
305 (chdir "Project/GNU/Library"))))))
306 (home-page "https://github.com/MediaArea/ZenLib")
307 (synopsis "C++ utility library")
308 (description "ZenLib is a C++ utility library. It includes classes for handling
309 strings, configuration, bit streams, threading, translation, and cross-platform
310 operating system functions.")
311 (license license:zlib)))
312
313 (define-public rttr
314 (package
315 (name "rttr")
316 (version "0.9.6")
317 (source
318 (origin
319 (method git-fetch)
320 (uri (git-reference
321 (url "https://github.com/rttrorg/rttr/")
322 (commit (string-append "v" version))))
323 (sha256
324 (base32 "1yxad8sj40wi75hny8w6imrsx8wjasjmsipnlq559n4b6kl84ijp"))
325 (file-name (git-file-name name version))))
326 (build-system cmake-build-system)
327 (arguments
328 '(;; No check target. Setting test-target to "unit_test" runs it twice.
329 #:tests? #f
330 #:configure-flags
331 '("-DBUILD_DOCUMENTATION=OFF" "-DBUILD_EXAMPLES=OFF")
332 #:phases
333 (modify-phases %standard-phases
334 ;; library_test fails in chroot.
335 (add-after 'unpack 'skip-library-test
336 (lambda _
337 (substitute* "src/unit_tests/unit_tests.cmake"
338 (("misc/library_test.cpp") ""))
339 #t)))))
340 (native-inputs (list pkg-config))
341 (home-page "https://github.com/rttrorg/rttr/")
342 (synopsis "C++ Reflection Library")
343 (description
344 "RTTR stands for Run Time Type Reflection. It describes the ability of a
345 computer program to introspect and modify an object at runtime. It is also
346 the name of the library itself, which is written in C++.")
347 (license license:expat)))
348
349 (define-public rct
350 (let* ((commit "b3e6f41d9844ef64420e628e0c65ed98278a843a")
351 (revision "2"))
352 (package
353 (name "rct")
354 (version (git-version "0.0.0" revision commit))
355 (source (origin
356 (method git-fetch)
357 (uri (git-reference
358 (url "https://github.com/Andersbakken/rct")
359 (commit commit)))
360 (sha256
361 (base32
362 "1m2931jacka27ghnpgf1z1plkkr64z0pga4r4zdrfpp2d7xnrdvb"))
363 (patches (search-patches "rct-add-missing-headers.patch"))
364 (file-name (git-file-name name version))))
365 (build-system cmake-build-system)
366 (arguments
367 '(#:configure-flags
368 '("-DWITH_TESTS=ON" ; To run the test suite
369 "-DRCT_RTTI_ENABLED=ON")))
370 (native-inputs
371 (list cppunit pkg-config))
372 (inputs
373 (list openssl zlib))
374 (home-page "https://github.com/Andersbakken/rct")
375 (synopsis "C++ library providing Qt-like APIs on top of the STL")
376 (description "Rct is a set of C++ tools that provide nicer (more Qt-like)
377 APIs on top of Standard Template Library (@dfn{STL}) classes.")
378 (license (list license:expat ; cJSON
379 license:bsd-4))))) ; everything else (LICENSE.txt)
380
381 (define-public dashel
382 (package
383 (name "dashel")
384 (version "1.3.3")
385 (source
386 (origin
387 (method git-fetch)
388 (uri (git-reference
389 (url "https://github.com/aseba-community/dashel")
390 (commit version)))
391 (sha256
392 (base32 "0anks2l2i2qp0wlzqck1qgpq15a3l6dg8lw2h8s4nsj7f61lffwy"))
393 (file-name (git-file-name name version))))
394 (build-system cmake-build-system)
395 (arguments '(#:tests? #f)) ; no tests
396 (native-inputs (list pkg-config))
397 (home-page "https://github.com/aseba-community/dashel")
398 (synopsis "Data stream helper encapsulation library")
399 (description
400 "Dashel is a data stream helper encapsulation C++ library. It provides a
401 unified access to TCP/UDP sockets, serial ports, console, and files streams.
402 It also allows a server application to wait for any activity on any
403 combination of these streams.")
404 (license license:bsd-3)))
405
406 (define-public xsimd
407 (package
408 (name "xsimd")
409 (version "8.1.0")
410 (source
411 (origin
412 (method git-fetch)
413 (uri (git-reference
414 (url "https://github.com/QuantStack/xsimd")
415 (commit version)))
416 (sha256
417 (base32 "16b9fdvhhsbs93llbzccgpxjdkj8kfvac3wx0b30i306k5f3maq2"))
418 (file-name (git-file-name name version))))
419 (build-system cmake-build-system)
420 (arguments
421 `(#:configure-flags (list "-DBUILD_TESTS=ON")
422 #:test-target "xtest"))
423 (native-inputs
424 (list googletest))
425 (home-page "https://github.com/QuantStack/xsimd")
426 (synopsis "C++ wrappers for SIMD intrinsics and math implementations")
427 (description
428 "xsimd provides a unified means for using @acronym{SIMD, single instruction
429 multiple data} features for library authors. Namely, it enables manipulation of
430 batches of numbers with the same arithmetic operators as for single values.
431 It also provides accelerated implementation of common mathematical functions
432 operating on batches.")
433 (license license:bsd-3)))
434
435 (define-public google-highway
436 (package
437 (name "google-highway")
438 (version "0.17.0")
439 (source
440 (origin
441 (method git-fetch)
442 (uri (git-reference
443 (url "https://github.com/google/highway")
444 (commit version)))
445 (file-name (git-file-name name version))
446 (sha256
447 (base32 "0iwn7m8f1j7bchwbi5h84nzkzmzqd7byddbr4lh6i6lpd87wny08"))))
448 (build-system cmake-build-system)
449 (arguments
450 `(#:configure-flags (list "-DHWY_SYSTEM_GTEST=on")))
451 (native-inputs
452 (list googletest))
453 (home-page "https://github.com/google/highway")
454 (synopsis "SIMD library with runtime dispatch")
455 (description "Highway is a performance-portable, length-agnostic C++
456 library for SIMD (Single Instruction, Multiple Data) with runtime dispatch.")
457 (license license:asl2.0)))
458
459 (define-public xsmimd-benchmark
460 (package
461 (inherit xsimd)
462 (name "xsimd-benchmark")
463 (arguments
464 `(#:configure-flags (list "-DBUILD_BENCHMARK=ON")
465 #:tests? #f
466 #:phases (modify-phases %standard-phases
467 (add-after 'unpack 'remove-march=native
468 (lambda _
469 (substitute* "benchmark/CMakeLists.txt"
470 (("-march=native") ""))))
471 (replace 'install
472 (lambda* (#:key outputs #:allow-other-keys)
473 ;; Install nothing but the executable.
474 (let ((out (assoc-ref outputs "out")))
475 (install-file "benchmark/benchmark_xsimd"
476 (string-append out "/bin"))))))))
477 (synopsis "Benchmark of the xsimd library")
478
479 ;; Mark as tunable to take advantage of SIMD code in xsimd/xtensor.
480 (properties '((tunable? . #t)))))
481
482 (define-public chaiscript
483 (package
484 (name "chaiscript")
485 (version "6.1.0")
486 (source
487 (origin
488 (method git-fetch)
489 (uri (git-reference
490 (url "https://github.com/ChaiScript/ChaiScript")
491 (commit (string-append "v" version))))
492 (file-name (git-file-name name version))
493 (sha256
494 (base32 "0i1c88rn1wwz8nf3dpapcdkk4w623m3nksfy5yjai10k9irkzy3c"))))
495 (build-system cmake-build-system)
496 (home-page "https://chaiscript.com/")
497 (synopsis "Embedded scripting language designed for C++")
498 (description
499 "ChaiScript is one of the only embedded scripting language designed from
500 the ground up to directly target C++ and take advantage of modern C++
501 development techniques. Being a native C++ application, it has some advantages
502 over existing embedded scripting languages:
503
504 @enumerate
505 @item Uses a header-only approach, which makes it easy to integrate with
506 existing projects.
507 @item Maintains type safety between your C++ application and the user scripts.
508 @item Supports a variety of C++ techniques including callbacks, overloaded
509 functions, class methods, and stl containers.
510 @end enumerate\n")
511 (license license:bsd-3)))
512
513 (define-public fifo-map
514 (package
515 (name "fifo-map")
516 (version "1.0.0")
517 (home-page "https://github.com/nlohmann/fifo_map")
518 (source (origin
519 (method git-fetch)
520 (uri (git-reference
521 (url home-page)
522 (commit (string-append "v" version))))
523 (sha256
524 (base32
525 "0y59fk6ycrgjln9liwcja3l5j1vxpa5i671bynpbsjlyq5f2560q"))
526 (patches (search-patches "fifo-map-remove-catch.hpp.patch"
527 "fifo-map-fix-flags-for-gcc.patch"))
528 (file-name (git-file-name name version))
529 (modules '((guix build utils)))
530 (snippet '(delete-file-recursively "./test/thirdparty"))))
531 (inputs
532 (list catch-framework2-1))
533 (build-system cmake-build-system)
534 (arguments
535 '(#:phases
536 (modify-phases %standard-phases
537 (replace 'check
538 (lambda* (#:key tests? #:allow-other-keys)
539 (when tests? (invoke "./unit"))))
540 (replace 'install
541 (lambda* (#:key outputs #:allow-other-keys)
542 (let* ((out (assoc-ref outputs "out"))
543 (inc (string-append out "/include/fifo_map")))
544 (with-directory-excursion "../source"
545 (install-file "src/fifo_map.hpp" inc))))))))
546 (synopsis "FIFO-ordered associative container for C++")
547 (description "Fifo_map is a C++ header only library for associative
548 container which uses the order in which keys were inserted to the container
549 as ordering relation.")
550 (license license:expat)))
551
552 (define-public json-modern-cxx
553 (package
554 (name "json-modern-cxx")
555 (version "3.10.5")
556 (home-page "https://github.com/nlohmann/json")
557 (source
558 (origin
559 (method git-fetch)
560 (uri (git-reference (url home-page)
561 (commit (string-append "v" version))))
562 (sha256
563 (base32 "1f9mi45ilwjc2w92grjc53sw038840bjpn8yjf6wc6bxs2nijfqd"))
564 (file-name (git-file-name name version))
565 (modules '((guix build utils)))
566 (snippet
567 '(begin
568 ;; Delete bundled software. Preserve doctest_compatibility.h, which
569 ;; is a wrapper library added by this package.
570 (install-file "./test/thirdparty/doctest/doctest_compatibility.h" "/tmp")
571 (for-each delete-file-recursively
572 '("./third_party" "./test/thirdparty"))
573 (install-file "/tmp/doctest_compatibility.h" "./test/thirdparty/doctest")
574
575 ;; Adjust for the unbundled fifo_map and doctest.
576 (substitute* "./test/thirdparty/doctest/doctest_compatibility.h"
577 (("#include \"doctest\\.h\"")
578 "#include <doctest/doctest.h>"))
579 (with-directory-excursion "test/src"
580 (let ((files (find-files "." "\\.cpp$")))
581 (substitute* files
582 (("#include ?\"(fifo_map.hpp)\"" all fifo-map-hpp)
583 (string-append
584 "#include <fifo_map/" fifo-map-hpp ">")))))))))
585 (build-system cmake-build-system)
586 (arguments
587 '(#:configure-flags
588 (list "-DJSON_MultipleHeaders=ON" ; For json_fwd.hpp.
589 (string-append "-DJSON_TestDataDirectory="
590 (dirname
591 (search-input-directory %build-inputs
592 "json_nlohmann_tests"))))
593 #:phases (modify-phases %standard-phases
594 (replace 'check
595 (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
596 (if tests?
597 ;; Some tests need git and a full checkout, skip those.
598 (invoke "ctest" "-LE" "git_required"
599 "-j" (if parallel-tests?
600 (number->string (parallel-job-count))
601 "1"))
602 (format #t "test suite not run~%")))))))
603 (native-inputs
604 (list amalgamate
605 (let ((version "3.0.0"))
606 (origin
607 (method git-fetch)
608 (uri (git-reference
609 (url "https://github.com/nlohmann/json_test_data")
610 (commit (string-append "v" version))))
611 (file-name (git-file-name "json_test_data" version))
612 (sha256
613 (base32
614 "0nzsjzlvk14dazwh7k2jb1dinb0pv9jbx5jsyn264wvva0y7daiv"))))))
615 (inputs
616 (list doctest fifo-map))
617 (synopsis "JSON parser and printer library for C++")
618 (description "JSON for Modern C++ is a C++ JSON library that provides
619 intuitive syntax and trivial integration.")
620 (license license:expat)))
621
622 (define-public xtl
623 (package
624 (name "xtl")
625 (version "0.7.4")
626 (source (origin
627 (method git-fetch)
628 (uri
629 (git-reference
630 (url "https://github.com/QuantStack/xtl")
631 (commit version)))
632 (sha256
633 (base32
634 "134pgvmf9cx5dxs0m0m3qhp3m3r1gl86ic3xax21zc4sdj8sdq46"))
635 (file-name (git-file-name name version))))
636 (native-inputs
637 (list doctest googletest json-modern-cxx))
638 (arguments
639 '(#:configure-flags
640 '("-DBUILD_TESTS=ON")
641 #:phases
642 (modify-phases %standard-phases
643 (replace 'check
644 (lambda* _
645 (with-directory-excursion "test"
646 (invoke "./test_xtl")))))))
647 (home-page "https://github.com/QuantStack/xtl")
648 (build-system cmake-build-system)
649 (synopsis "C++ template library providing some basic tools")
650 (description "xtl is a C++ header-only template library providing basic
651 tools (containers, algorithms) used by other QuantStack packages.")
652 (license license:bsd-3)))
653
654 (define-public ccls
655 (package
656 (name "ccls")
657 (version "0.20210330")
658 (source
659 (origin
660 (method git-fetch)
661 (uri (git-reference
662 (url "https://github.com/MaskRay/ccls")
663 (commit version)))
664 (sha256
665 (base32 "0zzdn7c7a244djqwcsd7rvgclcdacyf9d0vkxpfspl83k2554alf"))
666 (file-name (git-file-name name version))))
667 (build-system cmake-build-system)
668 (arguments
669 '(#:tests? #f)) ; no check target
670 (inputs
671 (list rapidjson))
672 (native-inputs
673 (list clang llvm))
674 (home-page "https://github.com/MaskRay/ccls")
675 (synopsis "C/C++/Objective-C language server")
676 (description
677 "@code{ccls} is a server implementing the Language Server Protocol (LSP)
678 for C, C++ and Objective-C languages. It uses @code{clang} to perform static
679 code analysis and supports cross references, hierarchies, completion and
680 syntax highlighting. @code{ccls} is derived from @code{cquery} which is not
681 maintained anymore.")
682 (license license:asl2.0)))
683
684 (define-public concurrentqueue
685 (package
686 (name "concurrentqueue")
687 (version "1.0.3")
688 (source
689 (origin
690 (method git-fetch)
691 (uri (git-reference
692 (url "https://github.com/cameron314/concurrentqueue/")
693 (commit "3747268264d0fa113e981658a99ceeae4dad05b7")))
694 (file-name (git-file-name name version))
695 (sha256
696 (base32 "1n5v7n27llzg7khg1jvi35jrcf9v6adw8gaic9ndxn65dp723ssy"))))
697 (build-system cmake-build-system)
698 (arguments '(#:tests? #false)) ;no check target
699 (home-page "https://github.com/cameron314/concurrentqueue/")
700 (synopsis "Multi-producer, multi-consumer lock-free concurrent queue for C++11")
701 (description
702 "This package provides a fast multi-producer, multi-consumer lock-free
703 concurrent queue for C++11.")
704 (license license:bsd-2)))
705
706 (define-public spscqueue
707 (package
708 (name "spscqueue")
709 (version "1.1")
710 (source
711 (origin
712 (method git-fetch)
713 (uri (git-reference
714 (url "https://github.com/rigtorp/SPSCQueue/")
715 (commit (string-append "v" version))))
716 (file-name (git-file-name name version))
717 (sha256
718 (base32 "1428cj9x318afvnvnkhg0711iy4czqn86fi7ysgfhw91asa316rc"))))
719 (build-system cmake-build-system)
720 (home-page "https://github.com/rigtorp/SPSCQueue/")
721 (synopsis "Single producer single consumer queue written in C++11")
722 (description
723 "This package provides a single producer single consumer wait-free and
724 lock-free fixed size queue written in C++11.")
725 (license license:expat)))
726
727 (define-public gperftools
728 (package
729 (name "gperftools")
730 (version "2.10")
731 (source
732 (origin
733 (method git-fetch)
734 (uri (git-reference
735 (url "https://github.com/gperftools/gperftools")
736 (commit (string-append "gperftools-" version))))
737 (sha256
738 (base32 "0s9qhx940s8q6glc8sw74k5gs8hdhjfigq20zci92qawgm7zsicm"))
739 (file-name (git-file-name name version))))
740 (build-system gnu-build-system)
741 (arguments
742 ;; The tests are flaky when run in parallel. For more info:
743 ;; https://bugs.gnu.org/46562
744 '(#:parallel-tests? #f))
745 (native-inputs
746 (list autoconf automake libtool
747 ;; For tests.
748 perl))
749 (home-page "https://github.com/gperftools/gperftools")
750 (synopsis "Multi-threaded malloc() and performance analysis tools for C++")
751 (description
752 "@code{gperftools} is a collection of a high-performance multi-threaded
753 malloc() implementation plus some thread-friendly performance analysis
754 tools:
755
756 @itemize
757 @item tcmalloc,
758 @item heap profiler,
759 @item heap checker,
760 @item CPU checker.
761 @end itemize\n")
762 (license license:bsd-3)))
763
764 (define-public cpp-httplib
765 ;; this package is not graftable, as everything is implemented in a single
766 ;; header
767 (package
768 (name "cpp-httplib")
769 (version "0.8.8")
770 (source
771 (origin
772 (method git-fetch)
773 (uri (git-reference
774 (url "https://github.com/yhirose/cpp-httplib")
775 (commit (string-append "v" version))))
776 (sha256
777 (base32 "0c0gyfbvm34bgrqy9fhfxw1f8nb9zhf063j7xq91k892flb7qm1c"))
778 (file-name (git-file-name name version))))
779 (build-system cmake-build-system)
780 (arguments
781 `(#:configure-flags
782 '("-DBUILD_SHARED_LIBS=ON"
783 "-DHTTPLIB_COMPILE=ON"
784 "-DHTTPLIB_REQUIRE_BROTLI=ON"
785 "-DHTTPLIB_REQUIRE_OPENSSL=ON"
786 "-DHTTPLIB_REQUIRE_ZLIB=ON")
787 #:phases
788 (modify-phases %standard-phases
789 (add-after 'unpack 'disable-network-tests
790 (lambda _
791 (for-each
792 (lambda (test)
793 (substitute* "test/test.cc"
794 (((string-append "\\(" test))
795 (string-append "(DISABLED_" test))))
796 ;; There are tests requiring network access, disable them
797 '("AbsoluteRedirectTest" "BaseAuthTest" "CancelTest"
798 "ChunkedEncodingTest" "ChunkedEncodingTest"
799 "DecodeWithChunkedEncoding" "DefaultHeadersTest"
800 "DigestAuthTest" "HttpsToHttpRedirectTest"
801 "RangeTest" "RedirectTest" "RelativeRedirectTest"
802 "SSLClientTest" "SendAPI" "TooManyRedirectTest" "UrlWithSpace"
803 "YahooRedirectTest" "YahooRedirectTest"))))
804 (replace 'check
805 (lambda* (#:key source tests? #:allow-other-keys)
806 ;; openssl genrsa wants to write a file in the git checkout
807 (when tests?
808 (with-directory-excursion "../source/test"
809 (invoke "make"))))))))
810 (native-inputs
811 ;; required to build shared lib
812 (list python))
813 (inputs
814 (list brotli openssl zlib))
815 (home-page "https://github.com/yhirose/cpp-httplib")
816 (synopsis "C++ HTTP/HTTPS server and client library")
817 (description "cpp-httplib is a C++11 single-file cross platform blocking
818 HTTP/HTTPS library, easy to setup. It can also be used as a single-header
819 library.")
820 (license license:expat)))
821
822 (define-public cpplint
823 (package
824 (name "cpplint")
825 (version "1.5.5")
826 (source
827 (origin
828 (method git-fetch)
829 ;; Fetch from github instead of pypi, since the test cases are not in
830 ;; the pypi archive.
831 (uri (git-reference
832 (url "https://github.com/cpplint/cpplint")
833 (commit version)))
834 (sha256
835 (base32 "13l86aq0h1jga949k79k9x3hw2xqchjc162sclg2f99vz98zcz15"))
836 (file-name (git-file-name name version))))
837 (arguments
838 (list #:modules `((srfi srfi-1)
839 (srfi srfi-26)
840 ,@%python-build-system-modules)
841 #:phases
842 #~(modify-phases (@ (guix build python-build-system) %standard-phases)
843 (add-before 'wrap 'reduce-GUIX_PYTHONPATH
844 (lambda _
845 ;; Hide the transitive native inputs from GUIX_PYTHONPATH
846 ;; to prevent them from ending up in the run-time closure.
847 ;; See also <https://bugs.gnu.org/25235>.
848 (let ((transitive-native-inputs
849 '#$(match (package-transitive-native-inputs
850 this-package)
851 (((labels packages) ...) packages))))
852 ;; Save the original PYTHONPATH because we need it for
853 ;; tests later.
854 (setenv "TMP_PYTHONPATH" (getenv "GUIX_PYTHONPATH"))
855 (setenv "GUIX_PYTHONPATH"
856 (string-join
857 (filter (lambda (path)
858 (not (any (cut string-prefix? <> path)
859 transitive-native-inputs)))
860 (search-path-as-string->list
861 (getenv "GUIX_PYTHONPATH")))
862 ":")))))
863 (add-after 'wrap 'reset-GUIX_PYTHONPATH
864 (lambda _
865 (setenv "GUIX_PYTHONPATH"
866 (getenv "TMP_PYTHONPATH"))))
867 (replace 'check
868 (lambda* (#:key tests? #:allow-other-keys)
869 (when tests?
870 (invoke "pytest" "-vv")))))))
871 (build-system python-build-system)
872 (native-inputs
873 (list python-coverage
874 python-pytest
875 python-pytest-cov
876 python-pytest-runner
877 python-testfixtures))
878 (home-page "https://github.com/cpplint/cpplint")
879 (synopsis "Static code checker for C++")
880 (description "@code{cpplint} is a command-line tool to check C/C++ files
881 for style issues following Google’s C++ style guide. While Google maintains
882 its own version of the tool, this is a fork that aims to be more responsive
883 and make @code{cpplint} usable in wider contexts.")
884 (license license:bsd-3)))
885
886 (define-public reproc
887 (package
888 (name "reproc")
889 (version "14.2.4")
890 (source
891 (origin
892 (method git-fetch)
893 (uri (git-reference
894 (url "https://github.com/DaanDeMeyer/reproc")
895 (commit (string-append "v" version))))
896 (file-name (git-file-name name version))
897 (sha256
898 (base32 "09xnf8hmld1fk8j33zwlz1qcxnjdx1ncbg62csic9va4m1wc2v1d"))))
899 (build-system cmake-build-system)
900 (arguments
901 ;; No tests.
902 `(#:tests? #f
903 ;; Build the shared library instead of a static one.
904 #:configure-flags `("-DBUILD_SHARED_LIBS=1")))
905 (native-inputs
906 (list pkg-config))
907 (synopsis "Process IO library")
908 (description "reproc (Redirected Process) is a C/C++ library that
909 simplifies starting, stopping and communicating with external programs. The
910 main use case is executing command line applications directly from C or C++
911 code and retrieving their output.")
912 (home-page "https://github.com/DaanDeMeyer/reproc")
913 (license license:expat)))
914
915 (define-public sobjectizer
916 (package
917 (name "sobjectizer")
918 (version "5.7.2.6")
919 (source
920 (origin
921 (method git-fetch)
922 (uri (git-reference
923 (url "https://github.com/Stiffstream/sobjectizer")
924 (commit (string-append "v." version))))
925 (sha256
926 (base32 "0n6smpjkkkw0xab8wcpy3p0dpw2v9sxgwl6azl3am6abmv4mff12"))
927 (file-name (git-file-name name version))))
928 (build-system cmake-build-system)
929 (arguments
930 `(#:tests? #f
931 #:phases
932 (modify-phases %standard-phases
933 (add-after 'unpack 'change-directory
934 (lambda _
935 (chdir "dev")
936 #t)))))
937 (home-page "https://stiffstream.com/en/products/sobjectizer.html")
938 (synopsis "Cross-platform actor framework for C++")
939 (description
940 "SObjectizer is a cross-platform \"actor frameworks\" for C++.
941 SObjectizer supports not only the Actor Model but also the Publish-Subscribe
942 Model and CSP-like channels. The goal of SObjectizer is to simplify
943 development of concurrent and multithreaded applications in C++.")
944 (license license:bsd-3)))
945
946 (define-public tweeny
947 (package
948 (name "tweeny")
949 (version "3")
950 (source
951 (origin
952 (method git-fetch)
953 (uri (git-reference
954 (url "https://github.com/mobius3/tweeny")
955 (commit (string-append "v" version))))
956 (file-name (git-file-name name version))
957 (sha256
958 (base32 "1adm4c17pi7xf3kf6sjyxibz5rdg1ka236p72xsm6js4j9gzlbp4"))))
959 (arguments
960 '(#:tests? #f)) ;no check target
961 (build-system cmake-build-system)
962 (home-page "https://mobius3.github.io/tweeny/")
963 (synopsis "Modern C++ tweening library")
964 (description "@code{Tweeny} is an inbetweening library designed for the
965 creation of complex animations for games and other beautiful interactive
966 software. It leverages features of modern @code{C++} to empower developers with
967 an intuitive API for declaring tweenings of any type of value, as long as they
968 support arithmetic operations. The goal of @code{Tweeny} is to provide means to
969 create fluid interpolations when animating position, scale, rotation, frames or
970 other values of screen objects, by setting their values as the tween starting
971 point and then, after each tween step, plugging back the result.")
972 (license license:expat)))
973
974 ;;; This older LTS release is kept for tensorflow.
975 (define-public abseil-cpp-20200923.3
976 (package
977 (name "abseil-cpp")
978 (version "20200923.3")
979 (source (origin
980 (method git-fetch)
981 (uri (git-reference
982 (url "https://github.com/abseil/abseil-cpp")
983 (commit version)))
984 (file-name (git-file-name name version))
985 (sha256
986 (base32
987 "1p4djhm1f011ficbjjxx3n8428p8481p20j4glpaawnpsi362hkl"))
988 (patches
989 (search-patches "abseil-cpp-fix-strerror_test.patch"))))
990 (build-system cmake-build-system)
991 (arguments
992 `(#:configure-flags (list "-DBUILD_SHARED_LIBS=ON"
993 "-DABSL_RUN_TESTS=ON"
994 "-DABSL_USE_EXTERNAL_GOOGLETEST=ON"
995 ;; Needed, else we get errors like:
996 ;;
997 ;; ld: CMakeFiles/absl_periodic_sampler_test.dir/internal/periodic_sampler_test.cc.o:
998 ;; undefined reference to symbol '_ZN7testing4Mock16UnregisterLockedEPNS_8internal25UntypedFunctionMockerBaseE'
999 ;; ld: /gnu/store/...-googletest-1.10.0/lib/libgmock.so:
1000 ;; error adding symbols: DSO missing from command line
1001 ;; collect2: error: ld returned 1 exit status
1002 "-DCMAKE_EXE_LINKER_FLAGS=-lgtest -lpthread -lgmock")
1003 #:phases
1004 (modify-phases %standard-phases
1005 (add-before 'configure 'remove-gtest-check
1006 ;; The CMakeLists fails to find our googletest for some reason, but
1007 ;; it works nonetheless.
1008 (lambda _
1009 (substitute* "CMakeLists.txt"
1010 (("check_target\\(gtest\\)") "")
1011 (("check_target\\(gtest_main\\)") "")
1012 (("check_target\\(gmock\\)") "")))))))
1013 (native-inputs
1014 (list googletest))
1015 (home-page "https://abseil.io")
1016 (synopsis "Augmented C++ standard library")
1017 (description "Abseil is a collection of C++ library code designed to
1018 augment the C++ standard library. The Abseil library code is collected from
1019 Google's C++ code base.")
1020 (license license:asl2.0)))
1021
1022 (define-public abseil-cpp
1023 (let ((base abseil-cpp-20200923.3))
1024 (package/inherit base
1025 (name "abseil-cpp")
1026 (version "20220623.0")
1027 (source (origin
1028 (method git-fetch)
1029 (uri (git-reference
1030 (url "https://github.com/abseil/abseil-cpp")
1031 (commit version)))
1032 (file-name (git-file-name name version))
1033 (sha256
1034 (base32
1035 "1kyvlpdkkh8spqrdh9yvq2d4ri46hwxljicy3i9mp7mk2rqcnyvj"))))
1036 (arguments
1037 (substitute-keyword-arguments (package-arguments base)
1038 ((#:configure-flags flags)
1039 `(cons* "-DBUILD_TESTING=ON"
1040 (delete "-DABSL_RUN_TESTS=ON" ,flags))))))))
1041
1042 (define-public pegtl
1043 (package
1044 (name "pegtl")
1045 (version "3.2.7")
1046 (source (origin
1047 (method git-fetch)
1048 (uri (git-reference
1049 (url "https://github.com/taocpp/PEGTL")
1050 (commit version)))
1051 (file-name (git-file-name name version))
1052 (sha256
1053 (base32
1054 "01adjqqdr9yf4h379jl1x0526kvixfpqk4hdk9mna49qc4s5hpi1"))))
1055 (build-system cmake-build-system)
1056 (home-page "https://github.com/taocpp/PEGTL")
1057 (synopsis "Parsing Expression Grammar template library")
1058 (description "The Parsing Expression Grammar Template Library (PEGTL) is
1059 a zero-dependency C++ header-only parser combinator library for creating
1060 parsers according to a Parsing Expression Grammar (PEG).")
1061 (license license:expat)))
1062
1063 (define-public cxxopts
1064 (package
1065 (name "cxxopts")
1066 (version "3.0.0")
1067 (source (origin
1068 (method git-fetch)
1069 (uri (git-reference
1070 (url "https://github.com/jarro2783/cxxopts")
1071 (commit (string-append "v" version))))
1072 (file-name (git-file-name name version))
1073 (sha256
1074 (base32
1075 "08x7j168l1xwj0r3rv89cgghmfhsx98lpq35r3vkh504m1pd55a6"))))
1076 (build-system cmake-build-system)
1077 (synopsis "Lightweight C++ command line option parser")
1078 (description
1079 "A lightweight header-only C++ option parser library, supporting the
1080 standard GNU style syntax for options.")
1081 (home-page "https://github.com/jarro2783/cxxopts/wiki")
1082 (license license:expat)))
1083
1084 (define-public folly
1085 (package
1086 (name "folly")
1087 (version "2022.04.11.00")
1088 (source (origin
1089 (method git-fetch)
1090 (uri (git-reference
1091 (url "https://github.com/facebook/folly")
1092 (commit (string-append "v" version))))
1093 (file-name (git-file-name name version))
1094 (sha256
1095 (base32
1096 "03c1my66xncn8yvgih4kc7j83ckmjbi2w29hdb28j30ixbn0bsjg"))))
1097 (build-system cmake-build-system)
1098 (arguments
1099 '(;; Tests must be explicitly enabled
1100 ;;#:configure-flags '("-DBUILD_TESTS=ON")))
1101 ;; Leave tests disabled; see https://github.com/facebook/folly/issues/1456
1102 #:tests? #f))
1103 (propagated-inputs
1104 (list boost gflags glog liburing))
1105 (inputs
1106 (list bzip2
1107 double-conversion
1108 fmt
1109 libaio
1110 libevent
1111 libiberty
1112 libsodium
1113 libunwind
1114 lz4
1115 openssl
1116 snappy
1117 zlib
1118 `(,zstd "lib")))
1119 (native-inputs
1120 (list googletest))
1121 (synopsis "Collection of C++ components complementing the standard library")
1122 (description
1123 "Folly (acronymed loosely after Facebook Open Source Library) is a library
1124 of C++14 components that complements @code{std} and Boost.")
1125 (home-page "https://github.com/facebook/folly/wiki")
1126 ;; 32-bit is not supported: https://github.com/facebook/folly/issues/103
1127 (supported-systems '("aarch64-linux" "x86_64-linux"))
1128 (license license:asl2.0)))
1129
1130 (define-public poco
1131 (package
1132 (name "poco")
1133 (version "1.11.1")
1134 (source (origin
1135 (method git-fetch)
1136 (uri (git-reference
1137 (url "https://github.com/pocoproject/poco")
1138 (commit (string-append "poco-" version "-release"))))
1139 (file-name (git-file-name name version))
1140 (sha256
1141 (base32
1142 "0qkf8vb4qwds6idk9fkw6wjvcdk5k8h77x3gv47l0i4jfl5hwn8b"))))
1143 (build-system cmake-build-system)
1144 (arguments
1145 (list
1146 #:configure-flags #~(list "-DENABLE_TESTS=ON")
1147 #:phases
1148 #~(modify-phases %standard-phases
1149 (add-after 'unpack 'disable-problematic-tests
1150 (lambda _
1151 (substitute* (list "Foundation/CMakeLists.txt" ; XXX: fails.
1152 ;; Require network access
1153 "Net/CMakeLists.txt"
1154 "MongoDB/CMakeLists.txt"
1155 "Redis/CMakeLists.txt")
1156 (("ENABLE_TESTS") "FALSE")))))))
1157 (home-page "https://pocoproject.org/")
1158 (synopsis "Portable C++ components")
1159 (description "This package provides a collection of C++ libraries intended
1160 to be useful for building network-based applications.")
1161 (license license:boost1.0)))
1162
1163 (define-public aws-crt-cpp
1164 (package
1165 (name "aws-crt-cpp")
1166 ;; Update only when updating aws-sdk-cpp, and when updating also update
1167 ;; versions of library dependencies linked from from
1168 ;; https://github.com/awslabs/aws-crt-cpp/tree/{aws-crt-cpp commit}/crt
1169 (version "0.17.27")
1170 (source (origin
1171 (method git-fetch)
1172 (uri (git-reference
1173 (url "https://github.com/awslabs/aws-crt-cpp")
1174 (commit (string-append "v" version))))
1175 (file-name (git-file-name name version))
1176 (sha256
1177 (base32
1178 "14g8pn7yii1klby7phcw08qnld1qv11vwmbdz8cs3mlpqahxrh4i"))))
1179 (build-system cmake-build-system)
1180 (arguments
1181 '(#:configure-flags
1182 (list "-DBUILD_DEPS=OFF"
1183 "-DBUILD_SHARED_LIBS=ON"
1184 (string-append "-DCMAKE_PREFIX_PATH="
1185 (assoc-ref %build-inputs "aws-c-common"))
1186 "-DENABLE_NET_TESTS=OFF")))
1187 (propagated-inputs
1188 (list aws-c-auth
1189 aws-c-cal
1190 aws-c-event-stream
1191 aws-c-http
1192 aws-c-mqtt
1193 aws-c-s3))
1194 (synopsis "C++ wrapper for Amazon Web Services C libraries")
1195 (description "The AWS Common Runtime (CRT) library provides a C++ wrapper
1196 implementation for the following @acronym{AWS,Amazon Web Services} C libraries:
1197 aws-c-auth, aws-c-cal, aws-c-common, aws-c-compression, aws-c-event-stream,
1198 aws-c-http, aws-c-io, aws-c-mqtt, aws-checksums, and s2n.")
1199 (home-page "https://github.com/awslabs/aws-crt-cpp")
1200 (license license:asl2.0)))
1201
1202 (define-public aws-sdk-cpp
1203 (package
1204 (name "aws-sdk-cpp")
1205 ; When updating also check for a tagged update to aws-crt-cpp from
1206 ; https://github.com/aws/aws-sdk-cpp/tree/main/crt
1207 (version "1.9.236")
1208 (source (origin
1209 (method git-fetch)
1210 (uri (git-reference
1211 (url "https://github.com/aws/aws-sdk-cpp")
1212 (commit version)))
1213 (file-name (git-file-name name version))
1214 (sha256
1215 (base32
1216 "13qhxsbfn81r7lg382wb4d3xfc4a287ikww5i7whddk5yz0j8384"))))
1217 (build-system cmake-build-system)
1218 (arguments
1219 '(;; Tests are run during the build phase.
1220 #:tests? #f
1221 #:configure-flags
1222 (list "-DBUILD_DEPS=OFF"
1223 "-DBUILD_SHARED_LIBS=ON"
1224 (string-append "-DCMAKE_PREFIX_PATH="
1225 (assoc-ref %build-inputs "aws-c-common")))))
1226 (propagated-inputs
1227 (list aws-crt-cpp))
1228 (inputs
1229 (list curl pulseaudio zlib))
1230 (synopsis "Amazon Web Services SDK for C++")
1231 (description
1232 "The AWS SDK for C++ provides a C++11 interface to the @acronym{AWS,Amazon
1233 Web Services} API. AWS provides on-demand computing infrastructure and software
1234 services including database, analytic, and machine learning technologies.")
1235 (home-page "https://github.com/aws/aws-sdk-cpp")
1236 (license license:asl2.0)))
1237
1238 (define-public libexpected
1239 (package
1240 (name "libexpected")
1241 (version "1.0.0")
1242 (source
1243 (origin
1244 (method git-fetch)
1245 (uri (git-reference
1246 (url "https://github.com/TartanLlama/expected")
1247 (commit (string-append "v" version))
1248 ;; NOTE: Requires TL_CMAKE from custom
1249 ;; repository. Should not affect reproducibility.
1250 (recursive? #t)))
1251 (file-name (git-file-name name version))
1252 ;; NOTE: This patch will be unnecessary on subsequent tags.
1253 (patches (search-patches "libexpected-nofetch.patch"))
1254 (sha256
1255 (base32 "1ckzfrljzzdw9wf8hvdfjz4wjx5na57iwxc48mbv9rf5067m21a5"))))
1256 (build-system cmake-build-system)
1257 ;; TODO: Clean up install phase.
1258 (arguments
1259 `(#:phases
1260 (modify-phases %standard-phases
1261 (replace 'check
1262 (lambda _
1263 (invoke "./tests"))))))
1264 (native-inputs
1265 (list catch-framework2))
1266 (synopsis "C++11/14/17 std::expected with functional-style extensions")
1267 (description "@code{std::expected} is proposed as the preferred way to
1268 represent objects which will either have an expected value, or an unexpected
1269 value giving information about why something failed. Unfortunately, chaining
1270 together many computations which may fail can be verbose, as error-checking
1271 code will be mixed in with the actual programming logic. This implementation
1272 provides a number of utilities to make coding with expected cleaner.")
1273 (home-page "https://tl.tartanllama.xyz/")
1274 (license license:cc0)))
1275
1276 (define-public atomic-queue
1277 (package
1278 (name "atomic-queue")
1279 (version "1.0")
1280 (source (origin
1281 (method git-fetch)
1282 (uri (git-reference
1283 (url "https://github.com/max0x7ba/atomic_queue")
1284 (commit (string-append "v" version))))
1285 (file-name (git-file-name name version))
1286 (sha256
1287 (base32
1288 "0ssff73wlvrsk2nma99dmvm0ijyzfr54jk37kxgpb694r7ajc90l"))))
1289 (build-system meson-build-system)
1290 (arguments
1291 `(#:configure-flags '("-Dbenchmarks=false")
1292 #:phases
1293 (modify-phases %standard-phases
1294 ,@(if (%current-target-system)
1295 `(;; boost is a test dependency. We don't run tests when
1296 ;; cross-compiling. Disable all targets that depend on it.
1297 (add-after 'unpack 'do-not-check-for-boost
1298 (lambda _
1299 (substitute* "meson.build"
1300 (("unit_test_framework = [^\n]*" all)
1301 "unit_test_framework = disabler()")))))
1302 '())
1303 (replace 'check
1304 (lambda* (#:key tests? #:allow-other-keys)
1305 (when tests?
1306 (invoke "./tests"))))
1307 (replace 'install
1308 (lambda* (#:key outputs #:allow-other-keys)
1309 (copy-recursively "../source/include/atomic_queue"
1310 (string-append (assoc-ref outputs "out")
1311 "/include/atomic_queue")))))))
1312 (native-inputs
1313 (list boost
1314 pkg-config))
1315 (home-page "https://github.com/max0x7ba/atomic_queue")
1316 (synopsis "C++ lockless queue")
1317 (description
1318 "This package contains a C++11 multiple-producer-multiple-consumer lockless
1319 queues header library based on circular buffer with @code{std::atomic}.")
1320 (license license:expat)))
1321
1322 (define-public magic-enum
1323 (package
1324 (name "magic-enum")
1325 (version "0.7.3")
1326 (home-page "https://github.com/Neargye/magic_enum")
1327 (source (origin
1328 (method git-fetch)
1329 (uri (git-reference
1330 (url home-page)
1331 (commit (string-append "v" version))))
1332 (file-name (git-file-name name version))
1333 (sha256
1334 (base32
1335 "1x47radgsifgz3vn2561mlvf4cq46ii33cpyqf01znm56iirwq89"))))
1336 (build-system cmake-build-system)
1337 (synopsis "C++17 header only library for compile time reflection of enums")
1338 (description "Magic Enum offers static reflection of enums, with
1339 conversions to and from strings, iteration and related functionality.")
1340 (license license:expat)))
1341
1342 (define-public cli11
1343 (package
1344 (name "cli11")
1345 (version "1.9.1")
1346 (source
1347 (origin
1348 (method git-fetch)
1349 (uri (git-reference
1350 (url "https://github.com/CLIUtils/CLI11")
1351 (commit (string-append "v" version))))
1352 (file-name (git-file-name name version))
1353 (sha256
1354 (base32 "0hbch0vk8irgmiaxnfqlqys65v1770rxxdfn3d23m2vqyjh0j9l6"))
1355 (modules '((guix build utils)))
1356 (snippet
1357 '(begin (delete-file-recursively "extern")
1358 #t))))
1359 (build-system cmake-build-system)
1360 (arguments
1361 `(#:configure-flags
1362 '("-DCLI11_SINGLE_FILE=OFF"
1363 "-DCLI11_BUILD_EXAMPLES=OFF")
1364 #:imported-modules ,%cmake-build-system-modules
1365 #:modules ((guix build cmake-build-system)
1366 (guix build utils))
1367 #:phases
1368 (modify-phases %standard-phases
1369 (add-before 'configure 'no-vendor-gtest
1370 (lambda _
1371 (substitute* "tests/CMakeLists.txt"
1372 ;; We provide our own googletest, so this is not really a
1373 ;; problem.
1374 (("message\\(FATAL_ERROR \"You have requested")
1375 "message(TRACE \"You have requested"))
1376 (substitute* "cmake/AddGoogletest.cmake"
1377 (("^add_subdirectory\\(.*googletest.*$") "find_package(GTest REQUIRED)")
1378 (("^set_target_properties\\(gtest gtest_main gmock gmock_main") "")
1379 (("^ PROPERTIES FOLDER \"Extern\"\\)") ""))
1380 #t)))))
1381 (native-inputs
1382 (list doxygen googletest))
1383 (synopsis "Command line parser for C++11")
1384 (description
1385 "CLI11 is a command line parser for C++11 and beyond that provides a rich
1386 feature set with a simple and intuitive interface.")
1387 (home-page "https://cliutils.github.io/CLI11/book/")
1388 (license license:bsd-3)))
1389
1390 (define-public caf
1391 (package
1392 (name "caf")
1393 (version "0.18.6")
1394 (source (origin
1395 (method git-fetch)
1396 (uri (git-reference
1397 (url "https://github.com/actor-framework/actor-framework")
1398 (commit version)))
1399 (file-name (git-file-name name version))
1400 (sha256
1401 (base32
1402 "055y82044djphpwbazaxsvmb66c2xfdi8vyny8pzdxkdgxfh0vq1"))))
1403 (build-system cmake-build-system)
1404 (arguments
1405 '(#:configure-flags
1406 '("-DCAF_ENABLE_EXAMPLES=OFF")))
1407 (inputs
1408 (list openssl))
1409 (synopsis "C++ implementation of the actor model")
1410 (description "The C++ Actor Framework (CAF) offers a high-level C++17
1411 programming environment using the actor model for concurrent, distributed
1412 computation.")
1413 (home-page "https://www.actor-framework.org/")
1414 (license license:bsd-3)))
1415
1416 (define-public clipper
1417 (package
1418 (name "clipper")
1419 (version "6.4.2")
1420 (source
1421 (origin
1422 (method url-fetch)
1423 (uri (string-append "mirror://sourceforge/polyclipping"
1424 "/clipper_ver" version ".zip"))
1425 (sha256
1426 (base32 "09q6jc5k7p9y5d75qr2na5d1gm0wly5cjnffh127r04l47c20hx1"))))
1427 (build-system cmake-build-system)
1428 (arguments
1429 `(#:tests? #f ;no check target
1430 #:phases (modify-phases %standard-phases
1431 (replace 'unpack
1432 (lambda* (#:key source #:allow-other-keys)
1433 (and (invoke "unzip" source)
1434 (chdir "cpp")))))))
1435 (native-inputs
1436 `(("unzip" ,unzip)))
1437 (home-page "https://sourceforge.net/projects/polyclipping")
1438 (synopsis "Polygon and line clipping and offsetting library")
1439 (description
1440 "The Clipper library performs line & polygon clipping - intersection,
1441 union, difference & exclusive-or, and line & polygon offsetting.
1442 The library is based on Vatti's clipping algorithm.")
1443 (license license:boost1.0)))
1444
1445 (define-public pcg-cpp
1446 (let ((commit "ffd522e7188bef30a00c74dc7eb9de5faff90092")
1447 (revision "2"))
1448 (package
1449 (name "pcg-cpp")
1450 (version (git-version "0.98.1" revision commit))
1451 (source (origin
1452 (method git-fetch)
1453 (uri (git-reference
1454 (url "https://github.com/imneme/pcg-cpp")
1455 (commit commit)))
1456 (file-name (git-file-name name version))
1457 (sha256
1458 (base32
1459 "0yxyqaphcc38zilpwpmssrl8ly1v6dimscqk2f4rcv1h22dinnqx"))))
1460 (build-system gnu-build-system)
1461 (arguments
1462 `(#:test-target "test"
1463 #:phases
1464 (modify-phases %standard-phases
1465 (delete 'configure))
1466 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
1467 (synopsis "C++11 header only library for random number generation")
1468 (description "The Permuted Congruential Generator (PCG) extends the
1469 Linear Congruential Generator (LCG) with a permutation function to increase
1470 output randomness while retaining speed, simplicity, and conciseness.")
1471 (home-page "https://www.pcg-random.org")
1472 (license (list license:expat license:asl2.0))))) ; dual licensed
1473
1474 (define-public libconfini
1475 (package
1476 (name "libconfini")
1477 (version "1.16.4")
1478 (source (origin
1479 (method git-fetch)
1480 (uri (git-reference
1481 (url "https://github.com/madmurphy/libconfini")
1482 (commit version)))
1483 (file-name (git-file-name name version))
1484 (sha256
1485 (base32
1486 "002lmf1b2phmc6s348k00yx5shrcc7psn3pgqvraxvr6n8g747jx"))))
1487 (build-system gnu-build-system)
1488 (arguments
1489 `(#:configure-flags
1490 (list "--disable-static")
1491 #:phases
1492 (modify-phases %standard-phases
1493 (replace 'bootstrap
1494 (lambda _ (invoke "sh" "bootstrap" "--noconfigure"))))))
1495 (native-inputs
1496 (list autoconf automake libtool))
1497 (home-page "https://madmurphy.github.io/libconfini/html/index.html")
1498 (synopsis "INI file parser")
1499 (description "@code{libconfini} is an INI file parser library written in
1500 C. It focuses on standardization and parsing exactness and is at ease with
1501 almost every type of file containing key/value pairs.")
1502 (license license:gpl3+)))
1503
1504 (define-public libcutl
1505 (package
1506 (name "libcutl")
1507 (version "1.10.0")
1508 (source (origin
1509 (method url-fetch)
1510 (uri (string-append
1511 "https://www.codesynthesis.com/download/libcutl/"
1512 (version-major+minor version)
1513 "/libcutl-" version ".tar.bz2"))
1514 (sha256
1515 (base32
1516 "070j2x02m4gm1fn7gnymrkbdxflgzxwl7m96aryv8wp3f3366l8j"))
1517 (modules '((guix build utils)))
1518 (snippet
1519 '(begin
1520 ;; Remove bundled sources.
1521 (with-directory-excursion "cutl/details"
1522 (for-each delete-file-recursively
1523 ;; FIXME: Boost_RegEx isn't being detected.
1524 (list
1525 ;;"boost"
1526 "expat")))))))
1527 (build-system gnu-build-system)
1528 (arguments
1529 `(#:configure-flags (list "--disable-static"
1530 ;;"--with-external-boost"
1531 "--with-external-expat")))
1532 (inputs
1533 (list ;;("boost ,boost)
1534 expat))
1535 (home-page "https://www.codesynthesis.com/projects/libcutl/")
1536 (synopsis "C++ utility library with generic and independent components")
1537 (description "libcutl is a C++ utility library. It contains a collection
1538 of generic and independent components such as meta-programming tests, smart
1539 pointers, containers, compiler building blocks, etc.")
1540 (license (list license:expat ;everything except...
1541 license:boost1.0)))) ;...the files under cutl/details/boost
1542
1543 (define-public libxsd-frontend
1544 (package
1545 (name "libxsd-frontend")
1546 (version "2.0.0")
1547 (source
1548 (origin
1549 (method url-fetch)
1550 (uri (string-append "https://www.codesynthesis.com/download/"
1551 "libxsd-frontend/" (version-major+minor version)
1552 "/libxsd-frontend-" version ".tar.bz2"))
1553 (sha256
1554 (base32 "1nmzchsvwvn66jpmcx18anzyl1a3l309x1ld4zllrg37ijc31fim"))))
1555 (build-system gnu-build-system)
1556 (arguments
1557 `(#:test-target "test"
1558 #:imported-modules ((guix build copy-build-system)
1559 ,@%gnu-build-system-modules)
1560 #:modules (((guix build copy-build-system) #:prefix copy:)
1561 (guix build gnu-build-system)
1562 (guix build utils))
1563 #:make-flags (list (string-append "--include-dir="
1564 (assoc-ref %build-inputs "build")
1565 "/include/"))
1566 #:phases
1567 (modify-phases %standard-phases
1568 (delete 'configure)
1569 (replace 'install
1570 (lambda args
1571 (apply (assoc-ref copy:%standard-phases 'install)
1572 #:install-plan
1573 '(("xsd-frontend" "include/xsd-frontend"
1574 #:include-regexp ("\\.?xx$"))
1575 ("xsd-frontend" "lib"
1576 #:include-regexp ("\\.so$")))
1577 args))))))
1578 (native-inputs
1579 (list build))
1580 (inputs
1581 `(("libcutl" ,libcutl)
1582 ("libxerces-c" ,xerces-c)))
1583 (synopsis "XSD Front-end")
1584 (description "@code{libxsd-frontend} is a compiler frontend for the W3C
1585 XML Schema definition language. It includes a parser, semantic graph types
1586 and a traversal mechanism.")
1587 (home-page "https://www.codesynthesis.com/projects/libxsd-frontend/")
1588 (license license:gpl2+)))
1589
1590 (define-public cli
1591 (package
1592 (name "cli")
1593 (version "1.1.0")
1594 (source
1595 (origin
1596 (method url-fetch)
1597 (uri (string-append "https://www.codesynthesis.com/download/"
1598 "cli/" (version-major+minor version)
1599 "/cli-" version ".tar.bz2"))
1600 (sha256
1601 (base32 "0bg0nsai2q4h3mldpnj0jz4iy4svs0bcfvmq0v0c9cdyknny606g"))))
1602 (build-system gnu-build-system)
1603 (arguments
1604 `(#:test-target "test"
1605 #:make-flags (list (string-append "--include-dir="
1606 (assoc-ref %build-inputs "build")
1607 "/include")
1608 (string-append "install_prefix="
1609 (assoc-ref %outputs "out")))
1610 #:phases
1611 (modify-phases %standard-phases
1612 (add-after 'unpack 'patch
1613 (lambda _
1614 (substitute* (find-files "." "\\.make$")
1615 (("build-0\\.3")
1616 (string-append (assoc-ref %build-inputs "build")
1617 "/include/build-0.3")))
1618 ;; Add the namespace prefix, to avoid errors such as "error:
1619 ;; ‘iterate_and_dispatch’ was not declared in this scope".
1620 (substitute* (find-files "." "\\.?xx$")
1621 (("add \\(typeid \\(type\\), \\*this\\);" all)
1622 (string-append "traverser_map<B>::" all))
1623 (("iterate_and_dispatch \\(s\\.names_begin.*;" all)
1624 (string-append "edge_dispatcher::" all)))))
1625 (delete 'configure))))
1626 (native-inputs
1627 (list build))
1628 (inputs
1629 (list libcutl))
1630 (synopsis "C++ Command Line Interface (CLI) definition language")
1631 (description "@code{cli} is a domain-specific language (DSL) for defining
1632 command line interfaces of C++ programs. It allows you to describe the
1633 options that your program supports, their types, default values, and
1634 documentation.")
1635 (home-page "https://codesynthesis.com/projects/cli/")
1636 (license license:expat)))
1637
1638 (define-public xsd
1639 (package
1640 (name "xsd")
1641 (version "4.0.0")
1642 (source
1643 (origin
1644 (method url-fetch)
1645 (uri (string-append "https://www.codesynthesis.com/download/"
1646 "xsd/" (version-major+minor version)
1647 "/xsd-" version ".tar.bz2"))
1648 (sha256
1649 (base32 "1hi9ppxd34np8ydv1h0vgc2qpdmgcd1cdzgk30aidv670xjg91fx"))))
1650 (build-system gnu-build-system)
1651 (outputs '("out" "doc")) ;3.8 MiB of doc and examples
1652 (arguments
1653 `(#:test-target "test"
1654 #:make-flags (list (string-append "--include-dir="
1655 (assoc-ref %build-inputs "build")
1656 "/include/")
1657 (string-append "install_prefix="
1658 (assoc-ref %outputs "out")))
1659 #:phases (modify-phases %standard-phases
1660 (add-after 'install 'move-doc
1661 (lambda* (#:key outputs #:allow-other-keys)
1662 (let ((out (assoc-ref outputs "out"))
1663 (doc (assoc-ref outputs "doc")))
1664 (mkdir-p (string-append doc "/share/doc"))
1665 (rename-file (string-append out "/share/doc/xsd")
1666 (string-append doc "/share/doc/xsd-"
1667 ,version)))))
1668 (delete 'configure))))
1669 (native-inputs
1670 (list build cli))
1671 (inputs
1672 (list libcutl libnsl libxsd-frontend))
1673 (propagated-inputs
1674 ;; The code XSD generates requires the following library at run time;
1675 ;; propagate it for convenience.
1676 (list xerces-c))
1677 (synopsis "XML Data Binding for C++")
1678 (description "CodeSynthesis XSD (also known as libxsd or xsdcxx) is an XML
1679 Schema to C++ data binding compiler. Provided with an XML instance
1680 specification (XML Schema), it generates C++ classes that represent the given
1681 vocabulary as well as XML parsing and serialization code. The data stored in
1682 XML can then be accessed using types and functions that semantically
1683 correspond to an application domain rather than dealing with the intricacies
1684 of reading and writing XML.")
1685 (home-page "https://codesynthesis.com/projects/xsd/")
1686 ;; Exceptions are made to allow using the generated source files as well
1687 ;; as the libxsd library in free software projects whose license is
1688 ;; incompatible with the GPL v2. Refer to the file named FLOSSE for the
1689 ;; details.
1690 (license license:gpl2+)))
1691
1692 (define-public jsonnet
1693 (package
1694 (name "jsonnet")
1695 (version "0.17.0")
1696 (source
1697 (origin
1698 (method git-fetch)
1699 (uri (git-reference
1700 (url "https://github.com/google/jsonnet")
1701 (commit (string-append "v" version))))
1702 (file-name (git-file-name name version))
1703 (sha256
1704 (base32 "1ddz14699v5lqx3dh0mb7hfffr6fk5zhmzn3z8yxkqqvriqnciim"))
1705 (modules '((guix build utils)))
1706 (snippet
1707 #~(begin
1708 (rename-file "third_party/md5" ".md5")
1709 (delete-file-recursively "third_party")
1710 (delete-file-recursively "doc/third_party")
1711 (substitute* '("core/vm.cpp")
1712 (("#include \"json.hpp\"") "#include <nlohmann/json.hpp>"))
1713 (mkdir "third_party")
1714 (rename-file ".md5" "third_party/md5")))))
1715 (build-system cmake-build-system)
1716 (arguments
1717 `(#:configure-flags '("-DUSE_SYSTEM_GTEST=ON" "-DUSE_SYSTEM_JSON=ON"
1718 "-DBUILD_STATIC_LIBS=OFF")))
1719 (native-inputs
1720 (list googletest pkg-config))
1721 (inputs
1722 (list json-modern-cxx))
1723 (home-page "https://jsonnet.org/")
1724 (synopsis "Data templating language")
1725 (description "Jsonnet is a templating language extending JSON
1726 syntax with variables, conditions, functions and more.")
1727 (license license:asl2.0)))
1728
1729 (define-public simdjson
1730 (package
1731 (name "simdjson")
1732 (version "1.0.2")
1733 (source (origin
1734 (method git-fetch)
1735 (uri (git-reference
1736 (url "https://github.com/simdjson/simdjson")
1737 (commit (string-append "v" version))))
1738 (file-name (git-file-name name version))
1739 (sha256
1740 (base32
1741 "05i5jnqd7ngps79cws16ls48gnx08ykkkib3n2hbrdhr1wwrnv7a"))))
1742 (build-system cmake-build-system)
1743 (arguments
1744 '(#:tests? #f ; tests require downloading dependencies
1745 #:configure-flags
1746 '("-DBUILD_SHARED_LIBS=ON")))
1747 (synopsis "JSON parser for C++ using SIMD instructions")
1748 (description
1749 "The simdjson library uses commonly available SIMD instructions and
1750 microparallel algorithms to implement a strict JSON parser with UTF-8
1751 validation.")
1752 (home-page "https://github.com/simdjson/simdjson")
1753 (license license:asl2.0)))
1754
1755 (define-public bloomberg-bde-tools
1756 (let ((commit "094885bd177e0159232d4e6a060a04edb1edd786"))
1757 (package
1758 (name "bloomberg-bde-tools")
1759 ;; Recent releases are not tagged so commit must be used for checkout.
1760 (version "3.97.0.0")
1761 (source (origin
1762 (method git-fetch)
1763 (uri (git-reference
1764 (url "https://github.com/bloomberg/bde-tools")
1765 (commit commit)))
1766 (file-name (git-file-name name version))
1767 (sha256
1768 (base32
1769 "0mbbai73z8amh23ah3wy35kmy612380yr5wg89mic60qwqmpqb02"))
1770 (patches
1771 (search-patches
1772 "bloomberg-bde-tools-fix-install-path.patch"))))
1773 (build-system copy-build-system)
1774 ;; Unable to be an inline dependency of bloomberg-bde due to patch.
1775 (properties '((hidden? . #t)))
1776 (synopsis "Tools for developing and building libraries modeled on BDE")
1777 (description
1778 "This package provides the cmake imports needed to build bloomberg-bde.")
1779 (home-page "https://github.com/bloomberg/bde-tools")
1780 (license license:asl2.0))))
1781
1782 (define-public bloomberg-bde
1783 (let ((commit "b6bcc0e24a5862bf77aea7edd831dedf50e21d64"))
1784 (package
1785 (name "bloomberg-bde")
1786 ;; Recent releases are not tagged so commit must be used for checkout.
1787 (version "3.98.0.0")
1788 (source (origin
1789 (method git-fetch)
1790 (uri (git-reference
1791 (url "https://github.com/bloomberg/bde")
1792 (commit commit)))
1793 (file-name (git-file-name name version))
1794 (sha256
1795 (base32
1796 "0y3lipi1lj9qazgc935851r2qsx5aq3vvc4y52jq57riyz8wg3ma"))
1797 (patches
1798 (search-patches
1799 "bloomberg-bde-cmake-module-path.patch"))
1800 ;;(modules '((guix build utils)))
1801 (snippet
1802 `(begin
1803 ;; FIXME: Delete bundled software. The third-party packages
1804 ;; may be patched or modified from upstream sources.
1805 ;;(for-each delete-file-recursively
1806 ;; (list "thirdparty"))
1807 ;; Delete failing tests.
1808 (for-each
1809 delete-file
1810 (list "groups/bal/ball/ball_asyncfileobserver.t.cpp"
1811 "groups/bal/ball/ball_fileobserver2.t.cpp"
1812 "groups/bal/ball/ball_recordstringformatter.t.cpp"
1813 "groups/bal/balst/balst_stacktraceutil.t.cpp"
1814 "groups/bdl/bdlmt/bdlmt_eventscheduler.t.cpp"
1815 "groups/bdl/bdlmt/bdlmt_timereventscheduler.t.cpp"
1816 "groups/bdl/bdls/bdls_filesystemutil.t.cpp"
1817 "groups/bsl/bslh/bslh_hashpair.t.cpp"
1818 "groups/bsl/bsls/bsls_platform.t.cpp"
1819 "groups/bsl/bsls/bsls_stackaddressutil.t.cpp"
1820 "groups/bsl/bsls/bsls_stopwatch.t.cpp"
1821 "groups/bsl/bslstl/bslstl_function_invokerutil.t.cpp"))
1822 #t))))
1823 (build-system cmake-build-system)
1824 (arguments
1825 `(#:parallel-tests? #f ; Test parallelism may fail inconsistently.
1826 ;; Set UFID to build shared libraries. Flag descriptions can be found at
1827 ;; https://bloomberg.github.io/bde-tools/reference/bde_repo.html#ufid
1828 #:configure-flags ,(match %current-system
1829 ((or "i686-linux" "armhf-linux")
1830 ''("-DUFID=opt_dbg_exc_mt_32_shr_cpp17"))
1831 (_
1832 ''("-DUFID=opt_dbg_exc_mt_64_shr_cpp17")))
1833 #:phases
1834 (modify-phases %standard-phases
1835 ;; Explicitly build tests separate from the main build.
1836 (add-after 'build 'build-tests
1837 (lambda* (#:key make-flags #:allow-other-keys)
1838 (apply invoke "make" "all.t"
1839 `(,@(if #:parallel-build?
1840 `("-j" ,(number->string (parallel-job-count)))
1841 '())
1842 ,@make-flags)))))))
1843 (native-inputs
1844 (list bloomberg-bde-tools pkg-config python))
1845 (synopsis "Foundational C++ libraries used at Bloomberg")
1846 (description
1847 "The BDE Development Environment libraries provide an enhanced
1848 implementation of STL containers, vocabulary types for representing common
1849 concepts (like dates and times), and building blocks for developing
1850 multi-threaded applications and network applications.")
1851 (home-page "https://github.com/bloomberg/bde")
1852 (license license:asl2.0))))
1853
1854 (define-public gulrak-filesystem
1855 (package
1856 (name "gulrak-filesystem")
1857 (version "1.5.10")
1858 (source (origin
1859 (method git-fetch)
1860 (uri (git-reference
1861 (url "https://github.com/gulrak/filesystem")
1862 (commit (string-append "v" version))))
1863 (file-name (git-file-name name version))
1864 (sha256
1865 (base32
1866 "0dx1yvbz5rnisymkqap7z0b06ag9fcs6q6l82vgi8caylhkwsqs7"))))
1867 (build-system cmake-build-system)
1868 (synopsis "Header only C++ std::filesystem compatible library")
1869 (description "This package provides a header-only single-file
1870 std::filesystem compatible helper library, based on the C++17 and C++20 specs,
1871 but implemented for C++11, C++14, C++17 or C++20.")
1872 (home-page "https://github.com/gulrak/filesystem")
1873 (license license:expat)))
1874
1875 (define-public cpp-mustache
1876 (package
1877 (name "cpp-mustache")
1878 (version "4.1")
1879 (source (origin
1880 (method git-fetch)
1881 (uri (git-reference
1882 (url "https://github.com/kainjow/Mustache")
1883 (commit (string-append "v" version))))
1884 (file-name (git-file-name name version))
1885 (sha256
1886 (base32
1887 "0r9rbk6v1wpld2ismfsk2lkhbyv3dkf0p03hkjivbj05qkfhvlbb"))))
1888 (build-system cmake-build-system)
1889 (arguments
1890 (list #:phases
1891 #~(modify-phases %standard-phases
1892 (replace 'check
1893 (lambda* (#:key tests? #:allow-other-keys)
1894 (when tests?
1895 (invoke "./mustache"))))
1896 (replace 'install
1897 (lambda* (#:key outputs #:allow-other-keys)
1898 (install-file "../source/mustache.hpp"
1899 (string-append (assoc-ref outputs "out")
1900 "/include")))))))
1901 (home-page "https://github.com/kainjow/Mustache")
1902 (synopsis "Mustache text templates for modern C++")
1903 (description "@code{cpp-mustache} is a Mustache implementation for C++ 11
1904 and above. It is header only and has zero dependencies. It provides a
1905 templated string type for compatibility with any STL-like string (std::string,
1906 std::wstring, etc).")
1907 (license license:boost1.0)))