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