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