abb50d81b2148b9f7a10a23ee13787d433b5f333
[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, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
5 ;;; Copyright © 2018 Ludovic Courtès <ludo@gnu.org>
6 ;;; Copyright © 2019, 2020 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 Nicolò Balzarotti <nicolo@nixo.xyz>
10 ;;; Copyright © 2020 Roel Janssen <roel@gnu.org>
11 ;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net>
12 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
13 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
14 ;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
15 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
16 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
17 ;;; Copyright © 2020, 2021 Greg Hogan <code@greghogan.com>
18 ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
19 ;;; Copyright © 2020 Milkey Mouse <milkeymouse@meme.institute>
20 ;;;
21 ;;; This file is part of GNU Guix.
22 ;;;
23 ;;; GNU Guix is free software; you can redistribute it and/or modify it
24 ;;; under the terms of the GNU General Public License as published by
25 ;;; the Free Software Foundation; either version 3 of the License, or (at
26 ;;; your option) any later version.
27 ;;;
28 ;;; GNU Guix is distributed in the hope that it will be useful, but
29 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
30 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 ;;; GNU General Public License for more details.
32 ;;;
33 ;;; You should have received a copy of the GNU General Public License
34 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
35
36 (define-module (gnu packages cpp)
37 #:use-module ((guix licenses) #:prefix license:)
38 #:use-module (guix packages)
39 #:use-module (guix download)
40 #:use-module (guix git-download)
41 #:use-module (guix build-system cmake)
42 #:use-module (guix build-system gnu)
43 #:use-module (guix build-system python)
44 #:use-module (guix modules)
45 #:use-module (gnu packages)
46 #:use-module (gnu packages autotools)
47 #:use-module (gnu packages boost)
48 #:use-module (gnu packages c)
49 #:use-module (gnu packages check)
50 #:use-module (gnu packages code)
51 #:use-module (gnu packages compression)
52 #:use-module (gnu packages crypto)
53 #:use-module (gnu packages curl)
54 #:use-module (gnu packages documentation)
55 #:use-module (gnu packages gcc)
56 #:use-module (gnu packages libevent)
57 #:use-module (gnu packages libunwind)
58 #:use-module (gnu packages linux)
59 #:use-module (gnu packages llvm)
60 #:use-module (gnu packages logging)
61 #:use-module (gnu packages maths)
62 #:use-module (gnu packages perl)
63 #:use-module (gnu packages pkg-config)
64 #:use-module (gnu packages popt)
65 #:use-module (gnu packages pretty-print)
66 #:use-module (gnu packages tls)
67 #:use-module (gnu packages web))
68
69 (define-public range-v3
70 (package
71 (name "range-v3")
72 (version "0.11.0")
73 (source
74 (origin
75 (method git-fetch)
76 (uri
77 (git-reference
78 (url "https://github.com/ericniebler/range-v3.git")
79 (commit version)))
80 (file-name
81 (git-file-name name version))
82 (sha256
83 (base32 "18230bg4rq9pmm5f8f65j444jpq56rld4fhmpham8q3vr1c1bdjh"))))
84 (build-system cmake-build-system)
85 (native-inputs
86 `(("doxygen" ,doxygen)
87 ("perl" ,perl)))
88 (inputs
89 `(("boost" ,boost)))
90 (synopsis "Range library for C++14/17/20")
91 (description "Range-v3 is an extension of the Standard Template Library that
92 makes its iterators and algorithms more powerful by making them composable.
93 Unlike other range-like solutions which, seek to do away with iterators, in
94 range-v3 ranges are an abstration layer on top of iterators.")
95 (home-page "https://github.com/ericniebler/range-v3/")
96 (license
97 (list
98 ;; Elements of Programming
99 (license:x11-style "file:///LICENSE.txt")
100 ;; SGI STL
101 license:sgifreeb2.0
102 ;;; LibC++ (dual-licensed)
103 license:expat
104 license:ncsa
105 ;; Others
106 license:boost1.0))))
107
108 (define-public c++-gsl
109 (package
110 (name "c++-gsl")
111 (version "3.1.0")
112 (source
113 (origin
114 (method git-fetch)
115 (uri
116 (git-reference
117 (url "https://github.com/microsoft/GSL.git")
118 (commit
119 (string-append "v" version))))
120 (file-name
121 (git-file-name name version))
122 (patches
123 (search-patches
124 "c++-gsl-find-system-gtest.patch"))
125 (sha256
126 (base32 "0gbvr48f03830g3154bjhw92b8ggmg6wwh5xyb8nppk9v6w752l0"))))
127 (build-system cmake-build-system)
128 (native-inputs
129 `(("googletest" ,googletest)
130 ("pkg-config" ,pkg-config)))
131 (synopsis "Guidelines Support Library")
132 (description "c++-gsl contains functions and types that are suggested for
133 use by the C++ Core Guidelines maintained by the Standard C++ Foundation.")
134 (home-page "https://github.com/microsoft/GSL/")
135 (license license:expat)))
136
137 (define-public libzen
138 (package
139 (name "libzen")
140 (version "0.4.38")
141 (source (origin
142 (method url-fetch)
143 ;; Warning: This source has proved unreliable 1 time at least.
144 ;; Consider an alternate source or report upstream if this
145 ;; happens again.
146 (uri (string-append "https://mediaarea.net/download/source/"
147 "libzen/" version "/"
148 "libzen_" version ".tar.bz2"))
149 (sha256
150 (base32
151 "1nkygc17sndznpcf71fdrhwpm8z9a3hc9csqlafwswh49axhfkjr"))))
152 (native-inputs
153 `(("autoconf" ,autoconf)
154 ("automake" ,automake)
155 ("libtool" ,libtool)))
156 (build-system gnu-build-system)
157 (arguments
158 '(#:phases
159 ;; The build scripts are not at the root of the archive.
160 (modify-phases %standard-phases
161 (add-after 'unpack 'pre-configure
162 (lambda _
163 (chdir "Project/GNU/Library")
164 #t)))))
165 (home-page "https://github.com/MediaArea/ZenLib")
166 (synopsis "C++ utility library")
167 (description "ZenLib is a C++ utility library. It includes classes for handling
168 strings, configuration, bit streams, threading, translation, and cross-platform
169 operating system functions.")
170 (license license:zlib)))
171
172 (define-public rttr
173 (package
174 (name "rttr")
175 (version "0.9.6")
176 (source
177 (origin
178 (method git-fetch)
179 (uri (git-reference
180 (url "https://github.com/rttrorg/rttr/")
181 (commit (string-append "v" version))))
182 (sha256
183 (base32 "1yxad8sj40wi75hny8w6imrsx8wjasjmsipnlq559n4b6kl84ijp"))
184 (file-name (git-file-name name version))))
185 (build-system cmake-build-system)
186 (arguments
187 '(;; No check target. Setting test-target to "unit_test" runs it twice.
188 #:tests? #f
189 #:configure-flags
190 '("-DBUILD_DOCUMENTATION=OFF" "-DBUILD_EXAMPLES=OFF")
191 #:phases
192 (modify-phases %standard-phases
193 ;; library_test fails in chroot.
194 (add-after 'unpack 'skip-library-test
195 (lambda _
196 (substitute* "src/unit_tests/unit_tests.cmake"
197 (("misc/library_test.cpp") ""))
198 #t)))))
199 (native-inputs `(("pkg-config" ,pkg-config)))
200 (home-page "https://github.com/rttrorg/rttr/")
201 (synopsis "C++ Reflection Library")
202 (description
203 "RTTR stands for Run Time Type Reflection. It describes the ability of a
204 computer program to introspect and modify an object at runtime. It is also
205 the name of the library itself, which is written in C++.")
206 (license license:expat)))
207
208 (define-public rct
209 (let* ((commit "b3e6f41d9844ef64420e628e0c65ed98278a843a")
210 (revision "2"))
211 (package
212 (name "rct")
213 (version (git-version "0.0.0" revision commit))
214 (source (origin
215 (method git-fetch)
216 (uri (git-reference
217 (url "https://github.com/Andersbakken/rct")
218 (commit commit)))
219 (sha256
220 (base32
221 "1m2931jacka27ghnpgf1z1plkkr64z0pga4r4zdrfpp2d7xnrdvb"))
222 (patches (search-patches "rct-add-missing-headers.patch"))
223 (file-name (git-file-name name version))))
224 (build-system cmake-build-system)
225 (arguments
226 '(#:configure-flags
227 '("-DWITH_TESTS=ON" ; To run the test suite
228 "-DRCT_RTTI_ENABLED=ON")))
229 (native-inputs
230 `(("cppunit" ,cppunit)
231 ("pkg-config" ,pkg-config)))
232 (inputs
233 `(("openssl" ,openssl)
234 ("zlib" ,zlib)))
235 (home-page "https://github.com/Andersbakken/rct")
236 (synopsis "C++ library providing Qt-like APIs on top of the STL")
237 (description "Rct is a set of C++ tools that provide nicer (more Qt-like)
238 APIs on top of Standard Template Library (@dfn{STL}) classes.")
239 (license (list license:expat ; cJSON
240 license:bsd-4))))) ; everything else (LICENSE.txt)
241
242 (define-public dashel
243 (package
244 (name "dashel")
245 (version "1.3.3")
246 (source
247 (origin
248 (method git-fetch)
249 (uri (git-reference
250 (url "https://github.com/aseba-community/dashel")
251 (commit version)))
252 (sha256
253 (base32 "0anks2l2i2qp0wlzqck1qgpq15a3l6dg8lw2h8s4nsj7f61lffwy"))
254 (file-name (git-file-name name version))))
255 (build-system cmake-build-system)
256 (arguments '(#:tests? #f)) ; no tests
257 (native-inputs `(("pkg-config" ,pkg-config)))
258 (home-page "https://github.com/aseba-community/dashel")
259 (synopsis "Data stream helper encapsulation library")
260 (description
261 "Dashel is a data stream helper encapsulation C++ library. It provides a
262 unified access to TCP/UDP sockets, serial ports, console, and files streams.
263 It also allows a server application to wait for any activity on any
264 combination of these streams.")
265 (license license:bsd-3)))
266
267 (define-public xsimd
268 (package
269 (name "xsimd")
270 (version "7.4.9")
271 (source
272 (origin
273 (method git-fetch)
274 (uri (git-reference
275 (url "https://github.com/QuantStack/xsimd")
276 (commit version)))
277 (sha256
278 (base32 "11by8gbshm4vv6flqp0ihff8c6nmbaqq7ms93b38rrq68bigcply"))
279 (file-name (git-file-name name version))))
280 (build-system cmake-build-system)
281 (arguments
282 `(#:configure-flags (list "-DBUILD_TESTS=ON")
283 #:test-target "xtest"))
284 (native-inputs
285 `(("googletest" ,googletest)))
286 (home-page "https://github.com/QuantStack/xsimd")
287 (synopsis "C++ wrappers for SIMD intrinsics and math implementations")
288 (description
289 "xsimd provides a unified means for using @acronym{SIMD, single instruction
290 multiple data} features for library authors. Namely, it enables manipulation of
291 batches of numbers with the same arithmetic operators as for single values.
292 It also provides accelerated implementation of common mathematical functions
293 operating on batches.")
294 (license license:bsd-3)))
295
296 (define-public chaiscript
297 (package
298 (name "chaiscript")
299 (version "6.1.0")
300 (source
301 (origin
302 (method git-fetch)
303 (uri (git-reference
304 (url "https://github.com/ChaiScript/ChaiScript")
305 (commit (string-append "v" version))))
306 (file-name (git-file-name name version))
307 (sha256
308 (base32 "0i1c88rn1wwz8nf3dpapcdkk4w623m3nksfy5yjai10k9irkzy3c"))))
309 (build-system cmake-build-system)
310 (home-page "https://chaiscript.com/")
311 (synopsis "Embedded scripting language designed for C++")
312 (description
313 "ChaiScript is one of the only embedded scripting language designed from
314 the ground up to directly target C++ and take advantage of modern C++
315 development techniques. Being a native C++ application, it has some advantages
316 over existing embedded scripting languages:
317
318 @enumerate
319 @item Uses a header-only approach, which makes it easy to integrate with
320 existing projects.
321 @item Maintains type safety between your C++ application and the user scripts.
322 @item Supports a variety of C++ techniques including callbacks, overloaded
323 functions, class methods, and stl containers.
324 @end enumerate\n")
325 (license license:bsd-3)))
326
327 (define-public fifo-map
328 (let* ((commit "0dfbf5dacbb15a32c43f912a7e66a54aae39d0f9")
329 (revision "0")
330 (version (git-version "1.1.1" revision commit)))
331 (package
332 (name "fifo-map")
333 (version version)
334 (home-page "https://github.com/nlohmann/fifo_map")
335 (source (origin
336 (method git-fetch)
337 (uri (git-reference
338 (url home-page)
339 (commit commit)))
340 (sha256
341 (base32
342 "0pi77b75kp0l7z454ihcd14nzpi3nc5m4nyjbsgy5f9bw3676196"))
343 (patches (search-patches "fifo-map-remove-catch.hpp.patch"
344 "fifo-map-fix-flags-for-gcc.patch"))
345 (file-name (git-file-name name version))
346 (modules '((guix build utils)))
347 (snippet '(delete-file-recursively "./test/thirdparty"))))
348 (native-inputs
349 `(("catch2" ,catch-framework2-1)))
350 (build-system cmake-build-system)
351 (arguments
352 `(#:phases
353 (modify-phases %standard-phases
354 (replace 'check
355 (lambda _
356 (invoke "./unit")))
357 (replace 'install
358 (lambda* (#:key outputs #:allow-other-keys)
359 (let* ((out (assoc-ref outputs "out"))
360 (inc (string-append out "/include/fifo_map")))
361 (with-directory-excursion
362 (string-append "../" ,name "-" ,version "-checkout")
363 (install-file "src/fifo_map.hpp" inc)
364 #t)))))))
365 (synopsis "FIFO-ordered associative container for C++")
366 (description "Fifo_map is a C++ header only library for associative
367 container which uses the order in which keys were inserted to the container
368 as ordering relation.")
369 (license license:expat))))
370
371 (define-public json-modern-cxx
372 (package
373 (name "json-modern-cxx")
374 (version "3.9.1")
375 (home-page "https://github.com/nlohmann/json")
376 (source
377 (origin
378 (method git-fetch)
379 (uri (git-reference (url home-page)
380 (commit (string-append "v" version))))
381 (sha256
382 (base32 "0ar4mzp53lskxw3vdzw07f47njcshl3lwid9jfq6l7yx6ds2nyjc"))
383 (file-name (git-file-name name version))
384 (modules '((guix build utils)))
385 (snippet
386 '(begin
387 ;; Delete bundled software. Preserve doctest_compatibility.h, which
388 ;; is a wrapper library added by this package.
389 (install-file "./test/thirdparty/doctest/doctest_compatibility.h" "/tmp")
390 (for-each delete-file-recursively
391 '("./third_party" "./test/thirdparty" "./benchmarks/thirdparty"))
392 (install-file "/tmp/doctest_compatibility.h" "./test/thirdparty/doctest")
393
394 ;; Adjust for the unbundled fifo_map and doctest.
395 (substitute* "./test/thirdparty/doctest/doctest_compatibility.h"
396 (("#include \"doctest\\.h\"")
397 "#include <doctest/doctest.h>"))
398 (with-directory-excursion "test/src"
399 (let ((files (find-files "." "\\.cpp$")))
400 (substitute* files
401 (("#include ?\"(fifo_map.hpp)\"" all fifo-map-hpp)
402 (string-append
403 "#include <fifo_map/" fifo-map-hpp ">")))))
404 #t))))
405 (build-system cmake-build-system)
406 (arguments
407 '(#:configure-flags
408 (list "-DJSON_MultipleHeaders=ON" ; For json_fwd.hpp.
409 (string-append "-DJSON_TestDataDirectory="
410 (assoc-ref %build-inputs "json_test_data")))
411 #:phases (modify-phases %standard-phases
412 ;; XXX: When tests are enabled, the install phase will cause
413 ;; a needless rebuild without the given configure flags,
414 ;; ultimately creating both $out/lib and $out/lib64. Move
415 ;; the check phase after install to work around it.
416 (delete 'check)
417 (add-after 'install 'check
418 (lambda* (#:key tests? #:allow-other-keys)
419 (if tests?
420 ;; Some tests need git and a full checkout, skip those.
421 (invoke "ctest" "-LE" "git_required")
422 (format #t "test suite not run~%"))
423 #t)))))
424 (native-inputs
425 `(("amalgamate" ,amalgamate)
426 ("doctest" ,doctest)
427 ("json_test_data"
428 ,(let ((version "3.0.0"))
429 (origin
430 (method git-fetch)
431 (uri (git-reference
432 (url "https://github.com/nlohmann/json_test_data")
433 (commit (string-append "v" version))))
434 (file-name (git-file-name "json_test_data" version))
435 (sha256
436 (base32
437 "0nzsjzlvk14dazwh7k2jb1dinb0pv9jbx5jsyn264wvva0y7daiv")))))))
438 (inputs
439 `(("fifo-map" ,fifo-map)))
440 (synopsis "JSON parser and printer library for C++")
441 (description "JSON for Modern C++ is a C++ JSON library that provides
442 intuitive syntax and trivial integration.")
443 (license license:expat)))
444
445 (define-public nlohmann-json-cpp
446 (deprecated-package "nlohmann-json-cpp" json-modern-cxx))
447
448 (define-public xtl
449 (package
450 (name "xtl")
451 (version "0.6.23")
452 (source (origin
453 (method git-fetch)
454 (uri
455 (git-reference
456 (url "https://github.com/QuantStack/xtl")
457 (commit version)))
458 (sha256
459 (base32
460 "1kd9zl4h6nrsg29hq13vwp4zhfj8sa90vj40726lpw6vxz48k4di"))
461 (file-name (git-file-name name version))))
462 (native-inputs
463 `(("googletest" ,googletest)
464 ("json-modern-cxx" ,json-modern-cxx)))
465 (arguments
466 `(#:configure-flags
467 '("-DBUILD_TESTS=ON")
468 #:phases
469 (modify-phases %standard-phases
470 (replace 'check
471 (lambda* _
472 (with-directory-excursion "test"
473 (invoke "./test_xtl")
474 #t))))))
475 (home-page "https://github.com/QuantStack/xtl")
476 (build-system cmake-build-system)
477 (synopsis "C++ template library providing some basic tools")
478 (description "xtl is a C++ header-only template library providing basic
479 tools (containers, algorithms) used by other QuantStack packages.")
480 (license license:bsd-3)))
481
482 (define-public ccls
483 (package
484 (name "ccls")
485 (version "0.20201025")
486 (source
487 (origin
488 (method git-fetch)
489 (uri (git-reference
490 (url "https://github.com/MaskRay/ccls")
491 (commit version)))
492 (sha256
493 (base32
494 "13v00q1bz8g0ckw1sv0zyicbc44irc00vhwxdv3vvwlvylm7s21p"))
495 (file-name (git-file-name name version))))
496 (build-system cmake-build-system)
497 (arguments
498 '(#:tests? #f)) ; no check target
499 (inputs
500 `(("rapidjson" ,rapidjson)))
501 (native-inputs
502 `(("clang" ,clang)
503 ("llvm" ,llvm)))
504 (home-page "https://github.com/MaskRay/ccls")
505 (synopsis "C/C++/Objective-C language server")
506 (description
507 "@code{ccls} is a server implementing the Language Server Protocol (LSP)
508 for C, C++ and Objective-C languages. It uses @code{clang} to perform static
509 code analysis and supports cross references, hierarchies, completion and
510 syntax highlighting. @code{ccls} is derived from @code{cquery} which is not
511 maintained anymore.")
512 (license license:asl2.0)))
513
514 (define-public gperftools
515 (package
516 (name "gperftools")
517 (version "2.8.1")
518 (source
519 (origin
520 (method git-fetch)
521 (uri (git-reference
522 (url "https://github.com/gperftools/gperftools")
523 (commit (string-append "gperftools-" version))))
524 (sha256
525 (base32 "19bj2vlsbfwq7m826v2ccqg47kd7cb5vcz1yw2x0v5qzhaxbakk1"))
526 (file-name (git-file-name name version))))
527 (build-system gnu-build-system)
528 (arguments
529 ;; The tests are flaky when run in parallel. For more info:
530 ;; https://bugs.gnu.org/46562
531 '(#:parallel-tests? #f))
532 (native-inputs
533 `(("autoconf" ,autoconf)
534 ("automake" ,automake)
535 ("libtool" ,libtool)
536 ;; For tests.
537 ("perl" ,perl)))
538 (home-page "https://github.com/gperftools/gperftools")
539 (synopsis "Multi-threaded malloc() and performance analysis tools for C++")
540 (description
541 "@code{gperftools} is a collection of a high-performance multi-threaded
542 malloc() implementation plus some thread-friendly performance analysis
543 tools:
544
545 @itemize
546 @item tcmalloc,
547 @item heap profiler,
548 @item heap checker,
549 @item CPU checker.
550 @end itemize\n")
551 (license license:bsd-3)))
552
553 (define-public cpplint
554 (package
555 (name "cpplint")
556 (version "1.4.5")
557 (source
558 (origin
559 (method git-fetch)
560 ;; Fetch from github instead of pypi, since the test cases are not in
561 ;; the pypi archive.
562 (uri (git-reference
563 (url "https://github.com/cpplint/cpplint")
564 (commit version)))
565 (sha256
566 (base32 "1yzcxqx0186sh80p0ydl9z0ld51fn2cdpz9hmhrp15j53g9ira7c"))
567 (file-name (git-file-name name version))))
568 (arguments
569 `(#:phases
570 (modify-phases %standard-phases
571 (add-before 'check 'use-later-pytest
572 (lambda _
573 (substitute* "test-requirements"
574 (("pytest.*") "pytest\n"))
575 #t)))))
576 (build-system python-build-system)
577 (native-inputs
578 `(("python-pytest" ,python-pytest)
579 ("python-pytest-cov" ,python-pytest-cov)
580 ("python-pytest-runner" ,python-pytest-runner)))
581 (home-page "https://github.com/cpplint/cpplint")
582 (synopsis "Static code checker for C++")
583 (description "@code{cpplint} is a command-line tool to check C/C++ files
584 for style issues following Google’s C++ style guide. While Google maintains
585 it's own version of the tool, this is a fork that aims to be more responsive
586 and make @code{cpplint} usable in wider contexts.")
587 (license license:bsd-3)))
588
589 (define-public reproc
590 (package
591 (name "reproc")
592 (version "14.1.0")
593 (source
594 (origin
595 (method git-fetch)
596 (uri (git-reference
597 (url "https://github.com/DaanDeMeyer/reproc")
598 (commit (string-append "v" version))))
599 (file-name (git-file-name name version))
600 (sha256
601 (base32
602 "1n71wb50qv2dmhjgw7azx5gigbrp19l2n3d41g9p05l5l0y1qg0q"))))
603 (build-system cmake-build-system)
604 (arguments
605 ;; No tests.
606 `(#:tests? #f
607 ;; Enable building of shared library.
608 #:configure-flags `("-DBUILD_SHARED_LIBS=1")))
609 (native-inputs
610 `(("pkg-config" ,pkg-config)))
611 (synopsis "Process IO library")
612 (description "reproc (Redirected Process) is a C/C++ library that
613 simplifies starting, stopping and communicating with external programs. The
614 main use case is executing command line applications directly from C or C++
615 code and retrieving their output.")
616 (home-page "https://github.com/DaanDeMeyer/reproc")
617 (license license:expat)))
618
619 (define-public sobjectizer
620 (package
621 (name "sobjectizer")
622 (version "5.6.1")
623 (source
624 (origin
625 (method git-fetch)
626 (uri (git-reference
627 (url "https://github.com/Stiffstream/sobjectizer")
628 (commit (string-append "v." version))))
629 (sha256
630 (base32 "0jfai7sqxnnjkms38krm7mssj5l79nb3pllkbyj4j581a7l5j6l5"))
631 (file-name (git-file-name name version))))
632 (build-system cmake-build-system)
633 (arguments
634 `(#:tests? #f
635 #:phases
636 (modify-phases %standard-phases
637 (add-after 'unpack 'change-directory
638 (lambda _
639 (chdir "dev")
640 #t)))))
641 (home-page "https://stiffstream.com/en/products/sobjectizer.html")
642 (synopsis "Cross-platform actor framework for C++")
643 (description
644 "SObjectizer is a cross-platform \"actor frameworks\" for C++.
645 SObjectizer supports not only the Actor Model but also the Publish-Subscribe
646 Model and CSP-like channels. The goal of SObjectizer is to simplify
647 development of concurrent and multithreaded applications in C++.")
648 (license license:bsd-3)))
649
650 (define-public tweeny
651 (package
652 (name "tweeny")
653 (version "3")
654 (source
655 (origin
656 (method git-fetch)
657 (uri (git-reference
658 (url "https://github.com/mobius3/tweeny")
659 (commit (string-append "v" version))))
660 (file-name (git-file-name name version))
661 (sha256
662 (base32 "1adm4c17pi7xf3kf6sjyxibz5rdg1ka236p72xsm6js4j9gzlbp4"))))
663 (arguments
664 '(#:tests? #f)) ;no check target
665 (build-system cmake-build-system)
666 (home-page "https://mobius3.github.io/tweeny/")
667 (synopsis "Modern C++ tweening library")
668 (description "@code{Tweeny} is an inbetweening library designed for the
669 creation of complex animations for games and other beautiful interactive
670 software. It leverages features of modern @code{C++} to empower developers with
671 an intuitive API for declaring tweenings of any type of value, as long as they
672 support arithmetic operations. The goal of @code{Tweeny} is to provide means to
673 create fluid interpolations when animating position, scale, rotation, frames or
674 other values of screen objects, by setting their values as the tween starting
675 point and then, after each tween step, plugging back the result.")
676 (license license:expat)))
677
678 (define-public abseil-cpp
679 (package
680 (name "abseil-cpp")
681 (version "20200225.2")
682 (source (origin
683 (method git-fetch)
684 (uri (git-reference
685 (url "https://github.com/abseil/abseil-cpp")
686 (commit version)))
687 (file-name (git-file-name name version))
688 (sha256
689 (base32
690 "0dwxg54pv6ihphbia0iw65r64whd7v8nm4wwhcz219642cgpv54y"))))
691 (build-system cmake-build-system)
692 (arguments
693 `(#:configure-flags (list "-DBUILD_SHARED_LIBS=ON"
694 "-DABSL_RUN_TESTS=ON"
695 ;; Needed, else we get errors like:
696 ;;
697 ;; ld: CMakeFiles/absl_periodic_sampler_test.dir/internal/periodic_sampler_test.cc.o:
698 ;; undefined reference to symbol '_ZN7testing4Mock16UnregisterLockedEPNS_8internal25UntypedFunctionMockerBaseE'
699 ;; ld: /gnu/store/...-googletest-1.10.0/lib/libgmock.so:
700 ;; error adding symbols: DSO missing from command line
701 ;; collect2: error: ld returned 1 exit status
702 "-DCMAKE_EXE_LINKER_FLAGS=-lgtest -lpthread -lgmock")
703 #:phases
704 (modify-phases %standard-phases
705 (add-before 'configure 'remove-gtest-check
706 ;; The CMakeLists fails to find our googletest for some reason, but
707 ;; it works nonetheless.
708 (lambda _
709 (substitute* "CMakeLists.txt"
710 (("check_target\\(gtest\\)") "")
711 (("check_target\\(gtest_main\\)") "")
712 (("check_target\\(gmock\\)") "")))))))
713 (native-inputs
714 `(("googletest" ,googletest)))
715 (home-page "https://abseil.io")
716 (synopsis "Augmented C++ standard library")
717 (description "Abseil is a collection of C++ library code designed to
718 augment the C++ standard library. The Abseil library code is collected from
719 Google's C++ code base.")
720 (license license:asl2.0)))
721
722 (define-public pegtl
723 (package
724 (name "pegtl")
725 (version "2.8.3")
726 (source (origin
727 (method git-fetch)
728 (uri (git-reference
729 (url "https://github.com/taocpp/PEGTL")
730 (commit version)))
731 (file-name (git-file-name name version))
732 (sha256
733 (base32
734 "17crgjfdx55imi2dqnz6xpvsxq07390yfgkz5nd2g77ydkvq9db3"))))
735 (build-system cmake-build-system)
736 (home-page "https://github.com/taocpp/PEGTL")
737 (synopsis "Parsing Expression Grammar template library")
738 (description "The Parsing Expression Grammar Template Library (PEGTL) is
739 a zero-dependency C++ header-only parser combinator library for creating
740 parsers according to a Parsing Expression Grammar (PEG).")
741 (license license:expat)))
742
743 (define-public cxxopts
744 (package
745 (name "cxxopts")
746 (version "2.2.1")
747 (source (origin
748 (method git-fetch)
749 (uri (git-reference
750 (url "https://github.com/jarro2783/cxxopts")
751 (commit (string-append "v" version))))
752 (file-name (git-file-name name version))
753 (sha256
754 (base32
755 "0d3y747lsh1wkalc39nxd088rbypxigm991lk3j91zpn56whrpha"))))
756 (build-system cmake-build-system)
757 (synopsis "Lightweight C++ command line option parser")
758 (description
759 "A lightweight header-only C++ option parser library, supporting the
760 standard GNU style syntax for options.")
761 (home-page "https://github.com/jarro2783/cxxopts/wiki")
762 (license license:expat)))
763
764 (define-public folly
765 (package
766 (name "folly")
767 (version "2021.01.25.00")
768 (source (origin
769 (method git-fetch)
770 (uri (git-reference
771 (url "https://github.com/facebook/folly")
772 (commit (string-append "v" version))))
773 (file-name (git-file-name name version))
774 (sha256
775 (base32
776 "14dl1g6vf7mc90mcync5h2lp14fwcx8n9h91pmiq6rfgv1fjjrwz"))))
777 (build-system cmake-build-system)
778 (arguments
779 '(;; Tests must be explicitly enabled
780 ;;#:configure-flags '("-DBUILD_TESTS=ON")))
781 ;; Leave tests disabled; see https://github.com/facebook/folly/issues/1456
782 #:tests? #f))
783 (propagated-inputs
784 `(("boost" ,boost)
785 ("gflags" ,gflags)
786 ("glog" ,glog)
787 ("liburing" ,liburing)))
788 (inputs
789 `(("bzip2" ,bzip2)
790 ("double-conversion" ,double-conversion)
791 ("fmt" ,fmt)
792 ("libaio" ,libaio)
793 ("libevent" ,libevent)
794 ("libiberty" ,libiberty)
795 ("libsodium" ,libsodium)
796 ("libunwind" ,libunwind)
797 ("lz4" ,lz4)
798 ("openssl" ,openssl)
799 ("snappy" ,snappy)
800 ("zlib" ,zlib)
801 ("zstd" ,zstd "lib")))
802 (native-inputs
803 `(("googletest" ,googletest)))
804 (synopsis "Collection of C++ components complementing the standard library")
805 (description
806 "Folly (acronymed loosely after Facebook Open Source Library) is a library
807 of C++14 components that complements @code{std} and Boost.")
808 (home-page "https://github.com/facebook/folly/wiki")
809 ;; 32-bit is not supported: https://github.com/facebook/folly/issues/103
810 (supported-systems '("aarch64-linux" "x86_64-linux"))
811 (license license:asl2.0)))
812
813 (define-public aws-sdk-cpp
814 (package
815 (name "aws-sdk-cpp")
816 (version "1.8.102")
817 (source (origin
818 (method git-fetch)
819 (uri (git-reference
820 (url "https://github.com/aws/aws-sdk-cpp")
821 (commit version)))
822 (file-name (git-file-name name version))
823 (sha256
824 (base32
825 "1w8x2vakg5ngjyyg08n4g3dqy8wqnz0k3gkrlqrh460s2pvdivba"))))
826 (build-system cmake-build-system)
827 (arguments
828 '(;; Tests are run during the build phase.
829 #:tests? #f
830 #:configure-flags
831 '("-DBUILD_SHARED_LIBS=OFF"
832 "-DBUILD_DEPS=OFF")))
833 (propagated-inputs
834 `(("aws-c-common" ,aws-c-common)
835 ("aws-c-event-stream" ,aws-c-event-stream)))
836 (inputs
837 `(("aws-checksums" ,aws-checksums)
838 ("curl" ,curl)
839 ("openssl" ,openssl)
840 ("zlib" ,zlib)))
841 (synopsis "Amazon Web Services SDK for C++")
842 (description
843 "The AWS SDK for C++ provides a C++11 interface to the @acronym{AWS,Amazon
844 Web Services} API. AWS provides on-demand computing infrastructure and software
845 services including database, analytic, and machine learning technologies.")
846 (home-page "https://github.com/aws/aws-sdk-cpp")
847 (license license:asl2.0)))
848
849 (define-public libexpected
850 (package
851 (name "libexpected")
852 (version "1.0.0")
853 (source
854 (origin
855 (method git-fetch)
856 (uri (git-reference
857 (url "https://github.com/TartanLlama/expected")
858 (commit (string-append "v" version))
859 ;; NOTE: Requires TL_CMAKE from custom
860 ;; repository. Should not affect reproducibility.
861 (recursive? #t)))
862 (file-name (git-file-name name version))
863 ;; NOTE: This patch will be unnecessary on subsequent tags.
864 (patches (search-patches "libexpected-nofetch.patch"))
865 (sha256
866 (base32 "1ckzfrljzzdw9wf8hvdfjz4wjx5na57iwxc48mbv9rf5067m21a5"))))
867 (build-system cmake-build-system)
868 ;; TODO: Clean up install phase.
869 (arguments
870 `(#:phases
871 (modify-phases %standard-phases
872 (replace 'check
873 (lambda _
874 (invoke "./tests"))))))
875 (native-inputs
876 `(("catch2" ,catch-framework2)))
877 (synopsis "C++11/14/17 std::expected with functional-style extensions")
878 (description "@code{std::expected} is proposed as the preferred way to
879 represent objects which will either have an expected value, or an unexpected
880 value giving information about why something failed. Unfortunately, chaining
881 together many computations which may fail can be verbose, as error-checking
882 code will be mixed in with the actual programming logic. This implementation
883 provides a number of utilities to make coding with expected cleaner.")
884 (home-page "https://tl.tartanllama.xyz/")
885 (license license:cc0)))
886
887 (define-public magic-enum
888 (package
889 (name "magic-enum")
890 (version "0.7.2")
891 (home-page "https://github.com/Neargye/magic_enum")
892 (source (origin
893 (method git-fetch)
894 (uri (git-reference
895 (url home-page)
896 (commit (string-append "v" version))))
897 (file-name (git-file-name name version))
898 (sha256
899 (base32
900 "07j5zdf3vkliwrcv6k663k35akn7qp23794sz2mnvkj9hbv9s8cx"))))
901 (build-system cmake-build-system)
902 (native-inputs
903 `(("gcc" ,gcc-9)))
904 (synopsis "C++17 header only library for compile time reflection of enums")
905 (description "Magic Enum offers static reflection of enums, with
906 conversions to and from strings, iteration and related functionality.")
907 (license license:expat)))
908
909 (define-public cli11
910 (package
911 (name "cli11")
912 (version "1.9.1")
913 (source
914 (origin
915 (method git-fetch)
916 (uri (git-reference
917 (url "https://github.com/CLIUtils/CLI11")
918 (commit (string-append "v" version))))
919 (file-name (git-file-name name version))
920 (sha256
921 (base32 "0hbch0vk8irgmiaxnfqlqys65v1770rxxdfn3d23m2vqyjh0j9l6"))
922 (modules '((guix build utils)))
923 (snippet
924 '(begin (delete-file-recursively "extern")
925 #t))))
926 (build-system cmake-build-system)
927 (arguments
928 `(#:configure-flags
929 '("-DCLI11_SINGLE_FILE=OFF"
930 "-DCLI11_BUILD_EXAMPLES=OFF")
931 #:imported-modules ,(append %cmake-build-system-modules
932 (source-module-closure '((guix utils))))
933 #:phases
934 (modify-phases %standard-phases
935 (add-before 'configure 'no-vendor-gtest
936 (lambda _
937 (use-modules (guix utils))
938 (substitute* "tests/CMakeLists.txt"
939 ;; We provide our own googletest, so this is not really a problem.
940 (("message\\(FATAL_ERROR \"You have requested tests be built, but googletest is not downloaded." msg)
941 (string-replace-substring msg "FATAL_ERROR" "TRACE")))
942 (substitute* "cmake/AddGoogletest.cmake"
943 (("^add_subdirectory\\(.*googletest.*$") "find_package(GTest REQUIRED)")
944 (("^set_target_properties\\(gtest gtest_main gmock gmock_main") "")
945 (("^ PROPERTIES FOLDER \"Extern\"\\)") ""))
946 #t)))))
947 (native-inputs
948 `(("doxygen" ,doxygen)
949 ("googletest" ,googletest)))
950 (synopsis "Command line parser for C++11")
951 (description
952 "CLI11 is a command line parser for C++11 and beyond that provides a rich
953 feature set with a simple and intuitive interface.")
954 (home-page "https://cliutils.github.io/CLI11/book/")
955 (license license:bsd-3)))