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>
21 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
69 (define-public range-v3
78 (url "https://github.com/ericniebler/range-v3.git")
81 (git-file-name name version))
83 (base32 "18230bg4rq9pmm5f8f65j444jpq56rld4fhmpham8q3vr1c1bdjh"))))
84 (build-system cmake-build-system)
86 `(("doxygen" ,doxygen)
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/")
98 ;; Elements of Programming
99 (license:x11-style "file:///LICENSE.txt")
102 ;;; LibC++ (dual-licensed)
108 (define-public c++-gsl
117 (url "https://github.com/microsoft/GSL.git")
119 (string-append "v" version))))
121 (git-file-name name version))
124 "c++-gsl-find-system-gtest.patch"))
126 (base32 "0gbvr48f03830g3154bjhw92b8ggmg6wwh5xyb8nppk9v6w752l0"))))
127 (build-system cmake-build-system)
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)))
137 (define-public libzen
143 ;; Warning: This source has proved unreliable 1 time at least.
144 ;; Consider an alternate source or report upstream if this
146 (uri (string-append "https://mediaarea.net/download/source/"
147 "libzen/" version "/"
148 "libzen_" version ".tar.bz2"))
151 "1nkygc17sndznpcf71fdrhwpm8z9a3hc9csqlafwswh49axhfkjr"))))
153 `(("autoconf" ,autoconf)
154 ("automake" ,automake)
155 ("libtool" ,libtool)))
156 (build-system gnu-build-system)
159 ;; The build scripts are not at the root of the archive.
160 (modify-phases %standard-phases
161 (add-after 'unpack 'pre-configure
163 (chdir "Project/GNU/Library")
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)))
180 (url "https://github.com/rttrorg/rttr/")
181 (commit (string-append "v" version))))
183 (base32 "1yxad8sj40wi75hny8w6imrsx8wjasjmsipnlq559n4b6kl84ijp"))
184 (file-name (git-file-name name version))))
185 (build-system cmake-build-system)
187 '(;; No check target. Setting test-target to "unit_test" runs it twice.
190 '("-DBUILD_DOCUMENTATION=OFF" "-DBUILD_EXAMPLES=OFF")
192 (modify-phases %standard-phases
193 ;; library_test fails in chroot.
194 (add-after 'unpack 'skip-library-test
196 (substitute* "src/unit_tests/unit_tests.cmake"
197 (("misc/library_test.cpp") ""))
199 (native-inputs `(("pkg-config" ,pkg-config)))
200 (home-page "https://github.com/rttrorg/rttr/")
201 (synopsis "C++ Reflection Library")
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)))
209 (let* ((commit "b3e6f41d9844ef64420e628e0c65ed98278a843a")
213 (version (git-version "0.0.0" revision commit))
217 (url "https://github.com/Andersbakken/rct")
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)
227 '("-DWITH_TESTS=ON" ; To run the test suite
228 "-DRCT_RTTI_ENABLED=ON")))
230 `(("cppunit" ,cppunit)
231 ("pkg-config" ,pkg-config)))
233 `(("openssl" ,openssl)
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)
242 (define-public dashel
250 (url "https://github.com/aseba-community/dashel")
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")
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)))
275 (url "https://github.com/QuantStack/xsimd")
278 (base32 "11by8gbshm4vv6flqp0ihff8c6nmbaqq7ms93b38rrq68bigcply"))
279 (file-name (git-file-name name version))))
280 (build-system cmake-build-system)
282 `(#:configure-flags (list "-DBUILD_TESTS=ON")
283 #:test-target "xtest"))
285 `(("googletest" ,googletest)))
286 (home-page "https://github.com/QuantStack/xsimd")
287 (synopsis "C++ wrappers for SIMD intrinsics and math implementations")
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)))
296 (define-public chaiscript
304 (url "https://github.com/ChaiScript/ChaiScript")
305 (commit (string-append "v" version))))
306 (file-name (git-file-name name version))
308 (base32 "0i1c88rn1wwz8nf3dpapcdkk4w623m3nksfy5yjai10k9irkzy3c"))))
309 (build-system cmake-build-system)
310 (home-page "https://chaiscript.com/")
311 (synopsis "Embedded scripting language designed for C++")
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:
319 @item Uses a header-only approach, which makes it easy to integrate with
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.
325 (license license:bsd-3)))
327 (define-public fifo-map
328 (let* ((commit "0dfbf5dacbb15a32c43f912a7e66a54aae39d0f9")
330 (version (git-version "1.1.1" revision commit)))
334 (home-page "https://github.com/nlohmann/fifo_map")
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"))))
349 `(("catch2" ,catch-framework2-1)))
350 (build-system cmake-build-system)
353 (modify-phases %standard-phases
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)
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))))
371 (define-public json-modern-cxx
373 (name "json-modern-cxx")
375 (home-page "https://github.com/nlohmann/json")
379 (uri (git-reference (url home-page)
380 (commit (string-append "v" version))))
382 (base32 "0ar4mzp53lskxw3vdzw07f47njcshl3lwid9jfq6l7yx6ds2nyjc"))
383 (file-name (git-file-name name version))
384 (modules '((guix build utils)))
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")
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$")))
401 (("#include ?\"(fifo_map.hpp)\"" all fifo-map-hpp)
403 "#include <fifo_map/" fifo-map-hpp ">")))))
405 (build-system cmake-build-system)
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.
417 (add-after 'install 'check
418 (lambda* (#:key tests? #:allow-other-keys)
420 ;; Some tests need git and a full checkout, skip those.
421 (invoke "ctest" "-LE" "git_required")
422 (format #t "test suite not run~%"))
425 `(("amalgamate" ,amalgamate)
428 ,(let ((version "3.0.0"))
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))
437 "0nzsjzlvk14dazwh7k2jb1dinb0pv9jbx5jsyn264wvva0y7daiv")))))))
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)))
445 (define-public nlohmann-json-cpp
446 (deprecated-package "nlohmann-json-cpp" json-modern-cxx))
456 (url "https://github.com/QuantStack/xtl")
460 "1kd9zl4h6nrsg29hq13vwp4zhfj8sa90vj40726lpw6vxz48k4di"))
461 (file-name (git-file-name name version))))
463 `(("googletest" ,googletest)
464 ("json-modern-cxx" ,json-modern-cxx)))
467 '("-DBUILD_TESTS=ON")
469 (modify-phases %standard-phases
472 (with-directory-excursion "test"
473 (invoke "./test_xtl")
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)))
485 (version "0.20201025")
490 (url "https://github.com/MaskRay/ccls")
494 "13v00q1bz8g0ckw1sv0zyicbc44irc00vhwxdv3vvwlvylm7s21p"))
495 (file-name (git-file-name name version))))
496 (build-system cmake-build-system)
498 '(#:tests? #f)) ; no check target
500 `(("rapidjson" ,rapidjson)))
504 (home-page "https://github.com/MaskRay/ccls")
505 (synopsis "C/C++/Objective-C language server")
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)))
514 (define-public gperftools
522 (url "https://github.com/gperftools/gperftools")
523 (commit (string-append "gperftools-" version))))
525 (base32 "19bj2vlsbfwq7m826v2ccqg47kd7cb5vcz1yw2x0v5qzhaxbakk1"))
526 (file-name (git-file-name name version))))
527 (build-system gnu-build-system)
529 ;; The tests are flaky when run in parallel. For more info:
530 ;; https://bugs.gnu.org/46562
531 '(#:parallel-tests? #f))
533 `(("autoconf" ,autoconf)
534 ("automake" ,automake)
538 (home-page "https://github.com/gperftools/gperftools")
539 (synopsis "Multi-threaded malloc() and performance analysis tools for C++")
541 "@code{gperftools} is a collection of a high-performance multi-threaded
542 malloc() implementation plus some thread-friendly performance analysis
551 (license license:bsd-3)))
553 (define-public cpplint
560 ;; Fetch from github instead of pypi, since the test cases are not in
563 (url "https://github.com/cpplint/cpplint")
566 (base32 "1yzcxqx0186sh80p0ydl9z0ld51fn2cdpz9hmhrp15j53g9ira7c"))
567 (file-name (git-file-name name version))))
570 (modify-phases %standard-phases
571 (add-before 'check 'use-later-pytest
573 (substitute* "test-requirements"
574 (("pytest.*") "pytest\n"))
576 (build-system python-build-system)
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)))
589 (define-public reproc
597 (url "https://github.com/DaanDeMeyer/reproc")
598 (commit (string-append "v" version))))
599 (file-name (git-file-name name version))
602 "1n71wb50qv2dmhjgw7azx5gigbrp19l2n3d41g9p05l5l0y1qg0q"))))
603 (build-system cmake-build-system)
607 ;; Enable building of shared library.
608 #:configure-flags `("-DBUILD_SHARED_LIBS=1")))
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)))
619 (define-public sobjectizer
627 (url "https://github.com/Stiffstream/sobjectizer")
628 (commit (string-append "v." version))))
630 (base32 "0jfai7sqxnnjkms38krm7mssj5l79nb3pllkbyj4j581a7l5j6l5"))
631 (file-name (git-file-name name version))))
632 (build-system cmake-build-system)
636 (modify-phases %standard-phases
637 (add-after 'unpack 'change-directory
641 (home-page "https://stiffstream.com/en/products/sobjectizer.html")
642 (synopsis "Cross-platform actor framework for C++")
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)))
650 (define-public tweeny
658 (url "https://github.com/mobius3/tweeny")
659 (commit (string-append "v" version))))
660 (file-name (git-file-name name version))
662 (base32 "1adm4c17pi7xf3kf6sjyxibz5rdg1ka236p72xsm6js4j9gzlbp4"))))
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)))
678 (define-public abseil-cpp
681 (version "20200225.2")
685 (url "https://github.com/abseil/abseil-cpp")
687 (file-name (git-file-name name version))
690 "0dwxg54pv6ihphbia0iw65r64whd7v8nm4wwhcz219642cgpv54y"))))
691 (build-system cmake-build-system)
693 `(#:configure-flags (list "-DBUILD_SHARED_LIBS=ON"
694 "-DABSL_RUN_TESTS=ON"
695 ;; Needed, else we get errors like:
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")
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.
709 (substitute* "CMakeLists.txt"
710 (("check_target\\(gtest\\)") "")
711 (("check_target\\(gtest_main\\)") "")
712 (("check_target\\(gmock\\)") "")))))))
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)))
729 (url "https://github.com/taocpp/PEGTL")
731 (file-name (git-file-name name version))
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)))
743 (define-public cxxopts
750 (url "https://github.com/jarro2783/cxxopts")
751 (commit (string-append "v" version))))
752 (file-name (git-file-name name version))
755 "0d3y747lsh1wkalc39nxd088rbypxigm991lk3j91zpn56whrpha"))))
756 (build-system cmake-build-system)
757 (synopsis "Lightweight C++ command line option parser")
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)))
767 (version "2021.01.25.00")
771 (url "https://github.com/facebook/folly")
772 (commit (string-append "v" version))))
773 (file-name (git-file-name name version))
776 "14dl1g6vf7mc90mcync5h2lp14fwcx8n9h91pmiq6rfgv1fjjrwz"))))
777 (build-system cmake-build-system)
779 '(;; Tests must be explicitly enabled
780 ;;#:configure-flags '("-DBUILD_TESTS=ON")))
781 ;; Leave tests disabled; see https://github.com/facebook/folly/issues/1456
787 ("liburing" ,liburing)))
790 ("double-conversion" ,double-conversion)
793 ("libevent" ,libevent)
794 ("libiberty" ,libiberty)
795 ("libsodium" ,libsodium)
796 ("libunwind" ,libunwind)
801 ("zstd" ,zstd "lib")))
803 `(("googletest" ,googletest)))
804 (synopsis "Collection of C++ components complementing the standard library")
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)))
813 (define-public aws-sdk-cpp
820 (url "https://github.com/aws/aws-sdk-cpp")
822 (file-name (git-file-name name version))
825 "1w8x2vakg5ngjyyg08n4g3dqy8wqnz0k3gkrlqrh460s2pvdivba"))))
826 (build-system cmake-build-system)
828 '(;; Tests are run during the build phase.
831 '("-DBUILD_SHARED_LIBS=OFF"
832 "-DBUILD_DEPS=OFF")))
834 `(("aws-c-common" ,aws-c-common)
835 ("aws-c-event-stream" ,aws-c-event-stream)))
837 `(("aws-checksums" ,aws-checksums)
841 (synopsis "Amazon Web Services SDK for C++")
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)))
849 (define-public libexpected
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.
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"))
866 (base32 "1ckzfrljzzdw9wf8hvdfjz4wjx5na57iwxc48mbv9rf5067m21a5"))))
867 (build-system cmake-build-system)
868 ;; TODO: Clean up install phase.
871 (modify-phases %standard-phases
874 (invoke "./tests"))))))
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)))
887 (define-public magic-enum
891 (home-page "https://github.com/Neargye/magic_enum")
896 (commit (string-append "v" version))))
897 (file-name (git-file-name name version))
900 "07j5zdf3vkliwrcv6k663k35akn7qp23794sz2mnvkj9hbv9s8cx"))))
901 (build-system cmake-build-system)
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)))
917 (url "https://github.com/CLIUtils/CLI11")
918 (commit (string-append "v" version))))
919 (file-name (git-file-name name version))
921 (base32 "0hbch0vk8irgmiaxnfqlqys65v1770rxxdfn3d23m2vqyjh0j9l6"))
922 (modules '((guix build utils)))
924 '(begin (delete-file-recursively "extern")
926 (build-system cmake-build-system)
929 '("-DCLI11_SINGLE_FILE=OFF"
930 "-DCLI11_BUILD_EXAMPLES=OFF")
931 #:imported-modules ,(append %cmake-build-system-modules
932 (source-module-closure '((guix utils))))
934 (modify-phases %standard-phases
935 (add-before 'configure 'no-vendor-gtest
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\"\\)") ""))
948 `(("doxygen" ,doxygen)
949 ("googletest" ,googletest)))
950 (synopsis "Command line parser for C++11")
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)))