projects/guix·blob wip-postfix · refs

2803 lines · 111.8 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2017 Ethan R. Jones <[email protected]>
3;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <[email protected]>
4;;; Copyright © 2018 Fis Trivial <[email protected]>
5;;; Copyright © 2018, 2021, 2023 Ludovic Courtès <[email protected]>
6;;; Copyright © 2019, 2020, 2022 Mathieu Othacehe <[email protected]>
7;;; Copyright © 2019 Pierre Neidhardt <[email protected]>
8;;; Copyright © 2019 Jan Wielkiewicz <[email protected]>
9;;; Copyright © 2020, 2021 Nicolò Balzarotti <[email protected]>
10;;; Copyright © 2020 Roel Janssen <[email protected]>
11;;; Copyright © 2020, 2021, 2023 Ricardo Wurmus <[email protected]>
12;;; Copyright © 2020 Brice Waegeneire <[email protected]>
13;;; Copyright © 2020, 2021, 2022 Vinicius Monego <[email protected]>
14;;; Copyright © 2020, 2022 Marius Bakke <[email protected]>
15;;; Copyright © 2020 Michael Rohleder <[email protected]>
16;;; Copyright © 2020 Alexandros Theodotou <[email protected]>
17;;; Copyright © 2020-2022 Greg Hogan <[email protected]>
18;;; Copyright © 2020 Brett Gilio <[email protected]>
19;;; Copyright © 2020 Milkey Mouse <[email protected]>
20;;; Copyright © 2021 Raghav Gururajan <[email protected]>
21;;; Copyright © 2021 Felix Gruber <[email protected]>
22;;; Copyright © 2021 Nicolò Balzarotti <[email protected]>
23;;; Copyright © 2021 Guillaume Le Vaillant <[email protected]>
24;;; Copyright © 2021 Nikolay Korotkiy <[email protected]>
25;;; Copyright © 2021 jgart <[email protected]>
26;;; Copyright © 2021 Julien Lepiller <[email protected]>
27;;; Copyright © 2021 Disseminate Dissent <[email protected]>
28;;; Copyright © 2022, 2023 Efraim Flashner <[email protected]>
29;;; Copyright © 2022 muradm <[email protected]>
30;;; Copyright © 2022 Attila Lendvai <[email protected]>
31;;; Copyright © 2022 Arun Isaac <[email protected]>
32;;; Copyright © 2022, 2023 David Elsing <[email protected]>
33;;; Copyright © 2022, 2023 Zheng Junjie <[email protected]>
34;;; Copyright © 2022 Maxim Cournoyer <[email protected]>
35;;; Copyright © 2022 Antero Mejr <[email protected]>
36;;; Copyright © 2023 Sughosha <[email protected]>
37;;; Copyright © 2023 Artyom V. Poptsov <[email protected]>
38;;; Copyright © 2023 Liliana Marie Prikler <[email protected]>
39;;; Copyright © 2023 Denis 'GNUtoo' Carikli <[email protected]>
40;;;
41;;; This file is part of GNU Guix.
42;;;
43;;; GNU Guix is free software; you can redistribute it and/or modify it
44;;; under the terms of the GNU General Public License as published by
45;;; the Free Software Foundation; either version 3 of the License, or (at
46;;; your option) any later version.
47;;;
48;;; GNU Guix is distributed in the hope that it will be useful, but
49;;; WITHOUT ANY WARRANTY; without even the implied warranty of
50;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51;;; GNU General Public License for more details.
52;;;
53;;; You should have received a copy of the GNU General Public License
54;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
55
56(define-module (gnu packages cpp)
57 #:use-module ((guix licenses) #:prefix license:)
58 #:use-module (guix packages)
59 #:use-module (guix download)
60 #:use-module (guix utils)
61 #:use-module (guix git-download)
62 #:use-module (guix build-system cmake)
63 #:use-module (guix build-system copy)
64 #:use-module (guix build-system gnu)
65 #:use-module (guix build-system meson)
66 #:use-module (guix build-system python)
67 #:use-module (guix build-system scons)
68 #:use-module (guix modules)
69 #:use-module (guix gexp)
70 #:use-module (gnu packages)
71 #:use-module (gnu packages assembly)
72 #:use-module (gnu packages autotools)
73 #:use-module (gnu packages bdw-gc)
74 #:use-module (gnu packages benchmark)
75 #:use-module (gnu packages boost)
76 #:use-module (gnu packages build-tools)
77 #:use-module (gnu packages c)
78 #:use-module (gnu packages check)
79 #:use-module (gnu packages code)
80 #:use-module (gnu packages compression)
81 #:use-module (gnu packages crypto)
82 #:use-module (gnu packages curl)
83 #:use-module (gnu packages datastructures)
84 #:use-module (gnu packages documentation)
85 #:use-module (gnu packages fontutils)
86 #:use-module (gnu packages gcc)
87 #:use-module (gnu packages gl)
88 #:use-module (gnu packages glib)
89 #:use-module (gnu packages gtk)
90 #:use-module (gnu packages libevent)
91 #:use-module (gnu packages libunwind)
92 #:use-module (gnu packages linux)
93 #:use-module (gnu packages llvm)
94 #:use-module (gnu packages logging)
95 #:use-module (gnu packages maths)
96 #:use-module (gnu packages onc-rpc)
97 #:use-module (gnu packages perl)
98 #:use-module (gnu packages python)
99 #:use-module (gnu packages python-check)
100 #:use-module (gnu packages pkg-config)
101 #:use-module (gnu packages popt)
102 #:use-module (gnu packages pretty-print)
103 #:use-module (gnu packages pulseaudio)
104 #:use-module (gnu packages tls)
105 #:use-module (gnu packages web)
106 #:use-module (gnu packages xml)
107 #:use-module (gnu packages xorg)
108 ;; Using autoload to avoid a cycle.
109 ;; Note that (gnu packages serialization) has #:use-module (gnu packages cpp)
110 #:autoload (gnu packages serialization) (cereal)
111 #:use-module (ice-9 match))
112
113(define-public argagg
114 (let ((commit "79e4adfa2c6e2bfbe63da05cc668eb9ad5596748") (revision "0"))
115 (package
116 (name "argagg")
117 (version (git-version "0.4.6" revision commit))
118 (source (origin
119 (method git-fetch)
120 (uri (git-reference
121 (url "https://github.com/vietjtnguyen/argagg")
122 (commit commit)))
123 (file-name (git-file-name name version))
124 (sha256
125 (base32
126 "1flkgh524lq3024p7ld5lg743s1v7qnbmgv77578rzmn2rjzr77n"))))
127 (build-system cmake-build-system)
128 (outputs '("out" "doc"))
129 (arguments
130 `(#:phases (modify-phases %standard-phases
131 (add-after 'install 'move-doc
132 (lambda* (#:key outputs #:allow-other-keys)
133 (let* ((name ,(package-name argagg)) (out (assoc-ref
134 outputs
135 "out"))
136 (doc (assoc-ref outputs "doc")))
137 (mkdir-p (string-append doc "/share/doc"))
138 (rename-file
139 (string-append out "/share/doc/" name)
140 (string-append doc "/share/doc/" name))))))))
141 (native-inputs (list doxygen))
142 (home-page "https://github.com/vietjtnguyen/argagg")
143 (synopsis "C++11 command line argument parser")
144 (description
145 "ArgAgg is yet another C++ command line argument/option
146parser. It was written as a simple and idiomatic alternative to other
147frameworks like getopt, Boost program options, TCLAP, and others. The goal is
148to achieve the majority of argument parsing needs in a simple manner with an
149easy to use API.")
150 (license license:expat))))
151
152(define-public asmjit
153 (let ((commit "4ec760a3d1f69e32ba460ecd2513f29b8428700b")
154 (revision "0"))
155 (package
156 (name "asmjit")
157 (version (git-version "0.0.0" revision commit))
158 (source
159 (origin
160 (method git-fetch)
161 (uri
162 (git-reference
163 (url "https://github.com/asmjit/asmjit")
164 (commit commit)))
165 (file-name (git-file-name name version))
166 (sha256
167 (base32 "0skgccbpamcbg1byawfq5n6jzxgj64hnc7jznvk35nkskaaz1nlb"))))
168 (build-system cmake-build-system)
169 (arguments
170 (list #:configure-flags #~(list "-DASMJIT_TEST=TRUE")))
171 (home-page "https://asmjit.com/")
172 (synopsis "Machine code generation for C++")
173 (description "AsmJit is a lightweight library for machine code
174generation written in C++ language. It can generate machine code for X86 and
175X86_64 architectures with the support for the whole instruction set from
176legacy MMX to the newest AVX-512 and AMX. It has a type-safe API that allows
177C++ compiler to do semantic checks at compile-time even before the assembled
178code is generated or executed. It also provides an optional register
179allocator that makes it easy to generate complex code without a significant
180development effort.")
181 (license license:zlib))))
182
183(define-public range-v3
184 (package
185 (name "range-v3")
186 (version "0.11.0")
187 (source
188 (origin
189 (method git-fetch)
190 (uri
191 (git-reference
192 (url "https://github.com/ericniebler/range-v3.git")
193 (commit version)))
194 (file-name
195 (git-file-name name version))
196 (patches (search-patches "range-v3-build-with-gcc10.patch"))
197 (sha256
198 (base32 "18230bg4rq9pmm5f8f65j444jpq56rld4fhmpham8q3vr1c1bdjh"))))
199 (build-system cmake-build-system)
200 (arguments
201 (list
202 #:configure-flags
203 #~(list "-DRANGES_NATIVE=OFF")))
204 (native-inputs
205 (list doxygen gcc-9 perl))
206 (inputs
207 (list boost))
208 (synopsis "Range library for C++14/17/20")
209 (description "Range-v3 is an extension of the Standard Template Library that
210makes its iterators and algorithms more powerful by making them composable.
211Unlike other range-like solutions which, seek to do away with iterators, in
212range-v3 ranges are an abstraction layer on top of iterators.")
213 (home-page "https://github.com/ericniebler/range-v3/")
214 (license
215 (list
216 ;; Elements of Programming
217 (license:x11-style "file:///LICENSE.txt")
218 ;; SGI STL
219 license:sgifreeb2.0
220;;; LibC++ (dual-licensed)
221 license:expat
222 license:ncsa
223 ;; Others
224 license:boost1.0))))
225
226(define-public c++-gsl
227 (package
228 (name "c++-gsl")
229 (version "4.0.0")
230 (source
231 (origin
232 (method git-fetch)
233 (uri
234 (git-reference
235 (url "https://github.com/microsoft/GSL.git")
236 (commit
237 (string-append "v" version))))
238 (file-name
239 (git-file-name name version))
240 (sha256
241 (base32 "0dgb3rb6x2276d3v7x568m3zhqr67rhk8ynqgm3c304avnmcaw3i"))))
242 (build-system cmake-build-system)
243 (native-inputs
244 (list googletest pkg-config))
245 (synopsis "Guidelines Support Library")
246 (description "c++-gsl contains functions and types that are suggested for
247use by the C++ Core Guidelines maintained by the Standard C++ Foundation.")
248 (home-page "https://github.com/microsoft/GSL/")
249 (license license:expat)))
250
251(define-public c2ffi
252 (package
253 (name "c2ffi")
254 ;; As per the c2ffi README: the first three elements are encoding the
255 ;; required Clang/LLVM version, and the last one is the c2ffi revision.
256 (version "12.0.0.0")
257 (source
258 (origin
259 (method git-fetch)
260 (uri (git-reference
261 (url "https://github.com/rpav/c2ffi")
262 (commit (string-append "v" version))))
263 (file-name (git-file-name name version))
264 (sha256
265 (base32 "1qq8dfismd20d9kfxpfvwz07v9mfvd0y7p5r3c92mk2pm4xnmzfy"))
266 (modules '((guix build utils)))
267 (snippet
268 '(substitute* "CMakeLists.txt"
269 ;; Guix seems to be packaging LLVM libs separately thus -lLLVM
270 ;; won't work, every used library must be specified explicitly.
271 (("c2ffi PUBLIC clang-cpp LLVM")
272 "c2ffi PUBLIC clang-cpp LLVMCore LLVMSupport LLVMMCParser \
273LLVMOption LLVMBitReader LLVMProfileData")))))
274 (build-system cmake-build-system)
275 (arguments
276 '(;; If LLVM was built without RTTI, we need to also be built without
277 ;; it. See: https://stackoverflow.com/q/11904519
278 #:configure-flags '("-DCMAKE_CXX_FLAGS=-fno-rtti")
279 #:phases
280 (modify-phases %standard-phases
281 (replace 'check
282 (lambda* (#:key tests? #:allow-other-keys)
283 (when tests?
284 (invoke "./bin/c2ffi" "--help")))))))
285 (native-inputs
286 (list clang-12)) ; CMakeLists.txt invokes `clang -print-resource-dir`
287 (inputs
288 (list clang-12)) ; Compiled with gcc, but links against libclang-cpp.so
289 (home-page "https://github.com/rpav/c2ffi")
290 (synopsis "Clang-based FFI wrapper generator")
291 (description
292 "@code{c2ffi} is a tool for extracting definitions from C, C++, and
293Objective C headers for use with foreign function call interfaces. It uses
294the @code{Clang/LLVM} infrastructure to extract the data, and emits it in
295various formats, including @code{json}.")
296 (license license:gpl2+)))
297
298(define-public libzen
299 (package
300 (name "libzen")
301 (version "0.4.40")
302 (source (origin
303 (method url-fetch)
304 ;; Warning: This source has proved unreliable 1 time at least.
305 ;; Consider an alternate source or report upstream if this
306 ;; happens again.
307 (uri (string-append "https://mediaarea.net/download/source/"
308 "libzen/" version "/"
309 "libzen_" version ".tar.bz2"))
310 (sha256
311 (base32
312 "17pnp5i1ppcxhxnfs9qlkzzy35h23pkdwhsgpbqdkf8lab2f4hsm"))))
313 (native-inputs
314 (list autoconf automake libtool))
315 (build-system gnu-build-system)
316 (arguments
317 '(#:phases
318 ;; The build scripts are not at the root of the archive.
319 (modify-phases %standard-phases
320 (add-after 'unpack 'pre-configure
321 (lambda _
322 (chdir "Project/GNU/Library"))))))
323 (home-page "https://github.com/MediaArea/ZenLib")
324 (synopsis "C++ utility library")
325 (description "ZenLib is a C++ utility library. It includes classes for handling
326strings, configuration, bit streams, threading, translation, and cross-platform
327operating system functions.")
328 (license license:zlib)))
329
330(define-public rttr
331 (package
332 (name "rttr")
333 (version "0.9.6")
334 (source
335 (origin
336 (method git-fetch)
337 (uri (git-reference
338 (url "https://github.com/rttrorg/rttr/")
339 (commit (string-append "v" version))))
340 (sha256
341 (base32 "1yxad8sj40wi75hny8w6imrsx8wjasjmsipnlq559n4b6kl84ijp"))
342 (file-name (git-file-name name version))))
343 (build-system cmake-build-system)
344 (arguments
345 '(;; No check target. Setting test-target to "unit_test" runs it twice.
346 #:tests? #f
347 #:configure-flags
348 '("-DBUILD_DOCUMENTATION=OFF" "-DBUILD_EXAMPLES=OFF")
349 #:phases
350 (modify-phases %standard-phases
351 ;; library_test fails in chroot.
352 (add-after 'unpack 'skip-library-test
353 (lambda _
354 (substitute* "src/unit_tests/unit_tests.cmake"
355 (("misc/library_test.cpp") ""))
356 #t)))))
357 (native-inputs (list pkg-config))
358 (home-page "https://github.com/rttrorg/rttr/")
359 (synopsis "C++ Reflection Library")
360 (description
361 "RTTR stands for Run Time Type Reflection. It describes the ability of a
362computer program to introspect and modify an object at runtime. It is also
363the name of the library itself, which is written in C++.")
364 (license license:expat)))
365
366(define-public rct
367 (let* ((commit "b3e6f41d9844ef64420e628e0c65ed98278a843a")
368 (revision "2"))
369 (package
370 (name "rct")
371 (version (git-version "0.0.0" revision commit))
372 (source (origin
373 (method git-fetch)
374 (uri (git-reference
375 (url "https://github.com/Andersbakken/rct")
376 (commit commit)))
377 (sha256
378 (base32
379 "1m2931jacka27ghnpgf1z1plkkr64z0pga4r4zdrfpp2d7xnrdvb"))
380 (patches (search-patches "rct-add-missing-headers.patch"))
381 (file-name (git-file-name name version))))
382 (build-system cmake-build-system)
383 (arguments
384 '(#:configure-flags
385 '("-DWITH_TESTS=ON" ; To run the test suite
386 "-DRCT_RTTI_ENABLED=ON")))
387 (native-inputs
388 (list cppunit pkg-config))
389 (inputs
390 (list openssl zlib))
391 (home-page "https://github.com/Andersbakken/rct")
392 (synopsis "C++ library providing Qt-like APIs on top of the STL")
393 (description "Rct is a set of C++ tools that provide nicer (more Qt-like)
394 APIs on top of Standard Template Library (@dfn{STL}) classes.")
395 (license (list license:expat ; cJSON
396 license:bsd-4))))) ; everything else (LICENSE.txt)
397
398(define-public dashel
399 (package
400 (name "dashel")
401 (version "1.3.3")
402 (source
403 (origin
404 (method git-fetch)
405 (uri (git-reference
406 (url "https://github.com/aseba-community/dashel")
407 (commit version)))
408 (sha256
409 (base32 "0anks2l2i2qp0wlzqck1qgpq15a3l6dg8lw2h8s4nsj7f61lffwy"))
410 (file-name (git-file-name name version))))
411 (build-system cmake-build-system)
412 (arguments '(#:tests? #f)) ; no tests
413 (native-inputs (list pkg-config))
414 (home-page "https://github.com/aseba-community/dashel")
415 (synopsis "Data stream helper encapsulation library")
416 (description
417 "Dashel is a data stream helper encapsulation C++ library. It provides a
418unified access to TCP/UDP sockets, serial ports, console, and files streams.
419It also allows a server application to wait for any activity on any
420combination of these streams.")
421 (license license:bsd-3)))
422
423(define-public xsimd
424 (package
425 (name "xsimd")
426 (version "9.0.1")
427 (source
428 (origin
429 (method git-fetch)
430 (uri (git-reference
431 (url "https://github.com/QuantStack/xsimd")
432 (commit version)))
433 (sha256
434 (base32 "1fcy0djwpwvls6yqxqa82s4l4gvwkqkr8i8bibbb3dm0lqvhnw52"))
435 (file-name (git-file-name name version))))
436 (build-system cmake-build-system)
437 (arguments
438 `(#:configure-flags (list "-DBUILD_TESTS=ON")
439 #:test-target "xtest"))
440 (native-inputs
441 (list googletest))
442 (home-page "https://github.com/xtensor-stack/xsimd")
443 (synopsis "C++ wrappers for SIMD intrinsics and math implementations")
444 (description
445 "xsimd provides a unified means for using @acronym{SIMD, single instruction
446multiple data} features for library authors. Namely, it enables manipulation of
447batches of numbers with the same arithmetic operators as for single values.
448It also provides accelerated implementation of common mathematical functions
449operating on batches.")
450 (license license:bsd-3)))
451
452(define-public google-highway
453 (package
454 (name "google-highway")
455 (version "1.0.5")
456 (source
457 (origin
458 (method git-fetch)
459 (uri (git-reference
460 (url "https://github.com/google/highway")
461 (commit version)))
462 (file-name (git-file-name name version))
463 (sha256
464 (base32 "01ig4iqicm57nycl9q8mx1b22gvl4wj5j1vfp1jczhmrga4bca8v"))))
465 (build-system cmake-build-system)
466 (arguments
467 `(#:configure-flags (list "-DHWY_SYSTEM_GTEST=on")))
468 (native-inputs
469 (list googletest))
470 (home-page "https://github.com/google/highway")
471 (synopsis "SIMD library with runtime dispatch")
472 (description "Highway is a performance-portable, length-agnostic C++
473library for SIMD (Single Instruction, Multiple Data) with runtime dispatch.")
474 (license license:asl2.0)))
475
476(define-public xsimd-benchmark
477 (package
478 (inherit xsimd)
479 (name "xsimd-benchmark")
480 (arguments
481 `(#:configure-flags (list "-DBUILD_BENCHMARK=ON" "-DBUILD_EXAMPLES=ON")
482 #:tests? #f
483 #:phases (modify-phases %standard-phases
484 (add-after 'unpack 'remove-march=native
485 (lambda _
486 (substitute* "benchmark/CMakeLists.txt"
487 (("-march=native") ""))))
488 (replace 'install
489 (lambda* (#:key outputs #:allow-other-keys)
490 ;; Install nothing but the executables.
491 (let ((out (assoc-ref outputs "out")))
492 (install-file "benchmark/benchmark_xsimd"
493 (string-append out "/bin"))
494 (install-file "examples/mandelbrot"
495 (string-append out "/bin"))))))))
496 (synopsis "Benchmark of the xsimd library")
497
498 ;; Mark as tunable to take advantage of SIMD code in xsimd/xtensor.
499 (properties '((tunable? . #t)))))
500
501(define-public chaiscript
502 (package
503 (name "chaiscript")
504 (version "6.1.0")
505 (source
506 (origin
507 (method git-fetch)
508 (uri (git-reference
509 (url "https://github.com/ChaiScript/ChaiScript")
510 (commit (string-append "v" version))))
511 (file-name (git-file-name name version))
512 (sha256
513 (base32 "0i1c88rn1wwz8nf3dpapcdkk4w623m3nksfy5yjai10k9irkzy3c"))
514 (modules '((guix build utils)))
515 ;; It's bundled catch2 fails to build.
516 (snippet '(begin
517 (delete-file "unittests/catch.hpp")
518 (substitute* "unittests/compiled_tests.cpp"
519 (("catch[.]hpp") "catch2/catch.hpp"))
520 (substitute* "unittests/type_info_test.cpp"
521 (("catch[.]hpp") "catch2/catch.hpp"))))))
522 (build-system cmake-build-system)
523 (inputs (list catch2))
524 (home-page "https://chaiscript.com/")
525 (synopsis "Embedded scripting language designed for C++")
526 (description
527 "ChaiScript is one of the only embedded scripting language designed from
528the ground up to directly target C++ and take advantage of modern C++
529development techniques. Being a native C++ application, it has some advantages
530over existing embedded scripting languages:
531
532@enumerate
533@item Uses a header-only approach, which makes it easy to integrate with
534existing projects.
535@item Maintains type safety between your C++ application and the user scripts.
536@item Supports a variety of C++ techniques including callbacks, overloaded
537functions, class methods, and stl containers.
538@end enumerate\n")
539 (license license:bsd-3)))
540
541(define-public fifo-map
542 (package
543 (name "fifo-map")
544 (version "1.0.0")
545 (home-page "https://github.com/nlohmann/fifo_map")
546 (source (origin
547 (method git-fetch)
548 (uri (git-reference
549 (url home-page)
550 (commit (string-append "v" version))))
551 (sha256
552 (base32
553 "0y59fk6ycrgjln9liwcja3l5j1vxpa5i671bynpbsjlyq5f2560q"))
554 (patches (search-patches "fifo-map-remove-catch.hpp.patch"
555 "fifo-map-fix-flags-for-gcc.patch"))
556 (file-name (git-file-name name version))
557 (modules '((guix build utils)))
558 (snippet '(delete-file-recursively "./test/thirdparty"))))
559 (inputs
560 (list catch2-1))
561 (build-system cmake-build-system)
562 (arguments
563 '(#:phases
564 (modify-phases %standard-phases
565 (replace 'check
566 (lambda* (#:key tests? #:allow-other-keys)
567 (when tests? (invoke "./unit"))))
568 (replace 'install
569 (lambda* (#:key outputs #:allow-other-keys)
570 (let* ((out (assoc-ref outputs "out"))
571 (inc (string-append out "/include/fifo_map")))
572 (with-directory-excursion "../source"
573 (install-file "src/fifo_map.hpp" inc))))))))
574 (synopsis "FIFO-ordered associative container for C++")
575 (description "Fifo_map is a C++ header only library for associative
576container which uses the order in which keys were inserted to the container
577as ordering relation.")
578 (license license:expat)))
579
580(define-public json-dto
581 (package
582 (name "json-dto")
583 (version "0.3.1")
584 (source (origin
585 (method git-fetch)
586 (uri (git-reference
587 (url "https://github.com/Stiffstream/json_dto")
588 (commit (string-append "v." version))))
589 (file-name (git-file-name name version))
590 (sha256
591 (base32
592 "0wr1srp08fr2mv4fmnqr626pwiw60svn6wkvy2xg7j080mgwb3ml"))))
593 (build-system cmake-build-system)
594 (arguments
595 (list
596 #:configure-flags #~(list "-DJSON_DTO_INSTALL_SAMPLES=OFF")
597 #:phases
598 #~(modify-phases %standard-phases
599 (add-after 'unpack 'change-directory
600 (lambda _
601 (chdir "dev"))))))
602 (native-inputs (list catch2))
603 (propagated-inputs (list rapidjson)) ;#include'd
604 (home-page "https://github.com/Stiffstream/json_dto")
605 (synopsis "JSON to C++ structures conversion library")
606 (description "@code{json_dto} library is a small header-only helper for
607converting data between JSON representation and C++ structs. DTO stands for
608data transfer object.")
609 (license license:bsd-3)))
610
611(define-public nlohmann-json
612 (package
613 (name "nlohmann-json")
614 (version "3.11.2")
615 (home-page "https://github.com/nlohmann/json")
616 (source
617 (origin
618 (method git-fetch)
619 (uri (git-reference (url home-page)
620 (commit (string-append "v" version))))
621 (sha256
622 (base32 "0g6rfsbkvrxmacchz4kbr741yybj7mls3r4hgyfdd3pdbqhn2is9"))
623 (file-name (git-file-name name version))
624 (modules '((guix build utils)))
625 (snippet
626 #~(begin
627 ;; Delete bundled software. Preserve doctest_compatibility.h, which
628 ;; is a wrapper library added by this package.
629 (install-file "./tests/thirdparty/doctest/doctest_compatibility.h"
630 "/tmp")
631 (delete-file-recursively "./tests/thirdparty")
632 (install-file "/tmp/doctest_compatibility.h"
633 "./tests/thirdparty/doctest")
634
635 ;; Adjust for the unbundled fifo_map and doctest.
636 (substitute* (find-files "./tests/" "\\.h(pp)?")
637 (("#include \"doctest\\.h\"") "#include <doctest/doctest.h>")
638 (("#include <doctest\\.h>") "#include <doctest/doctest.h>"))
639 (with-directory-excursion "tests/src"
640 (let ((files (find-files "." "\\.cpp$")))
641 (substitute* files
642 (("#include ?\"(fifo_map.hpp)\"" all fifo-map-hpp)
643 (string-append
644 "#include <fifo_map/" fifo-map-hpp ">")))))))))
645 (build-system cmake-build-system)
646 (arguments
647 (list
648 #:configure-flags
649 #~(list "-DJSON_MultipleHeaders=ON" ; For json_fwd.hpp.
650 (string-append "-DJSON_TestDataDirectory="
651 (dirname
652 (search-input-directory %build-inputs
653 "json_nlohmann_tests"))))
654 #:phases
655 #~(modify-phases %standard-phases
656 (replace 'check
657 (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
658 (if tests?
659 ;; Some tests need git and a full checkout, skip those.
660 (invoke "ctest" "-LE" "git_required"
661 "-j" (if parallel-tests?
662 (number->string (parallel-job-count))
663 "1"))
664 (format #t "test suite not run~%")))))))
665 (native-inputs
666 (list amalgamate
667 (let ((version "3.1.0"))
668 (origin
669 (method git-fetch)
670 (uri (git-reference
671 (url "https://github.com/nlohmann/json_test_data")
672 (commit (string-append "v" version))))
673 (file-name (git-file-name "json_test_data" version))
674 (sha256
675 (base32
676 "0nbirc428qx0lpi940p7y24fzdjbwl6xig3h5rdbihyymmdzhvbc"))))))
677 (inputs
678 (list doctest fifo-map))
679 (synopsis "JSON parser and printer library for C++")
680 (description "@code{nlohmann::json} is a C++ JSON library that provides
681intuitive syntax and trivial integration.")
682 (license license:expat)))
683
684(define-public json-modern-cxx
685 (deprecated-package "json-modern-cxx" nlohmann-json))
686
687(define-public xtl
688 (package
689 (name "xtl")
690 (version "0.7.5")
691 (source (origin
692 (method git-fetch)
693 (uri
694 (git-reference
695 (url "https://github.com/QuantStack/xtl")
696 (commit version)))
697 (sha256
698 (base32
699 "1llfy6pkzqx2va74h9xafjylyvw6839a843mqc05n6x6wll5bkam"))
700 (file-name (git-file-name name version))))
701 (native-inputs
702 (list doctest googletest nlohmann-json))
703 (arguments
704 (list
705 #:configure-flags
706 #~(list "-DBUILD_TESTS=ON")
707 #:phases
708 #~(modify-phases %standard-phases
709 (replace 'check
710 (lambda _
711 (with-directory-excursion "test"
712 (invoke "./test_xtl")))))))
713 (home-page "https://github.com/QuantStack/xtl")
714 (build-system cmake-build-system)
715 (synopsis "C++ template library providing some basic tools")
716 (description "xtl is a C++ header-only template library providing basic
717tools (containers, algorithms) used by other QuantStack packages.")
718 (license license:bsd-3)))
719
720(define-public ccls
721 (package
722 (name "ccls")
723 (version "0.20220729")
724 (source
725 (origin
726 (method git-fetch)
727 (uri (git-reference
728 (url "https://github.com/MaskRay/ccls")
729 (commit version)))
730 (sha256
731 (base32 "0cp534n7afl0rrr778cc0bnd8w091qmyqdpp5k1jh4wxla9s09br"))
732 (file-name (git-file-name name version))))
733 (build-system cmake-build-system)
734 (arguments
735 '(#:tests? #f)) ; no check target
736 (inputs
737 (list rapidjson))
738 (native-inputs
739 (list clang llvm))
740 (home-page "https://github.com/MaskRay/ccls")
741 (synopsis "C/C++/Objective-C language server")
742 (description
743 "@code{ccls} is a server implementing the Language Server Protocol (LSP)
744for C, C++ and Objective-C languages. It uses @code{clang} to perform static
745code analysis and supports cross references, hierarchies, completion and
746syntax highlighting. @code{ccls} is derived from @code{cquery} which is not
747maintained anymore.")
748 (license license:asl2.0)))
749
750(define-public concurrentqueue
751 (package
752 (name "concurrentqueue")
753 (version "1.0.3")
754 (source
755 (origin
756 (method git-fetch)
757 (uri (git-reference
758 (url "https://github.com/cameron314/concurrentqueue/")
759 (commit "3747268264d0fa113e981658a99ceeae4dad05b7")))
760 (file-name (git-file-name name version))
761 (sha256
762 (base32 "1n5v7n27llzg7khg1jvi35jrcf9v6adw8gaic9ndxn65dp723ssy"))))
763 (build-system cmake-build-system)
764 (arguments '(#:tests? #false)) ;no check target
765 (home-page "https://github.com/cameron314/concurrentqueue/")
766 (synopsis "Multi-producer, multi-consumer lock-free concurrent queue for C++11")
767 (description
768 "This package provides a fast multi-producer, multi-consumer lock-free
769concurrent queue for C++11.")
770 (license license:bsd-2)))
771
772(define-public spscqueue
773 (package
774 (name "spscqueue")
775 (version "1.1")
776 (source
777 (origin
778 (method git-fetch)
779 (uri (git-reference
780 (url "https://github.com/rigtorp/SPSCQueue/")
781 (commit (string-append "v" version))))
782 (file-name (git-file-name name version))
783 (sha256
784 (base32 "1428cj9x318afvnvnkhg0711iy4czqn86fi7ysgfhw91asa316rc"))))
785 (build-system cmake-build-system)
786 (home-page "https://github.com/rigtorp/SPSCQueue/")
787 (synopsis "Single producer single consumer queue written in C++11")
788 (description
789 "This package provides a single producer single consumer wait-free and
790lock-free fixed size queue written in C++11.")
791 (license license:expat)))
792
793(define-public gperftools
794 (package
795 (name "gperftools")
796 (version "2.11")
797 (source
798 (origin
799 (method git-fetch)
800 (uri (git-reference
801 (url "https://github.com/gperftools/gperftools")
802 (commit (string-append "gperftools-" version))))
803 (sha256
804 (base32 "1mwsa4y696m8zjya0k7xzr9vsgb24dq4aq13m21hb5ygy7nh47id"))
805 (file-name (git-file-name name version))))
806 (build-system gnu-build-system)
807 (arguments
808 ;; The tests are flaky when run in parallel. For more info:
809 ;; https://bugs.gnu.org/46562
810 '(#:parallel-tests? #f))
811 (native-inputs
812 (list autoconf automake libtool
813 ;; For tests.
814 perl))
815 (home-page "https://github.com/gperftools/gperftools")
816 (synopsis "Multi-threaded malloc() and performance analysis tools for C++")
817 (description
818 "@code{gperftools} is a collection of a high-performance multi-threaded
819malloc() implementation plus some thread-friendly performance analysis
820tools:
821
822@itemize
823@item tcmalloc,
824@item heap profiler,
825@item heap checker,
826@item CPU checker.
827@end itemize\n")
828 (license license:bsd-3)))
829
830(define-public cpp-httplib
831 ;; this package is not graftable, as everything is implemented in a single
832 ;; header
833 (package
834 (name "cpp-httplib")
835 (version "0.12.5")
836 (source
837 (origin
838 (method git-fetch)
839 (uri (git-reference
840 (url "https://github.com/yhirose/cpp-httplib")
841 (commit (string-append "v" version))))
842 (sha256
843 (base32 "1m1p6h1dsxg4kg5zziffb6xl8zgjbkw7gmgmmlnrhpl3bswam87n"))
844 (file-name (git-file-name name version))))
845 (build-system cmake-build-system)
846 (arguments
847 `(#:configure-flags
848 '("-DBUILD_SHARED_LIBS=ON"
849 "-DHTTPLIB_TEST=ON"
850 "-DHTTPLIB_COMPILE=ON"
851 "-DHTTPLIB_REQUIRE_BROTLI=ON"
852 "-DHTTPLIB_REQUIRE_OPENSSL=ON"
853 "-DHTTPLIB_REQUIRE_ZLIB=ON")
854 #:make-flags
855 '(,(string-append "CXX=" (cxx-for-target)))
856 #:phases
857 (modify-phases %standard-phases
858 (add-after 'unpack 'disable-network-tests
859 (lambda _
860 (for-each
861 (lambda (test)
862 (substitute* "test/test.cc"
863 (((string-append "\\(" test))
864 (string-append "(DISABLED_" test))))
865 ;; There are tests requiring network access, disable them
866 '("AbsoluteRedirectTest" "BaseAuthTest" "CancelTest"
867 "ConnectionErrorTest"
868 "ChunkedEncodingTest" "ChunkedEncodingTest"
869 "ClientDefaultHeadersTest"
870 "DecodeWithChunkedEncoding" "DefaultHeadersTest"
871 "DigestAuthTest" "HttpsToHttpRedirectTest"
872 "HostnameToIPConversionTest"
873 "RangeTest" "RedirectTest" "RelativeRedirectTest"
874 "SSLClientTest" "SendAPI"
875 "SpecifyServerIPAddressTest"
876 "TooManyRedirectTest" "UrlWithSpace"
877 "YahooRedirectTest" "YahooRedirectTest")))))))
878 (native-inputs
879 (list googletest python))
880 (inputs
881 (list brotli openssl zlib))
882 (home-page "https://github.com/yhirose/cpp-httplib")
883 (synopsis "C++ HTTP/HTTPS server and client library")
884 (description "cpp-httplib is a C++11 single-file cross platform blocking
885HTTP/HTTPS library, easy to setup. It can also be used as a single-header
886library.")
887 (license license:expat)))
888
889(define-public cpplint
890 (package
891 (name "cpplint")
892 (version "1.5.5")
893 (source
894 (origin
895 (method git-fetch)
896 ;; Fetch from github instead of pypi, since the test cases are not in
897 ;; the pypi archive.
898 (uri (git-reference
899 (url "https://github.com/cpplint/cpplint")
900 (commit version)))
901 (sha256
902 (base32 "13l86aq0h1jga949k79k9x3hw2xqchjc162sclg2f99vz98zcz15"))
903 (file-name (git-file-name name version))))
904 (arguments
905 (list #:modules `((srfi srfi-1)
906 (srfi srfi-26)
907 ,@%python-build-system-modules)
908 #:phases
909 #~(modify-phases (@ (guix build python-build-system) %standard-phases)
910 (add-before 'wrap 'reduce-GUIX_PYTHONPATH
911 (lambda _
912 ;; Hide the transitive native inputs from GUIX_PYTHONPATH
913 ;; to prevent them from ending up in the run-time closure.
914 ;; See also <https://bugs.gnu.org/25235>.
915 (let ((transitive-native-inputs
916 '#$(match (package-transitive-native-inputs
917 this-package)
918 (((labels packages) ...) packages))))
919 ;; Save the original PYTHONPATH because we need it for
920 ;; tests later.
921 (setenv "TMP_PYTHONPATH" (getenv "GUIX_PYTHONPATH"))
922 (setenv "GUIX_PYTHONPATH"
923 (string-join
924 (filter (lambda (path)
925 (not (any (cut string-prefix? <> path)
926 transitive-native-inputs)))
927 (search-path-as-string->list
928 (getenv "GUIX_PYTHONPATH")))
929 ":")))))
930 (add-after 'wrap 'reset-GUIX_PYTHONPATH
931 (lambda _
932 (setenv "GUIX_PYTHONPATH"
933 (getenv "TMP_PYTHONPATH"))))
934 (replace 'check
935 (lambda* (#:key tests? #:allow-other-keys)
936 (when tests?
937 (invoke "pytest" "-vv")))))))
938 (build-system python-build-system)
939 (native-inputs
940 (list python-coverage
941 python-pytest
942 python-pytest-cov
943 python-pytest-runner
944 python-testfixtures))
945 (home-page "https://github.com/cpplint/cpplint")
946 (synopsis "Static code checker for C++")
947 (description "@code{cpplint} is a command-line tool to check C/C++ files
948for style issues following Google’s C++ style guide. While Google maintains
949its own version of the tool, this is a fork that aims to be more responsive
950and make @code{cpplint} usable in wider contexts.")
951 (license license:bsd-3)))
952
953(define-public reproc
954 (package
955 (name "reproc")
956 (version "14.2.4")
957 (source
958 (origin
959 (method git-fetch)
960 (uri (git-reference
961 (url "https://github.com/DaanDeMeyer/reproc")
962 (commit (string-append "v" version))))
963 (file-name (git-file-name name version))
964 (sha256
965 (base32 "09xnf8hmld1fk8j33zwlz1qcxnjdx1ncbg62csic9va4m1wc2v1d"))))
966 (build-system cmake-build-system)
967 (arguments
968 ;; No tests.
969 `(#:tests? #f
970 ;; Build the shared library instead of a static one.
971 #:configure-flags `("-DBUILD_SHARED_LIBS=1")))
972 (native-inputs
973 (list pkg-config))
974 (synopsis "Process IO library")
975 (description "reproc (Redirected Process) is a C/C++ library that
976simplifies starting, stopping and communicating with external programs. The
977main use case is executing command line applications directly from C or C++
978code and retrieving their output.")
979 (home-page "https://github.com/DaanDeMeyer/reproc")
980 (license license:expat)))
981
982(define-public sobjectizer
983 (package
984 (name "sobjectizer")
985 (version "5.7.2.6")
986 (source
987 (origin
988 (method git-fetch)
989 (uri (git-reference
990 (url "https://github.com/Stiffstream/sobjectizer")
991 (commit (string-append "v." version))))
992 (sha256
993 (base32 "0n6smpjkkkw0xab8wcpy3p0dpw2v9sxgwl6azl3am6abmv4mff12"))
994 (file-name (git-file-name name version))))
995 (build-system cmake-build-system)
996 (arguments
997 `(#:tests? #f
998 #:phases
999 (modify-phases %standard-phases
1000 (add-after 'unpack 'change-directory
1001 (lambda _
1002 (chdir "dev")
1003 #t)))))
1004 (home-page "https://stiffstream.com/en/products/sobjectizer.html")
1005 (synopsis "Cross-platform actor framework for C++")
1006 (description
1007 "SObjectizer is a cross-platform \"actor frameworks\" for C++.
1008SObjectizer supports not only the Actor Model but also the Publish-Subscribe
1009Model and CSP-like channels. The goal of SObjectizer is to simplify
1010development of concurrent and multithreaded applications in C++.")
1011 (license license:bsd-3)))
1012
1013(define-public tweeny
1014 (package
1015 (name "tweeny")
1016 (version "3")
1017 (source
1018 (origin
1019 (method git-fetch)
1020 (uri (git-reference
1021 (url "https://github.com/mobius3/tweeny")
1022 (commit (string-append "v" version))))
1023 (file-name (git-file-name name version))
1024 (sha256
1025 (base32 "1adm4c17pi7xf3kf6sjyxibz5rdg1ka236p72xsm6js4j9gzlbp4"))))
1026 (arguments
1027 '(#:tests? #f)) ;no check target
1028 (build-system cmake-build-system)
1029 (home-page "https://mobius3.github.io/tweeny/")
1030 (synopsis "Modern C++ tweening library")
1031 (description "@code{Tweeny} is an inbetweening library designed for the
1032creation of complex animations for games and other beautiful interactive
1033software. It leverages features of modern @code{C++} to empower developers with
1034an intuitive API for declaring tweenings of any type of value, as long as they
1035support arithmetic operations. The goal of @code{Tweeny} is to provide means to
1036create fluid interpolations when animating position, scale, rotation, frames or
1037other values of screen objects, by setting their values as the tween starting
1038point and then, after each tween step, plugging back the result.")
1039 (license license:expat)))
1040
1041;;; This older LTS release is kept for tensorflow.
1042(define-public abseil-cpp-20200923.3
1043 (package
1044 (name "abseil-cpp")
1045 (version "20200923.3")
1046 (source (origin
1047 (method git-fetch)
1048 (uri (git-reference
1049 (url "https://github.com/abseil/abseil-cpp")
1050 (commit version)))
1051 (file-name (git-file-name name version))
1052 (sha256
1053 (base32
1054 "1p4djhm1f011ficbjjxx3n8428p8481p20j4glpaawnpsi362hkl"))
1055 (patches
1056 (search-patches "abseil-cpp-fix-strerror_test.patch"))))
1057 (build-system cmake-build-system)
1058 (arguments
1059 `(#:configure-flags (list "-DBUILD_SHARED_LIBS=ON"
1060 "-DABSL_RUN_TESTS=ON"
1061 "-DABSL_USE_EXTERNAL_GOOGLETEST=ON"
1062 ;; Needed, else we get errors like:
1063 ;;
1064 ;; ld: CMakeFiles/absl_periodic_sampler_test.dir/internal/periodic_sampler_test.cc.o:
1065 ;; undefined reference to symbol '_ZN7testing4Mock16UnregisterLockedEPNS_8internal25UntypedFunctionMockerBaseE'
1066 ;; ld: /gnu/store/...-googletest-1.10.0/lib/libgmock.so:
1067 ;; error adding symbols: DSO missing from command line
1068 ;; collect2: error: ld returned 1 exit status
1069 "-DCMAKE_EXE_LINKER_FLAGS=-lgtest -lpthread -lgmock")
1070 #:phases
1071 (modify-phases %standard-phases
1072 (add-after 'unpack 'fix-max
1073 (lambda _
1074 (substitute* "absl/debugging/failure_signal_handler.cc"
1075 (("std::max\\(SIGSTKSZ, 65536\\)")
1076 "std::max<size_t>(SIGSTKSZ, 65536)"))))
1077 (add-before 'configure 'remove-gtest-check
1078 ;; The CMakeLists fails to find our googletest for some reason, but
1079 ;; it works nonetheless.
1080 (lambda _
1081 (substitute* "CMakeLists.txt"
1082 (("check_target\\(gtest\\)") "")
1083 (("check_target\\(gtest_main\\)") "")
1084 (("check_target\\(gmock\\)") "")))))))
1085 (native-inputs
1086 (list googletest))
1087 (home-page "https://abseil.io")
1088 (synopsis "Augmented C++ standard library")
1089 (description "Abseil is a collection of C++ library code designed to
1090augment the C++ standard library. The Abseil library code is collected from
1091Google's C++ code base.")
1092 (license license:asl2.0)))
1093
1094;; This is for grpc-for-python-grpcio; keep this in sync with its actual
1095;; requirements.
1096(define-public abseil-cpp-20211102.0
1097 (let ((base abseil-cpp-20200923.3))
1098 (package
1099 (inherit base)
1100 (name "abseil-cpp")
1101 (version "20211102.0")
1102 (source (origin
1103 (method git-fetch)
1104 (uri (git-reference
1105 (url "https://github.com/abseil/abseil-cpp")
1106 (commit "215105818dfde3174fe799600bb0f3cae233d0bf")))
1107 (file-name (git-file-name name version))
1108 (sha256
1109 (base32
1110 "028vlxpmh65kb7s0cpba38qcwk1abyn5br0ffhvvjjh97vld69di"))))
1111 (arguments
1112 (substitute-keyword-arguments (package-arguments base)
1113 ((#:tests? _ #false) #false)
1114 ((#:configure-flags flags)
1115 #~(cons* "-DCMAKE_CXX_STANDARD=11" #$flags)))))))
1116
1117(define-public abseil-cpp
1118 (let ((base abseil-cpp-20200923.3))
1119 (package
1120 (inherit base)
1121 (name "abseil-cpp")
1122 (version "20220623.1")
1123 (source (origin
1124 (method git-fetch)
1125 (uri (git-reference
1126 (url "https://github.com/abseil/abseil-cpp")
1127 (commit version)))
1128 (file-name (git-file-name name version))
1129 (sha256
1130 (base32
1131 "0vxh2a74g4s45yr8kdjqnzl64k10qdlc0hbnn987a4cnwdj4bp9r"))))
1132 (arguments
1133 (substitute-keyword-arguments (package-arguments base)
1134 ((#:configure-flags flags)
1135 `(cons* "-DABSL_BUILD_TESTING=ON"
1136 (delete "-DABSL_RUN_TESTS=ON" ,flags))))))))
1137
1138(define (abseil-cpp-for-c++-standard version)
1139 (let ((base abseil-cpp))
1140 (hidden-package
1141 (package/inherit base
1142 (arguments
1143 (substitute-keyword-arguments (package-arguments base)
1144 ((#:configure-flags flags)
1145 #~(cons* #$(string-append "-DCMAKE_CXX_STANDARD="
1146 (number->string version))
1147 #$flags))))))))
1148
1149(define-public abseil-cpp-cxxstd17
1150 (abseil-cpp-for-c++-standard 17)) ;XXX: the default with GCC 11?
1151
1152(define-public abseil-cpp-cxxstd11
1153 (abseil-cpp-for-c++-standard 11))
1154
1155(define-public pegtl
1156 (package
1157 (name "pegtl")
1158 (version "3.2.7")
1159 (source (origin
1160 (method git-fetch)
1161 (uri (git-reference
1162 (url "https://github.com/taocpp/PEGTL")
1163 (commit version)))
1164 (file-name (git-file-name name version))
1165 (sha256
1166 (base32
1167 "01adjqqdr9yf4h379jl1x0526kvixfpqk4hdk9mna49qc4s5hpi1"))))
1168 (build-system cmake-build-system)
1169 (home-page "https://github.com/taocpp/PEGTL")
1170 (synopsis "Parsing Expression Grammar template library")
1171 (description "The Parsing Expression Grammar Template Library (PEGTL) is
1172a zero-dependency C++ header-only parser combinator library for creating
1173parsers according to a Parsing Expression Grammar (PEG).")
1174 (license license:expat)))
1175
1176(define-public psascan
1177 (package
1178 (name "psascan")
1179 (version "0.1.0")
1180 (source (origin
1181 (method url-fetch)
1182 (uri (string-append "https://www.cs.helsinki.fi/group"
1183 "/pads/software/pSAscan"
1184 "/pSAscan-" version ".tar.bz2"))
1185 (sha256
1186 (base32
1187 "1cphk4gf202nzkxz6jdjzls4zy27055gwpm0r8cn99gr6c8548cy"))
1188 (modules '((guix build utils)))
1189 (snippet '(begin (substitute* '("src/Makefile"
1190 "tools/delete-bytes-255/Makefile")
1191 (("-march=native") ""))))))
1192 (build-system gnu-build-system)
1193 (arguments
1194 (list
1195 #:tests? #false ;there are none
1196 #:phases
1197 #~(modify-phases %standard-phases
1198 (add-after 'unpack 'chdir (lambda _ (chdir "src")))
1199 (delete 'configure)
1200 (replace 'install
1201 (lambda _
1202 (install-file "psascan"
1203 (string-append #$output "/bin")))))))
1204 (inputs (list libdivsufsort))
1205 (properties '((tunable? . #t)))
1206 (home-page "https://www.cs.helsinki.fi/group/pads/pSAscan.html")
1207 (synopsis "Parallel external memory suffix array construction")
1208 (description "This package contains an implementation of the parallel
1209external-memory suffix array construction algorithm called pSAscan. The
1210algorithm is based on the sequential external-memory suffix array construction
1211algorithm called SAscan.")
1212 (license license:expat)))
1213
1214(define-public cxxopts
1215 (package
1216 (name "cxxopts")
1217 (version "3.1.1")
1218 (source (origin
1219 (method git-fetch)
1220 (uri (git-reference
1221 (url "https://github.com/jarro2783/cxxopts")
1222 (commit (string-append "v" version))))
1223 (file-name (git-file-name name version))
1224 (sha256
1225 (base32
1226 "0d37qpsaq8ik7pl4vk8346vqcqyfzfbnpq8mhsa2gb2zf1lwr4wl"))))
1227 (build-system cmake-build-system)
1228 (synopsis "Lightweight C++ command line option parser")
1229 (description
1230 "A lightweight header-only C++ option parser library, supporting the
1231standard GNU style syntax for options.")
1232 (home-page "https://github.com/jarro2783/cxxopts/wiki")
1233 (license license:expat)))
1234
1235(define-public folly
1236 (package
1237 (name "folly")
1238 (version "2022.10.31.00")
1239 (source (origin
1240 (method git-fetch)
1241 (uri (git-reference
1242 (url "https://github.com/facebook/folly")
1243 (commit (string-append "v" version))))
1244 (file-name (git-file-name name version))
1245 (sha256
1246 (base32
1247 "06r9xnj8ilghc0vv6r17k5apl3w19iwd76nr02svnv96c74bz2aa"))))
1248 (build-system cmake-build-system)
1249 (arguments
1250 '(;; Tests must be explicitly enabled
1251 ;;#:configure-flags '("-DBUILD_TESTS=ON")))
1252 ;; Leave tests disabled; see https://github.com/facebook/folly/issues/1456
1253 #:tests? #f))
1254 (propagated-inputs
1255 (list boost gflags glog liburing))
1256 (inputs
1257 (list bzip2
1258 double-conversion
1259 fmt
1260 libaio
1261 libevent
1262 libiberty
1263 libsodium
1264 libunwind
1265 lz4
1266 openssl
1267 snappy
1268 zlib
1269 `(,zstd "lib")))
1270 (native-inputs
1271 (list googletest))
1272 (synopsis "Collection of C++ components complementing the standard library")
1273 (description
1274 "Folly (acronymed loosely after Facebook Open Source Library) is a library
1275of C++14 components that complements @code{std} and Boost.")
1276 (home-page "https://github.com/facebook/folly/wiki")
1277 ;; 32-bit is not supported: https://github.com/facebook/folly/issues/103
1278 (supported-systems '("aarch64-linux" "x86_64-linux"))
1279 (license license:asl2.0)))
1280
1281(define-public poco
1282 (package
1283 (name "poco")
1284 (version "1.11.1")
1285 (source (origin
1286 (method git-fetch)
1287 (uri (git-reference
1288 (url "https://github.com/pocoproject/poco")
1289 (commit (string-append "poco-" version "-release"))))
1290 (file-name (git-file-name name version))
1291 (sha256
1292 (base32
1293 "0qkf8vb4qwds6idk9fkw6wjvcdk5k8h77x3gv47l0i4jfl5hwn8b"))))
1294 (build-system cmake-build-system)
1295 (arguments
1296 (list
1297 #:configure-flags #~(list "-DENABLE_TESTS=ON")
1298 #:phases
1299 #~(modify-phases %standard-phases
1300 (add-after 'unpack 'disable-problematic-tests
1301 (lambda _
1302 (substitute* (list "Foundation/CMakeLists.txt" ; XXX: fails.
1303 ;; Require network access
1304 "Net/CMakeLists.txt"
1305 "MongoDB/CMakeLists.txt"
1306 "Redis/CMakeLists.txt")
1307 (("ENABLE_TESTS") "FALSE")))))))
1308 (home-page "https://pocoproject.org/")
1309 (synopsis "Portable C++ components")
1310 (description "This package provides a collection of C++ libraries intended
1311to be useful for building network-based applications.")
1312 (license license:boost1.0)))
1313
1314(define-public aws-crt-cpp
1315 (package
1316 (name "aws-crt-cpp")
1317 ;; Update only when updating aws-sdk-cpp, and when updating also update
1318 ;; versions of library dependencies linked from from
1319 ;; https://github.com/awslabs/aws-crt-cpp/tree/{aws-crt-cpp commit}/crt
1320 (version "0.17.27")
1321 (source (origin
1322 (method git-fetch)
1323 (uri (git-reference
1324 (url "https://github.com/awslabs/aws-crt-cpp")
1325 (commit (string-append "v" version))))
1326 (file-name (git-file-name name version))
1327 (sha256
1328 (base32
1329 "14g8pn7yii1klby7phcw08qnld1qv11vwmbdz8cs3mlpqahxrh4i"))))
1330 (build-system cmake-build-system)
1331 (arguments
1332 '(#:configure-flags
1333 (list "-DBUILD_DEPS=OFF"
1334 "-DBUILD_SHARED_LIBS=ON"
1335 (string-append "-DCMAKE_PREFIX_PATH="
1336 (assoc-ref %build-inputs "aws-c-common"))
1337 "-DENABLE_NET_TESTS=OFF")))
1338 (propagated-inputs
1339 (list aws-c-auth
1340 aws-c-cal
1341 aws-c-event-stream
1342 aws-c-http
1343 aws-c-mqtt
1344 aws-c-s3))
1345 (synopsis "C++ wrapper for Amazon Web Services C libraries")
1346 (description "The AWS Common Runtime (CRT) library provides a C++ wrapper
1347implementation for the following @acronym{AWS,Amazon Web Services} C libraries:
1348aws-c-auth, aws-c-cal, aws-c-common, aws-c-compression, aws-c-event-stream,
1349aws-c-http, aws-c-io, aws-c-mqtt, aws-checksums, and s2n.")
1350 (home-page "https://github.com/awslabs/aws-crt-cpp")
1351 (license license:asl2.0)))
1352
1353(define-public aws-sdk-cpp
1354 (package
1355 (name "aws-sdk-cpp")
1356 ; When updating also check for a tagged update to aws-crt-cpp from
1357 ; https://github.com/aws/aws-sdk-cpp/tree/main/crt
1358 (version "1.9.306")
1359 (source (origin
1360 (method git-fetch)
1361 (uri (git-reference
1362 (url "https://github.com/aws/aws-sdk-cpp")
1363 (commit version)))
1364 (file-name (git-file-name name version))
1365 (sha256
1366 (base32
1367 "0k3f4xq4vvlwrwgpp0vka4pwzbnkylvrkbbkjksx6wq6g1a2gc2g"))))
1368 (build-system cmake-build-system)
1369 (arguments
1370 '(;; Tests are run during the build phase.
1371 #:tests? #f
1372 #:configure-flags
1373 (list "-DBUILD_DEPS=OFF"
1374 "-DBUILD_SHARED_LIBS=ON"
1375 (string-append "-DCMAKE_PREFIX_PATH="
1376 (assoc-ref %build-inputs "aws-c-common")))))
1377 (propagated-inputs
1378 (list aws-crt-cpp))
1379 (inputs
1380 (list curl pulseaudio zlib))
1381 (synopsis "Amazon Web Services SDK for C++")
1382 (description
1383 "The AWS SDK for C++ provides a C++11 interface to the @acronym{AWS,Amazon
1384Web Services} API. AWS provides on-demand computing infrastructure and software
1385services including database, analytic, and machine learning technologies.")
1386 (home-page "https://github.com/aws/aws-sdk-cpp")
1387 (license license:asl2.0)))
1388
1389(define-public libexpected
1390 (package
1391 (name "libexpected")
1392 (version "1.1.0")
1393 (source
1394 (origin
1395 (method git-fetch)
1396 (uri (git-reference
1397 (url "https://github.com/TartanLlama/expected")
1398 (commit (string-append "v" version))
1399 ;; NOTE: Requires TL_CMAKE from custom
1400 ;; repository. Should not affect reproducibility.
1401 (recursive? #t)))
1402 (file-name (git-file-name name version))
1403 (sha256
1404 (base32 "17akrv80h0n4cfmxwvlvbb8ycqza7y3qqygjyphv95rrabqm9r02"))
1405 (patches (search-patches "libexpected-use-provided-catch2.patch"))))
1406 (build-system cmake-build-system)
1407 (native-inputs
1408 (list catch2))
1409 (synopsis "C++11/14/17 std::expected with functional-style extensions")
1410 (description "@code{std::expected} is proposed as the preferred way to
1411represent objects which will either have an expected value, or an unexpected
1412value giving information about why something failed. Unfortunately, chaining
1413together many computations which may fail can be verbose, as error-checking
1414code will be mixed in with the actual programming logic. This implementation
1415provides a number of utilities to make coding with expected cleaner.")
1416 (home-page "https://tl.tartanllama.xyz/")
1417 (license license:cc0)))
1418
1419(define-public immer
1420 (package
1421 (name "immer")
1422 (version "0.8.0")
1423 (source (origin
1424 (method git-fetch)
1425 (uri (git-reference
1426 (url "https://github.com/arximboldi/immer")
1427 (commit (string-append "v" version))))
1428 (file-name (git-file-name name version))
1429 (sha256
1430 (base32 "11km3l5h3rgsbj8yfyzk3fnx9na55l6zs2sxpx922yvlvs2blh27"))
1431 (modules '((guix build utils)))
1432 (snippet #~(begin
1433 (delete-file "tools/include/doctest.h")
1434 (delete-file "tools/include/catch.hpp")
1435 (substitute* (find-files "test" "\\.[cih]pp")
1436 (("<catch.hpp>") "<catch2/catch.hpp>")
1437 (("<doctest.h>") "<doctest/doctest.h>"))
1438 (substitute* (find-files "test/oss-fuzz" "\\.cpp")
1439 ;; someone used the wrong header :)
1440 (("<fmt/printf.h>") "<fmt/ostream.h>"))))))
1441 (build-system cmake-build-system)
1442 (arguments (list #:test-target "check"))
1443 (inputs (list boost libgc c-rrb))
1444 (native-inputs (list catch2 doctest fmt pkg-config))
1445 (home-page "https://sinusoid.es/immer")
1446 (synopsis "Immutable data structures")
1447 (description "Immer is a library of persistent and immutable data structures
1448written in C++.")
1449 (license license:boost1.0)))
1450
1451(define-public zug
1452 (let ((commit "d7e814b45fceceee3cb1442997d8b46cee4764ec")
1453 (revision "0"))
1454 (package
1455 (name "zug")
1456 (version (git-version "0.0.0" revision commit))
1457 (source (origin
1458 (method git-fetch)
1459 (uri (git-reference
1460 (url "https://github.com/arximboldi/zug")
1461 (commit commit)))
1462 (file-name (git-file-name name version))
1463 (sha256
1464 (base32 "1ww4prh763n81kzzijak8z495varlvqml4ip7i09klqnw6ya72fc"))
1465 (modules '((guix build utils)))
1466 (snippet #~(delete-file-recursively "tools"))))
1467 (build-system cmake-build-system)
1468 (arguments (list #:test-target "check"))
1469 (native-inputs (list boost catch2))
1470 (home-page "https://sinusoid.es/zug")
1471 (synopsis "Higher-order sequence transformers")
1472 (description "Zug is a C++ library providing transducers, that is,
1473composable sequential transformations.")
1474 (license license:boost1.0))))
1475
1476(define-public lager
1477 (let ((commit "2016df38be90ee176bcb73ea414be2318bc1ef31")
1478 (revision "0"))
1479 (package
1480 (name "lager")
1481 (version (git-version "0.0.0" revision commit))
1482 (source (origin
1483 (method git-fetch)
1484 (uri (git-reference
1485 (url "https://github.com/arximboldi/lager")
1486 (commit commit)))
1487 (file-name (git-file-name name version))
1488 (sha256
1489 (base32 "1b7zxwqrbm7db7wxqbsrk7jjd3znvvi1cwj7jg6zkmf0199071a5"))))
1490 (build-system cmake-build-system)
1491 (arguments (list #:test-target "check"
1492 #:configure-flags #~(list "-Dlager_BUILD_EXAMPLES=no")
1493 #:phases
1494 #~(modify-phases %standard-phases
1495 (add-after 'unpack 'delete-failing-tests
1496 (lambda _
1497 (delete-file-recursively "test/event_loop"))))))
1498 (inputs (list boost immer zug))
1499 (native-inputs (list cereal))
1500 (home-page "https://sinusoid.es/lager")
1501 (synopsis "Library for value-oriented design")
1502 (description "Lager is a library for value-oriented design implementing
1503the unidirectional data-flow architecture. Apart from a store and various
1504event loops it also provides lenses and cursors.")
1505 (license license:expat))))
1506
1507(define-public atomic-queue
1508 (package
1509 (name "atomic-queue")
1510 (version "1.0")
1511 (source (origin
1512 (method git-fetch)
1513 (uri (git-reference
1514 (url "https://github.com/max0x7ba/atomic_queue")
1515 (commit (string-append "v" version))))
1516 (file-name (git-file-name name version))
1517 (sha256
1518 (base32
1519 "0ssff73wlvrsk2nma99dmvm0ijyzfr54jk37kxgpb694r7ajc90l"))))
1520 (build-system meson-build-system)
1521 (arguments
1522 `(#:configure-flags '("-Dbenchmarks=false")
1523 #:phases
1524 (modify-phases %standard-phases
1525 ,@(if (%current-target-system)
1526 `(;; boost is a test dependency. We don't run tests when
1527 ;; cross-compiling. Disable all targets that depend on it.
1528 (add-after 'unpack 'do-not-check-for-boost
1529 (lambda _
1530 (substitute* "meson.build"
1531 (("unit_test_framework = [^\n]*" all)
1532 "unit_test_framework = disabler()")))))
1533 '())
1534 (replace 'check
1535 (lambda* (#:key tests? #:allow-other-keys)
1536 (when tests?
1537 (invoke "./tests"))))
1538 (replace 'install
1539 (lambda* (#:key outputs #:allow-other-keys)
1540 (copy-recursively "../source/include/atomic_queue"
1541 (string-append (assoc-ref outputs "out")
1542 "/include/atomic_queue")))))))
1543 (native-inputs
1544 (list boost
1545 pkg-config))
1546 (home-page "https://github.com/max0x7ba/atomic_queue")
1547 (synopsis "C++ lockless queue")
1548 (description
1549 "This package contains a C++11 multiple-producer-multiple-consumer lockless
1550queues header library based on circular buffer with @code{std::atomic}.")
1551 (license license:expat)))
1552
1553(define-public magic-enum
1554 (package
1555 (name "magic-enum")
1556 (version "0.7.3")
1557 (home-page "https://github.com/Neargye/magic_enum")
1558 (source (origin
1559 (method git-fetch)
1560 (uri (git-reference
1561 (url home-page)
1562 (commit (string-append "v" version))))
1563 (file-name (git-file-name name version))
1564 (sha256
1565 (base32
1566 "1x47radgsifgz3vn2561mlvf4cq46ii33cpyqf01znm56iirwq89"))))
1567 (build-system cmake-build-system)
1568 (synopsis "C++17 header only library for compile time reflection of enums")
1569 (description "Magic Enum offers static reflection of enums, with
1570conversions to and from strings, iteration and related functionality.")
1571 (license license:expat)))
1572
1573(define-public mcpp
1574 (package
1575 (name "mcpp")
1576 (version "2.7.2")
1577 (source (origin
1578 (method url-fetch)
1579 (uri (string-append "mirror://sourceforge/mcpp/mcpp/"
1580 "V." version "/mcpp-" version ".tar.gz"))
1581 (sha256
1582 (base32
1583 "0r48rfghjm90pkdyr4khxg783g9v98rdx2n69xn8f6c5i0hl96rv"))))
1584 (build-system gnu-build-system)
1585 (arguments
1586 (list #:configure-flags #~(list "--enable-mcpplib" "--disable-static")))
1587 (home-page "https://mcpp.sourceforge.net/")
1588 (synopsis "C/C++ preprocessor")
1589 (description
1590 "@code{mcpp} is Matsui's CPP implementation precisely conformed to
1591standards.")
1592 (license license:bsd-2)))
1593
1594(define-public cli11
1595 (package
1596 (name "cli11")
1597 (version "2.3.2")
1598 (source
1599 (origin
1600 (method git-fetch)
1601 (uri (git-reference
1602 (url "https://github.com/CLIUtils/CLI11")
1603 (commit (string-append "v" version))))
1604 (file-name (git-file-name name version))
1605 (sha256
1606 (base32 "1iif7kzp3yyjqg4yfar89rqmz44xkbi603gf9kjdqbgraw3f8zy7"))))
1607 (build-system cmake-build-system)
1608 (arguments
1609 (list #:configure-flags
1610 #~(list "-DCLI11_SINGLE_FILE=OFF"
1611 "-DCLI11_BUILD_EXAMPLES=OFF")))
1612 (native-inputs
1613 (list catch2 doxygen googletest))
1614 (synopsis "Command line parser for C++11")
1615 (description
1616 "CLI11 is a command line parser for C++11 and beyond that provides a rich
1617feature set with a simple and intuitive interface.")
1618 (home-page "https://cliutils.github.io/CLI11/book/")
1619 (license license:bsd-3)))
1620
1621(define-public caf
1622 (package
1623 (name "caf")
1624 (version "0.18.6")
1625 (source (origin
1626 (method git-fetch)
1627 (uri (git-reference
1628 (url "https://github.com/actor-framework/actor-framework")
1629 (commit version)))
1630 (file-name (git-file-name name version))
1631 (sha256
1632 (base32
1633 "055y82044djphpwbazaxsvmb66c2xfdi8vyny8pzdxkdgxfh0vq1"))))
1634 (build-system cmake-build-system)
1635 (arguments
1636 '(#:configure-flags
1637 '("-DCAF_ENABLE_EXAMPLES=OFF")))
1638 (inputs
1639 (list openssl))
1640 (synopsis "C++ implementation of the actor model")
1641 (description "The C++ Actor Framework (CAF) offers a high-level C++17
1642programming environment using the actor model for concurrent, distributed
1643computation.")
1644 (home-page "https://www.actor-framework.org/")
1645 (license license:bsd-3)))
1646
1647(define-public clipper
1648 (package
1649 (name "clipper")
1650 (version "6.4.2")
1651 (source
1652 (origin
1653 (method url-fetch)
1654 (uri (string-append "mirror://sourceforge/polyclipping"
1655 "/clipper_ver" version ".zip"))
1656 (sha256
1657 (base32 "09q6jc5k7p9y5d75qr2na5d1gm0wly5cjnffh127r04l47c20hx1"))))
1658 (build-system cmake-build-system)
1659 (arguments
1660 `(#:tests? #f ;no check target
1661 #:phases (modify-phases %standard-phases
1662 (replace 'unpack
1663 (lambda* (#:key source #:allow-other-keys)
1664 (and (invoke "unzip" source)
1665 (chdir "cpp")))))))
1666 (native-inputs
1667 `(("unzip" ,unzip)))
1668 (home-page "https://sourceforge.net/projects/polyclipping")
1669 (synopsis "Polygon and line clipping and offsetting library")
1670 (description
1671 "The Clipper library performs line & polygon clipping - intersection,
1672union, difference & exclusive-or, and line & polygon offsetting.
1673The library is based on Vatti's clipping algorithm.")
1674 (license license:boost1.0)))
1675
1676(define-public pcg-cpp
1677 (let ((commit "ffd522e7188bef30a00c74dc7eb9de5faff90092")
1678 (revision "2"))
1679 (package
1680 (name "pcg-cpp")
1681 (version (git-version "0.98.1" revision commit))
1682 (source (origin
1683 (method git-fetch)
1684 (uri (git-reference
1685 (url "https://github.com/imneme/pcg-cpp")
1686 (commit commit)))
1687 (file-name (git-file-name name version))
1688 (sha256
1689 (base32
1690 "0yxyqaphcc38zilpwpmssrl8ly1v6dimscqk2f4rcv1h22dinnqx"))))
1691 (build-system gnu-build-system)
1692 (arguments
1693 `(#:test-target "test"
1694 #:phases
1695 (modify-phases %standard-phases
1696 (delete 'configure))
1697 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
1698 (synopsis "C++11 header only library for random number generation")
1699 (description "The Permuted Congruential Generator (PCG) extends the
1700Linear Congruential Generator (LCG) with a permutation function to increase
1701output randomness while retaining speed, simplicity, and conciseness.")
1702 (home-page "https://www.pcg-random.org")
1703 (license (list license:expat license:asl2.0))))) ; dual licensed
1704
1705(define-public libconfini
1706 (package
1707 (name "libconfini")
1708 (version "1.16.4")
1709 (source (origin
1710 (method git-fetch)
1711 (uri (git-reference
1712 (url "https://github.com/madmurphy/libconfini")
1713 (commit version)))
1714 (file-name (git-file-name name version))
1715 (sha256
1716 (base32
1717 "002lmf1b2phmc6s348k00yx5shrcc7psn3pgqvraxvr6n8g747jx"))))
1718 (build-system gnu-build-system)
1719 (arguments
1720 `(#:configure-flags
1721 (list "--disable-static")
1722 #:phases
1723 (modify-phases %standard-phases
1724 (replace 'bootstrap
1725 (lambda _ (invoke "sh" "bootstrap" "--noconfigure"))))))
1726 (native-inputs
1727 (list autoconf automake libtool))
1728 (home-page "https://madmurphy.github.io/libconfini/html/index.html")
1729 (synopsis "INI file parser")
1730 (description "@code{libconfini} is an INI file parser library written in
1731C. It focuses on standardization and parsing exactness and is at ease with
1732almost every type of file containing key/value pairs.")
1733 (license license:gpl3+)))
1734
1735(define-public libcppgenerate
1736 ;; dbus-cxx requires an unreleased fix.
1737 (let ((commit "930c5503f76c877b72b9ff8546353d6f422bd010")
1738 (revision "0"))
1739 (package
1740 (name "libcppgenerate")
1741 (version (git-version "0.2" revision commit))
1742 (source (origin
1743 (method git-fetch)
1744 (uri (git-reference
1745 (url "https://github.com/rm5248/libcppgenerate")
1746 (commit commit)))
1747 (file-name (git-file-name name version))
1748 (sha256
1749 (base32
1750 "0csdg9b406i85aqgivjmvqjdnqbyiyjh3s0xsfsxppv7wlh7j85r"))))
1751 (build-system cmake-build-system)
1752 (arguments (list #:configure-flags #~'("-DENABLE_TESTS=ON")))
1753 (home-page "https://github.com/rm5248/libcppgenerate")
1754 (synopsis "C++ code generator library for C++")
1755 (description "@code{libcppgenerate} is a library for generating C++ code
1756from C++.")
1757 (license license:asl2.0))))
1758
1759(define-public libcutl
1760 (package
1761 (name "libcutl")
1762 (version "1.10.0")
1763 (source (origin
1764 (method url-fetch)
1765 (uri (string-append
1766 "https://www.codesynthesis.com/download/libcutl/"
1767 (version-major+minor version)
1768 "/libcutl-" version ".tar.bz2"))
1769 (sha256
1770 (base32
1771 "070j2x02m4gm1fn7gnymrkbdxflgzxwl7m96aryv8wp3f3366l8j"))
1772 (modules '((guix build utils)))
1773 (snippet
1774 '(begin
1775 ;; Remove bundled sources.
1776 (with-directory-excursion "cutl/details"
1777 (for-each delete-file-recursively
1778 ;; FIXME: Boost_RegEx isn't being detected.
1779 (list
1780 ;;"boost"
1781 "expat")))))))
1782 (build-system gnu-build-system)
1783 (arguments
1784 `(#:configure-flags (list "--disable-static"
1785 ;;"--with-external-boost"
1786 "--with-external-expat")))
1787 (inputs
1788 (list ;;("boost ,boost)
1789 expat))
1790 (native-inputs
1791 (list gcc-10)) ;does not build with gcc-12
1792 (home-page "https://www.codesynthesis.com/projects/libcutl/")
1793 (synopsis "C++ utility library with generic and independent components")
1794 (description "libcutl is a C++ utility library. It contains a collection
1795of generic and independent components such as meta-programming tests, smart
1796pointers, containers, compiler building blocks, etc.")
1797 (license (list license:expat ;everything except...
1798 license:boost1.0)))) ;...the files under cutl/details/boost
1799
1800(define-public libxsd-frontend
1801 (package
1802 (name "libxsd-frontend")
1803 (version "2.0.0")
1804 (source
1805 (origin
1806 (method url-fetch)
1807 (uri (string-append "https://www.codesynthesis.com/download/"
1808 "libxsd-frontend/" (version-major+minor version)
1809 "/libxsd-frontend-" version ".tar.bz2"))
1810 (sha256
1811 (base32 "1nmzchsvwvn66jpmcx18anzyl1a3l309x1ld4zllrg37ijc31fim"))))
1812 (build-system gnu-build-system)
1813 (arguments
1814 `(#:test-target "test"
1815 #:imported-modules ((guix build copy-build-system)
1816 ,@%gnu-build-system-modules)
1817 #:modules (((guix build copy-build-system) #:prefix copy:)
1818 (guix build gnu-build-system)
1819 (guix build utils))
1820 #:make-flags (list (string-append "--include-dir="
1821 (assoc-ref %build-inputs "build")
1822 "/include/"))
1823 #:phases
1824 (modify-phases %standard-phases
1825 (delete 'configure)
1826 (replace 'install
1827 (lambda args
1828 (apply (assoc-ref copy:%standard-phases 'install)
1829 #:install-plan
1830 '(("xsd-frontend" "include/xsd-frontend"
1831 #:include-regexp ("\\.?xx$"))
1832 ("xsd-frontend" "lib"
1833 #:include-regexp ("\\.so$")))
1834 args))))))
1835 (native-inputs
1836 (list build gcc-10))
1837 (inputs
1838 `(("libcutl" ,libcutl)
1839 ("libxerces-c" ,xerces-c)))
1840 (synopsis "XSD Front-end")
1841 (description "@code{libxsd-frontend} is a compiler frontend for the W3C
1842XML Schema definition language. It includes a parser, semantic graph types
1843and a traversal mechanism.")
1844 (home-page "https://www.codesynthesis.com/projects/libxsd-frontend/")
1845 (license license:gpl2+)))
1846
1847(define-public cli
1848 (package
1849 (name "cli")
1850 (version "1.1.0")
1851 (source
1852 (origin
1853 (method url-fetch)
1854 (uri (string-append "https://www.codesynthesis.com/download/"
1855 "cli/" (version-major+minor version)
1856 "/cli-" version ".tar.bz2"))
1857 (sha256
1858 (base32 "0bg0nsai2q4h3mldpnj0jz4iy4svs0bcfvmq0v0c9cdyknny606g"))))
1859 (build-system gnu-build-system)
1860 (arguments
1861 `(#:test-target "test"
1862 #:make-flags (list (string-append "--include-dir="
1863 (assoc-ref %build-inputs "build")
1864 "/include")
1865 (string-append "install_prefix="
1866 (assoc-ref %outputs "out")))
1867 #:phases
1868 (modify-phases %standard-phases
1869 (add-after 'unpack 'patch
1870 (lambda _
1871 (substitute* (find-files "." "\\.make$")
1872 (("build-0\\.3")
1873 (string-append (assoc-ref %build-inputs "build")
1874 "/include/build-0.3")))
1875 ;; Add the namespace prefix, to avoid errors such as "error:
1876 ;; ‘iterate_and_dispatch’ was not declared in this scope".
1877 (substitute* (find-files "." "\\.?xx$")
1878 (("add \\(typeid \\(type\\), \\*this\\);" all)
1879 (string-append "traverser_map<B>::" all))
1880 (("iterate_and_dispatch \\(s\\.names_begin.*;" all)
1881 (string-append "edge_dispatcher::" all)))))
1882 (delete 'configure))))
1883 (native-inputs
1884 (list build gcc-10))
1885 (inputs
1886 (list libcutl))
1887 (synopsis "C++ Command Line Interface (CLI) definition language")
1888 (description "@code{cli} is a domain-specific language (DSL) for defining
1889command line interfaces of C++ programs. It allows you to describe the
1890options that your program supports, their types, default values, and
1891documentation.")
1892 (home-page "https://codesynthesis.com/projects/cli/")
1893 (license license:expat)))
1894
1895(define-public xsd
1896 (package
1897 (name "xsd")
1898 (version "4.0.0")
1899 (source
1900 (origin
1901 (method url-fetch)
1902 (uri (string-append "https://www.codesynthesis.com/download/"
1903 "xsd/" (version-major+minor version)
1904 "/xsd-" version ".tar.bz2"))
1905 (sha256
1906 (base32 "1hi9ppxd34np8ydv1h0vgc2qpdmgcd1cdzgk30aidv670xjg91fx"))))
1907 (build-system gnu-build-system)
1908 (outputs '("out" "doc")) ;3.8 MiB of doc and examples
1909 (arguments
1910 `(#:test-target "test"
1911 #:make-flags (list (string-append "--include-dir="
1912 (assoc-ref %build-inputs "build")
1913 "/include/")
1914 (string-append "install_prefix="
1915 (assoc-ref %outputs "out")))
1916 #:phases (modify-phases %standard-phases
1917 (add-after 'install 'move-doc
1918 (lambda* (#:key outputs #:allow-other-keys)
1919 (let ((out (assoc-ref outputs "out"))
1920 (doc (assoc-ref outputs "doc")))
1921 (mkdir-p (string-append doc "/share/doc"))
1922 (rename-file (string-append out "/share/doc/xsd")
1923 (string-append doc "/share/doc/xsd-"
1924 ,version)))))
1925 (delete 'configure))))
1926 (native-inputs
1927 (list build cli gcc-10))
1928 (inputs
1929 (list libcutl libnsl libxsd-frontend))
1930 (propagated-inputs
1931 ;; The code XSD generates requires the following library at run time;
1932 ;; propagate it for convenience.
1933 (list xerces-c))
1934 (synopsis "XML Data Binding for C++")
1935 (description "CodeSynthesis XSD (also known as libxsd or xsdcxx) is an XML
1936Schema to C++ data binding compiler. Provided with an XML instance
1937specification (XML Schema), it generates C++ classes that represent the given
1938vocabulary as well as XML parsing and serialization code. The data stored in
1939XML can then be accessed using types and functions that semantically
1940correspond to an application domain rather than dealing with the intricacies
1941of reading and writing XML.")
1942 (home-page "https://codesynthesis.com/projects/xsd/")
1943 ;; Exceptions are made to allow using the generated source files as well
1944 ;; as the libxsd library in free software projects whose license is
1945 ;; incompatible with the GPL v2. Refer to the file named FLOSSE for the
1946 ;; details.
1947 (license license:gpl2+)))
1948
1949(define-public jsonnet
1950 (package
1951 (name "jsonnet")
1952 (version "0.17.0")
1953 (source
1954 (origin
1955 (method git-fetch)
1956 (uri (git-reference
1957 (url "https://github.com/google/jsonnet")
1958 (commit (string-append "v" version))))
1959 (file-name (git-file-name name version))
1960 (sha256
1961 (base32 "1ddz14699v5lqx3dh0mb7hfffr6fk5zhmzn3z8yxkqqvriqnciim"))
1962 (modules '((guix build utils)))
1963 (snippet
1964 #~(begin
1965 (rename-file "third_party/md5" ".md5")
1966 (delete-file-recursively "third_party")
1967 (delete-file-recursively "doc/third_party")
1968 (substitute* '("core/vm.cpp")
1969 (("#include \"json.hpp\"") "#include <nlohmann/json.hpp>"))
1970 (mkdir "third_party")
1971 (rename-file ".md5" "third_party/md5")))))
1972 (build-system cmake-build-system)
1973 (arguments
1974 `(#:configure-flags '("-DUSE_SYSTEM_GTEST=ON" "-DUSE_SYSTEM_JSON=ON"
1975 "-DBUILD_STATIC_LIBS=OFF")))
1976 (native-inputs
1977 (list googletest pkg-config))
1978 (inputs
1979 (list nlohmann-json))
1980 (home-page "https://jsonnet.org/")
1981 (synopsis "Data templating language")
1982 (description "Jsonnet is a templating language extending JSON
1983syntax with variables, conditions, functions and more.")
1984 (license license:asl2.0)))
1985
1986(define-public python-jsonnet
1987 (package
1988 (inherit jsonnet)
1989 (name "python-jsonnet")
1990 (build-system python-build-system)
1991 (arguments '())
1992 (synopsis "Python bindings for Jsonnet, the data templating language")
1993 (description "This package provides a Python library named @code{_jsonnet}
1994which can evaluate Jsonnet files and expressions.")))
1995
1996(define-public simdjson
1997 (package
1998 (name "simdjson")
1999 (version "3.1.0")
2000 (source (origin
2001 (method git-fetch)
2002 (uri (git-reference
2003 (url "https://github.com/simdjson/simdjson")
2004 (commit (string-append "v" version))))
2005 (file-name (git-file-name name version))
2006 (sha256
2007 (base32
2008 "0q784bm8xbz3p782dw02cdds6m71wk3acy94vva8krc9g88142ws"))))
2009 (build-system cmake-build-system)
2010 (arguments
2011 '(#:tests? #f ; tests require downloading dependencies
2012 #:configure-flags
2013 '("-DBUILD_SHARED_LIBS=ON")))
2014 (synopsis "JSON parser for C++ using SIMD instructions")
2015 (description
2016 "The simdjson library uses commonly available SIMD instructions and
2017microparallel algorithms to implement a strict JSON parser with UTF-8
2018validation.")
2019 (home-page "https://github.com/simdjson/simdjson")
2020 (license license:asl2.0)))
2021
2022(define-public bloomberg-bde-tools
2023 (let ((commit "f63dfe9114cd7df29623bd01f644b9f654253972"))
2024 (package
2025 (name "bloomberg-bde-tools")
2026 ;; Recent releases are not tagged so commit must be used for checkout.
2027 (version "3.118.0.0")
2028 (source (origin
2029 (method git-fetch)
2030 (uri (git-reference
2031 (url "https://github.com/bloomberg/bde-tools")
2032 (commit commit)))
2033 (file-name (git-file-name name version))
2034 (sha256
2035 (base32
2036 "1a5sw4xjwd222na3zkflm2gkmzhnfq17i8qapyaxszpiayf3hw6v"))
2037 (patches
2038 (search-patches
2039 "bloomberg-bde-tools-fix-install-path.patch"))))
2040 (build-system copy-build-system)
2041 ;; Unable to be an inline dependency of bloomberg-bde due to patch.
2042 (properties '((hidden? . #t)))
2043 (synopsis "Tools for developing and building libraries modeled on BDE")
2044 (description
2045 "This package provides the cmake imports needed to build bloomberg-bde.")
2046 (home-page "https://github.com/bloomberg/bde-tools")
2047 (license license:asl2.0))))
2048
2049(define-public bloomberg-bde
2050 (let ((commit "77a0f39d538c20ae28bece9a81cac99a9e1df95d"))
2051 (package
2052 (name "bloomberg-bde")
2053 ;; Recent releases are not tagged so commit must be used for checkout.
2054 (version "3.118.0.1")
2055 (source (origin
2056 (method git-fetch)
2057 (uri (git-reference
2058 (url "https://github.com/bloomberg/bde")
2059 (commit commit)))
2060 (file-name (git-file-name name version))
2061 (sha256
2062 (base32
2063 "0nw5clkc9yipd03kijh4c8lxi9zkxfxcjhszl1xzwvgz8xmpampf"))
2064 (patches
2065 (search-patches
2066 "bloomberg-bde-cmake-module-path.patch"))
2067 ;;(modules '((guix build utils)))
2068 (snippet
2069 `(begin
2070 ;; FIXME: Delete bundled software. The third-party packages
2071 ;; may be patched or modified from upstream sources.
2072 ;;(for-each delete-file-recursively
2073 ;; (list "thirdparty"))
2074 ;; Delete failing tests.
2075 (for-each
2076 delete-file
2077 (list "groups/bal/ball/ball_asyncfileobserver.t.cpp"
2078 "groups/bal/ball/ball_fileobserver2.t.cpp"
2079 "groups/bal/ball/ball_recordstringformatter.t.cpp"
2080 "groups/bal/balst/balst_stacktraceresolver_filehelper.t.cpp"
2081 "groups/bal/balst/balst_stacktraceutil.t.cpp"
2082 "groups/bdl/bdlmt/bdlmt_eventscheduler.t.cpp"
2083 "groups/bdl/bdlmt/bdlmt_timereventscheduler.t.cpp"
2084 "groups/bdl/bdls/bdls_filesystemutil.t.cpp"
2085 "groups/bsl/bslh/bslh_hash.t.cpp"
2086 "groups/bsl/bslh/bslh_hashpair.t.cpp"
2087 "groups/bsl/bsls/bsls_platform.t.cpp"
2088 "groups/bsl/bsls/bsls_stackaddressutil.t.cpp"
2089 "groups/bsl/bsls/bsls_stopwatch.t.cpp"
2090 "groups/bsl/bsls/bsls_timeutil.t.cpp"
2091 "groups/bsl/bslstl/bslstl_deque.1.t.cpp"
2092 "groups/bsl/bslstl/bslstl_deque.2.t.cpp"
2093 "groups/bsl/bslstl/bslstl_deque.3.t.cpp"
2094 "groups/bsl/bslstl/bslstl_function_invokerutil.t.cpp"))
2095 #t))))
2096 (build-system cmake-build-system)
2097 (arguments
2098 `(#:parallel-tests? #f ; Test parallelism may fail inconsistently.
2099 ;; Set UFID to build shared libraries. Flag descriptions can be found at
2100 ;; https://bloomberg.github.io/bde-tools/bbs/reference/bbs_build_configuration.html#ufid
2101 #:configure-flags '("-DUFID=opt_dbg_exc_mt_64_shr_cpp20")
2102 #:phases
2103 (modify-phases %standard-phases
2104 ;; Explicitly build tests separate from the main build.
2105 (add-after 'build 'build-tests
2106 (lambda* (#:key make-flags #:allow-other-keys)
2107 (apply invoke "make" "all.t"
2108 `(,@(if #:parallel-build?
2109 `("-j" ,(number->string (parallel-job-count)))
2110 '())
2111 ,@make-flags)))))))
2112 (native-inputs
2113 (list bloomberg-bde-tools pkg-config python))
2114 (synopsis "Foundational C++ libraries used at Bloomberg")
2115 (description
2116 "The BDE Development Environment libraries provide an enhanced
2117implementation of STL containers, vocabulary types for representing common
2118concepts (like dates and times), and building blocks for developing
2119multi-threaded applications and network applications.")
2120 (home-page "https://github.com/bloomberg/bde")
2121 ;; Out-of-memory on i686-linux, compile errors with non-x86.
2122 (supported-systems '("x86_64-linux"))
2123 (license license:asl2.0))))
2124
2125(define-public gulrak-filesystem
2126 (package
2127 (name "gulrak-filesystem")
2128 (version "1.5.12")
2129 (source (origin
2130 (method git-fetch)
2131 (uri (git-reference
2132 (url "https://github.com/gulrak/filesystem")
2133 (commit (string-append "v" version))))
2134 (file-name (git-file-name name version))
2135 (sha256
2136 (base32
2137 "1qg10akvhp801xirkj4mqcpvcxj90z81ygpyg752xv110zj4914g"))))
2138 (build-system cmake-build-system)
2139 (synopsis "Header only C++ std::filesystem compatible library")
2140 (description "This package provides a header-only single-file
2141std::filesystem compatible helper library, based on the C++17 and C++20 specs,
2142but implemented for C++11, C++14, C++17 or C++20.")
2143 (home-page "https://github.com/gulrak/filesystem")
2144 (license license:expat)))
2145
2146(define-public cpp-mustache
2147 (package
2148 (name "cpp-mustache")
2149 (version "5.0")
2150 (source (origin
2151 (method git-fetch)
2152 (uri (git-reference
2153 (url "https://github.com/kainjow/Mustache")
2154 (commit "4ed8c0b5a2a43d59394bd6900dc04e738dbf8c02")))
2155 (file-name (git-file-name name version))
2156 (sha256
2157 (base32
2158 "0qwrg35gby851viwd6dgrc346712701a0gll8a0m4xs8invxavrh"))))
2159 (build-system cmake-build-system)
2160 (arguments
2161 (list #:configure-flags
2162 #~(list
2163 (string-append "-DCMAKE_CXX_FLAGS=-I"
2164 #$(this-package-native-input "catch2")
2165 "/include/catch2/"))
2166 #:phases
2167 #~(modify-phases %standard-phases
2168 (replace 'check
2169 (lambda* (#:key tests? #:allow-other-keys)
2170 (when tests?
2171 (invoke "./tests/mustache-unit-tests"))))
2172 (replace 'install
2173 (lambda* (#:key outputs #:allow-other-keys)
2174 (install-file "../source/mustache.hpp"
2175 (string-append (assoc-ref outputs "out")
2176 "/include")))))))
2177 (native-inputs (list catch2))
2178 (home-page "https://github.com/kainjow/Mustache")
2179 (synopsis "Mustache text templates for modern C++")
2180 (description "@code{cpp-mustache} is a Mustache implementation for C++ 11
2181and above. It is header only and has zero dependencies. It provides a
2182templated string type for compatibility with any STL-like string (std::string,
2183std::wstring, etc).")
2184 (license license:boost1.0)))
2185
2186(define-public crc32c
2187 (package
2188 (name "crc32c")
2189 (version "1.1.2")
2190 (source (origin
2191 (method git-fetch)
2192 (uri (git-reference
2193 (url "https://github.com/google/crc32c")
2194 (commit version)))
2195 (file-name (git-file-name name version))
2196 (sha256
2197 (base32
2198 "0966lyy3w5cnrs0c0fkma4hga51k54hns72l4n76944awqssap7j"))
2199 (patches (search-patches "crc32c-unbundle-googletest.patch"))))
2200 (build-system cmake-build-system)
2201 (arguments
2202 (list #:configure-flags #~(list "-DBUILD_SHARED_LIBS=ON"
2203 "-DCRC32C_BUILD_BENCHMARKS=OFF"
2204 "-DCRC32C_USE_GLOG=OFF"
2205 (string-append
2206 "-DCRC32C_BUILD_TESTS="
2207 ;; TODO: perhaps infer #:tests?
2208 (if #$(%current-target-system)
2209 "OFF" "ON")))))
2210 (native-inputs (list googletest))
2211 (home-page "https://github.com/google/crc32c")
2212 (synopsis "Cyclic redundancy check")
2213 (description
2214 "This package provides architecture-specific implementations of the
2215CRC32C algorithm, which is specified in RFC 3720, section 12.1.")
2216 (license license:bsd-3)))
2217
2218(define fast-float-test-files
2219 (let ((commit "97a0b2e638feb479387554cf253e346500541e7e"))
2220 (origin
2221 (method git-fetch)
2222 (uri (git-reference
2223 (url (string-append "https://github.com/fastfloat"
2224 "/supplemental_test_files.git"))
2225 (commit "97a0b2e638feb479387554cf253e346500541e7e")))
2226 (file-name (string-append "fast-float-test-files-"
2227 (string-take commit 8)))
2228 (sha256
2229 (base32
2230 "0dxbiyzyh7i847i89ablfzypfc3ckhm7f74w98jsh73v1mppmxlf")))))
2231
2232(define-public fast-float
2233 (package
2234 (name "fast-float")
2235 (version "3.5.1")
2236 (source (origin
2237 (method git-fetch)
2238 (uri (git-reference
2239 (url "https://github.com/fastfloat/fast_float")
2240 (commit (string-append "v" version))))
2241 (file-name (git-file-name name version))
2242 (sha256
2243 (base32
2244 "0z3rxxd0pwvw70dbnv63rm67biw829vdqf50y16isxm6g3sbrz8g"))))
2245 (build-system cmake-build-system)
2246 (arguments
2247 (list
2248 #:configure-flags #~(list "-DFASTFLOAT_TEST=ON"
2249 "-DSYSTEM_DOCTEST=ON")
2250 #:phases
2251 #~(modify-phases %standard-phases
2252 (add-after 'unpack 'patch-cmake-tests
2253 (lambda* (#:key inputs native-inputs #:allow-other-keys)
2254 (substitute* "tests/CMakeLists.txt"
2255 (("FetchContent_GetProperties\\(supplemental_test_files.*")
2256 "")
2257 (("if\\(NOT supplemental_test_files_POPULATED.*")
2258 (string-append
2259 "set(supplemental_test_files_BINARY_DIR "
2260 (search-input-directory (or native-inputs inputs)
2261 "data")
2262 ")\nif(0)\n"))))))))
2263 (native-inputs (list doctest fast-float-test-files))
2264 (home-page "https://github.com/fastfloat/fast_float")
2265 (synopsis "Floating point number parser for C++")
2266 (description "@code{fast_float} is a header-only C++ library for parsing
2267floating point numbers from strings. It implements the C++ from_chars
2268functions for the float and double types.")
2269 (license (list license:asl2.0 license:expat)))) ; dual licensed
2270
2271(define-public pocketfft-cpp
2272 (let ((commit "daa8bb18327bc5c7d22c69428c25cf5dc64167d3")
2273 (revision "0"))
2274 (package
2275 (name "pocketfft-cpp")
2276 (version (git-version "0" revision commit))
2277 (source (origin
2278 (method git-fetch)
2279 (uri (git-reference
2280 (url "https://github.com/mreineck/pocketfft")
2281 (commit commit)))
2282 (file-name (git-file-name name version))
2283 (sha256
2284 (base32
2285 "1dbkkqkmkxgmz1qjpsqzic5ig3qw1pqndbb3dvjc7xq5f2rdzyq1"))
2286 (patches (search-patches
2287 "pocketfft-cpp-prefer-preprocessor-if.patch"))))
2288 (build-system copy-build-system)
2289 (arguments
2290 (list
2291 #:install-plan #~'(("pocketfft_hdronly.h" "include/"))))
2292 (home-page "https://github.com/mreineck/pocketfft")
2293 (synopsis "C++11 header-only Fast Fourier Transform library")
2294 (description "This package provides a single-header C++11 library for
2295computing Fast Fourier transformations. It supports multidimensional arrays,
2296different floating point sizes and complex transformations.")
2297 (license license:bsd-3))))
2298
2299(define-public sajson
2300 (let ((commit "ec644013e34f9984a3cc9ba568cab97a391db9cd")
2301 (revision "0"))
2302 (package
2303 (name "sajson")
2304 (version (git-version "1.0" revision commit))
2305 (source (origin
2306 (method git-fetch)
2307 (uri (git-reference
2308 (url "https://github.com/chadaustin/sajson")
2309 (commit commit)))
2310 (file-name (git-file-name name version))
2311 (patches
2312 (search-patches "sajson-build-with-gcc10.patch"))
2313 (sha256
2314 (base32
2315 "0fjag27w7gvkc5pdhq3ad7yc09rabpzahndw1sgsg04ipznidmmq"))
2316 (modules '((guix build utils)))
2317 (snippet '(delete-file-recursively "third-party"))))
2318 (build-system scons-build-system)
2319 (arguments
2320 (list
2321 #:phases
2322 #~(modify-phases %standard-phases
2323 (add-after 'unpack 'disable-other-builds
2324 (lambda _
2325 (substitute* "SConstruct"
2326 (("for name, tools in builds:")
2327 "for name, tools in [('opt', [gcc, opt])]:"))))
2328 (add-after 'unpack 'use-external-unittest-cpp
2329 (lambda _
2330 (substitute* "SConscript"
2331 (("unittestpp_env\\.Library") "_dummy = ")
2332 (("test_env = env.Clone\\(tools=\\[unittestpp, sajson\\]\\)")
2333 (string-append
2334 "test_env = env.Clone(tools=[sajson])\n"
2335 "test_env.Append(CPPPATH='"
2336 (search-input-directory %build-inputs "/include/UnitTest++")
2337 "', LIBPATH='"
2338 (string-append #$(this-package-native-input "unittest-cpp")
2339 "/lib")
2340 "', LIBS=['UnitTest++'])")))))
2341 (replace 'build
2342 (lambda* (#:key tests? #:allow-other-keys #:rest args)
2343 (when tests?
2344 (apply (assoc-ref %standard-phases 'build)
2345 args))))
2346 (replace 'check
2347 (lambda* (#:key tests? #:allow-other-keys)
2348 (when tests?
2349 (invoke "build/opt/test")
2350 (invoke "build/opt/test_unsorted"))))
2351 (replace 'install
2352 (lambda _
2353 (let ((out (string-append #$output "/include")))
2354 (install-file "include/sajson.h" out)
2355 (install-file "include/sajson_ostream.h" out)))))))
2356 (native-inputs (list unittest-cpp))
2357 (home-page "https://github.com/chadaustin/sajson")
2358 (synopsis "C++11 header-only, in-place JSON parser")
2359 (description "@code{sajson} is an in-place JSON parser with support for
2360parsing with only a single memory allocation.")
2361 (license license:expat))))
2362
2363(define-public sajson-for-gemmi
2364 (package/inherit sajson
2365 (name "sajson-for-gemmi")
2366 (source (origin
2367 (inherit (package-source sajson))
2368 (patches (cons
2369 (search-patch
2370 "sajson-for-gemmi-numbers-as-strings.patch")
2371 (origin-patches (package-source sajson))))))
2372 (arguments
2373 (substitute-keyword-arguments (package-arguments sajson)
2374 ;; This is a modified version used in gemmi, in which numbers are kept
2375 ;; as strings. Building the tests fails with the modification.
2376 ((#:tests? _ #f) #f)))
2377 (properties '((hidden? . #t)))))
2378
2379(define-public optional-lite
2380 (package
2381 (name "optional-lite")
2382 (version "3.5.0")
2383 (source (origin
2384 (method git-fetch)
2385 (uri (git-reference
2386 (url "https://github.com/martinmoene/optional-lite")
2387 (commit (string-append "v" version))))
2388 (file-name (git-file-name name version))
2389 (sha256
2390 (base32
2391 "0jpsm94kp1504yk9s2km86zv8xrszz30qanmhz2ljmvsdblz2l47"))))
2392 (build-system cmake-build-system)
2393 (home-page "https://github.com/martinmoene/optional-lite")
2394 (synopsis "Nullable object for C++98, C++11 and later")
2395 (description
2396 "Optional lite is a single-file header-only library to represent optional
2397(nullable) objects and pass them by value. The library aims to provide a
2398C++17-like optional for use with C++98 and later. If available,
2399@code{std::optional} is used.")
2400 (license license:boost1.0)))
2401
2402(define-public optionparser
2403 (package
2404 (name "optionparser")
2405 (version "1.7")
2406 (source (origin
2407 (method url-fetch)
2408 (uri
2409 (string-append "mirror://sourceforge/optionparser/"
2410 "optionparser-" version ".tar.gz"))
2411 (sha256
2412 (base32
2413 "04gfxrdzwacaynb8scsz6rr7nh64n6yk6w9dh2qdhrxw4caqr0dk"))))
2414 (outputs '("out" "doc"))
2415 (build-system gnu-build-system)
2416 (arguments
2417 (list
2418 #:phases
2419 #~(modify-phases %standard-phases
2420 (delete 'configure)
2421 (add-before 'build 'chdir
2422 (lambda _ (chdir "src")))
2423 (replace 'check
2424 (lambda* (#:key tests? #:allow-other-keys)
2425 (when tests?
2426 (begin
2427 (invoke "./example_arg")
2428 (invoke "./testparse")
2429 (invoke "./testprintusage")
2430 (invoke "./testodr")
2431 (invoke "./example")))))
2432 (replace 'install
2433 (lambda _
2434 (install-file "optionparser.h"
2435 (string-append #$output "/include"))))
2436 (add-after 'install 'install-doc
2437 (lambda _
2438 (copy-recursively
2439 "../html"
2440 (string-append #$output:doc "/share/doc/optionparser/html")))))))
2441 (native-inputs (list doxygen))
2442 (home-page "https://optionparser.sourceforge.net/")
2443 (synopsis "Header-only C++ library to parse command line options")
2444 (description "This package provides a header-only C++ library to parse
2445command line options. It supports the short and long option formats of
2446getopt(), getopt_long() and getopt_long_only().")
2447 (license license:expat)))
2448
2449(define-public safeint
2450 (package
2451 (name "safeint")
2452 (version "3.0.27")
2453 (home-page "https://github.com/dcleblanc/SafeInt")
2454 (source (origin
2455 (method git-fetch)
2456 (uri (git-reference
2457 (url home-page)
2458 (commit version)))
2459 (file-name (git-file-name name version))
2460 (sha256
2461 (base32
2462 "01d2dpdhyw3lghmamknb6g39w2gg0sv53pgxlrs2la8h694z6x7s"))))
2463 (build-system cmake-build-system)
2464 (arguments
2465 (list #:phases #~(modify-phases %standard-phases
2466 (replace 'install
2467 (lambda _
2468 (let ((include-dir (string-append #$output
2469 "/include")))
2470 (with-directory-excursion "../source"
2471 (install-file "SafeInt.hpp" include-dir)
2472 (install-file "safe_math.h" include-dir)
2473 (install-file "safe_math_impl.h" include-dir)))))
2474 (add-after 'install 'install-doc
2475 (lambda _
2476 (let ((doc-dir (string-append #$output
2477 "/share/doc/safeint")))
2478 (with-directory-excursion "../source"
2479 (install-file "helpfile.md" doc-dir))))))))
2480 (synopsis "C and C++ library for managing integer overflows")
2481 (description
2482 "SafeInt is a class library for C++ that manages integer overflows. It
2483also includes a C library that checks casting, multiplication, division,
2484addition and subtraction for all combinations of signed and unsigned 32-bit and
248564-bit integers.")
2486 (license license:expat)))
2487
2488(define-public wdl
2489 ;; No tag is available.
2490 (let ((commit "da86a62d11e46e4ecd8b16f9775cb5188340a0e2")
2491 (revision "0"))
2492 (package
2493 (name "wdl")
2494 (version (git-version "0" revision commit))
2495 (source (origin
2496 (method git-fetch)
2497 (uri (git-reference
2498 (url "https://github.com/justinfrankel/WDL")
2499 (commit commit)))
2500 (file-name (git-file-name name version))
2501 ;; This patch fixes error of undefined functions, due to not
2502 ;; linking libraries, and invalid object.
2503 (patches
2504 (search-patches "wdl-link-libs-and-fix-jnetlib.patch"))
2505 (sha256
2506 (base32
2507 "0hdb604szkbrlyffiw94rz8wx4nvmk3zdkycfirqgjs7mh0l6vbq"))
2508 (modules '((guix build utils)))
2509 ;; Unbundle third party libraries which are not needed.
2510 (snippet
2511 '(with-directory-excursion "WDL"
2512 (for-each delete-file-recursively
2513 (list "cmath"
2514 "libpng"
2515 "lice/glew"
2516 "giflib"
2517 "jpeglib"
2518 "zlib"))))))
2519 (build-system gnu-build-system)
2520 (arguments
2521 (list
2522 #:test-target "test"
2523 #:phases
2524 #~(modify-phases %standard-phases
2525 (add-after 'unpack 'chdir
2526 (lambda _ (chdir "WDL/swell")))
2527 (delete 'configure)
2528 (replace 'build
2529 (lambda _
2530 (with-directory-excursion ".."
2531 (invoke "make" "-Ceel2") ;build eel2
2532 (invoke "make" "-Cjnetlib")) ;build jnetlib
2533 (invoke "make" "SWELL_SUPPORT_GTK=true")
2534 (invoke "make" "libSwell.colortheme")))
2535 (replace 'install
2536 (lambda _
2537 (chdir "..")
2538
2539 ;; Do not install these directories
2540 (delete-file-recursively "lice/test")
2541 (delete-file-recursively "swell/sample_project")
2542
2543 ;; Install headers.
2544 (let ((include (string-append #$output "/include/WDL")))
2545 (for-each
2546 (lambda (file)
2547 (install-file file
2548 (string-append include "/"
2549 (dirname file))))
2550 (find-files "." "\\.h$")))
2551 (install-file "swell/libSwell.so"
2552 (string-append #$output "/lib"))
2553 (install-file "swell/libSwell.colortheme"
2554 (string-append #$output "/share/WDL"))
2555 (install-file "eel2/loose_eel"
2556 (string-append #$output "/libexec"))
2557 (install-file "jnetlib/jnl.a"
2558 (string-append #$output "/lib")))))))
2559 (native-inputs (list pkg-config nasm))
2560 (inputs
2561 (list cairo
2562 fontconfig
2563 freetype
2564 gdk-pixbuf
2565 glib
2566 gtk+
2567 libxi
2568 libx11
2569 mesa
2570 zlib))
2571 (home-page "https://www.cockos.com/wdl/")
2572 (synopsis "Modestly reusable C++ libraries")
2573 (description
2574 "WDL is a modestly reusable C++ library that offers the following:
2575@itemize
2576@item Inline classes for cleanly managing memory allocations, lists,
2577queues, resource pools, strings, etc.
2578@item File reading/writing wrappers
2579@item Directory scanning API
2580@item SHA-1 implementation
2581@item Mergesort implementation
2582@item Blowfish implementation
2583@item Fast FFT implementation (based on DJBFFT)
2584@item Audio tools
2585@item LICE - Lightweight Image Compositing Engine
2586@item WDL Virtual Window system
2587@item Plush2 - Portable, lightweight software 3d rendering engine
2588@item SWELL - Simple Windows Emulation Layer
2589@item And more.
2590@end itemize")
2591 (license license:zlib))))
2592
2593(define-public ftxui
2594 (package
2595 (name "ftxui")
2596 (version "4.0.0")
2597 (source (origin
2598 (method git-fetch)
2599 (uri (git-reference
2600 (url "https://github.com/ArthurSonzogni/FTXUI")
2601 (commit (string-append "v" version))))
2602 (sha256
2603 (base32
2604 "01h59ln8amsj6ymxmsxhmslld2yp003n82fg3mphgkrh6lf22h6y"))
2605 (file-name (git-file-name name version))))
2606 (build-system cmake-build-system)
2607 (native-inputs (list googletest benchmark))
2608 (arguments
2609 (list #:configure-flags
2610 #~(list "-DFTXUI_BUILD_TESTS:BOOL=ON"
2611 "-DFTXUI_BUILD_TESTS_FUZZER:BOOL=OFF")))
2612 (home-page "https://github.com/ArthurSonzogni/FTXUI")
2613 (synopsis "C++ Functional Terminal User Interface")
2614 (description
2615 "Functional Terminal (X) User interface (FTXUI) is a simple C++ library for
2616terminal based user interfaces.
2617
2618Main features:
2619@itemize
2620@item Functional style.
2621@item Keyboard & mouse navigation.
2622@item Support for UTF8 and fullwidth chars.
2623@item Support for animations.
2624@item Support for drawing.
2625@item No dependencies.
2626@end itemize")
2627 (license license:expat)))
2628
2629(define-public mpark-variant
2630 (package
2631 (name "mpark-variant")
2632 (version "1.4.0")
2633 (source (origin
2634 (method git-fetch)
2635 (uri (git-reference
2636 (url "https://github.com/mpark/variant")
2637 (commit (string-append "v" version))))
2638 (sha256
2639 (base32
2640 "0gz8d5qprlfqb42cfyyc4nbwhgarhw027a9nr52h3gbdn560j0j4"))
2641 (file-name (git-file-name name version))))
2642 (build-system cmake-build-system)
2643 (arguments
2644 (list
2645 #:configure-flags #~(list "-DMPARK_VARIANT_INCLUDE_TESTS=mpark")
2646 #:phases
2647 #~(modify-phases %standard-phases
2648 (add-after 'unpack 'find-googletest
2649 (lambda _
2650 (substitute* "test/CMakeLists.txt"
2651 (("add_subdirectory.*3rdparty/googletest.*\n")
2652 "find_package(GTest REQUIRED)\n")
2653 ((".*3rdparty/googletest.*\n") "")
2654 ((".*config_compiler_and_linker.*\n") "")
2655 (("gtest_main") "gtest gtest_main")))))))
2656 (native-inputs (list googletest))
2657 (home-page "https://github.com/mpark/variant")
2658 (synopsis "Implementation of std::variant for C++11/14/17")
2659 (description
2660 "MPark.Variant provides the C++17 std::variant for C++11/14/17. It is
2661based on the implementation of std::variant in libc++.")
2662 (license license:boost1.0)))
2663
2664(define-public tsl-hopscotch-map
2665 (package
2666 (name "tsl-hopscotch-map")
2667 (version "2.3.0")
2668 (source (origin
2669 (method git-fetch)
2670 (uri (git-reference
2671 (url "https://github.com/Tessil/hopscotch-map")
2672 (commit (string-append "v" version))))
2673 (file-name (git-file-name name version))
2674 (sha256
2675 (base32
2676 "012pw37w000pdxdvps0wsqrw6597cm6i6kr5rpl303qmiwqicb2p"))))
2677 (build-system cmake-build-system)
2678 (arguments
2679 (list
2680 #:phases
2681 #~(modify-phases %standard-phases
2682 (add-after 'unpack 'patch-cmake-test
2683 (lambda _
2684 (let ((file (open-file "CMakeLists.txt" "a")))
2685 (display "\nenable_testing()\nadd_subdirectory(tests)" file)
2686 (close-port file))
2687 (substitute* "tests/CMakeLists.txt"
2688 (("set\\(Boost_USE_STATIC_LIBS.*") "")
2689 (("add_subdirectory\\(\\.\\..*")
2690 "add_test(tsl_hopscotch_map_tests tsl_hopscotch_map_tests)\n")))))))
2691 (native-inputs (list boost))
2692 (home-page "https://github.com/Tessil/hopscotch-map")
2693 (synopsis "Hash maps and hash sets using hopscotch hashing")
2694 (description "This package provides a C++ implementation of several hash
2695map and a hash set variants using open addressing and hopscotch hashing to
2696resolve collisions. It is intended to be fast and provides additional
2697features, such as heterogeneous lookups and different growth policies.")
2698 (license license:expat)))
2699
2700(define-public tsl-sparse-map
2701 (package
2702 (name "tsl-sparse-map")
2703 (version "0.6.2")
2704 (source (origin
2705 (method git-fetch)
2706 (uri (git-reference
2707 (url "https://github.com/Tessil/sparse-map")
2708 (commit (string-append "v" version))))
2709 (sha256
2710 (base32
2711 "0rb7w0hzsj4qbm0dff1niaf75aag9lj0xqhgb3vg5h9hfic62ic2"))
2712 (file-name (git-file-name name version))))
2713 (build-system cmake-build-system)
2714 (arguments
2715 (list
2716 #:phases
2717 #~(modify-phases %standard-phases
2718 (add-after 'unpack 'patch-cmake-test
2719 (lambda _
2720 (let ((file (open-file "CMakeLists.txt" "a")))
2721 (display "\nenable_testing()\nadd_subdirectory(tests)" file)
2722 (close-port file))
2723 (substitute* "tests/CMakeLists.txt"
2724 (("set\\(Boost_USE_STATIC_LIBS.*") "")
2725 (("add_subdirectory\\(\\.\\..*")
2726 "add_test(tsl_sparse_map_tests tsl_sparse_map_tests)\n")))))))
2727 (native-inputs (list boost))
2728 (home-page "https://github.com/Tessil/sparse-map")
2729 (synopsis "Sparse hash map")
2730 (description "This package provides a C++ implementation of a hash map and
2731a hash set with open addressing and sparse quadratic probing. It is intended
2732to be memory efficient and provides additional features, such as heterogeneous
2733lookups and different growth policies.")
2734 (license license:expat)))
2735
2736(define-public tsl-ordered-map
2737 (package
2738 (name "tsl-ordered-map")
2739 (version "1.1.0")
2740 (source (origin
2741 (method git-fetch)
2742 (uri (git-reference
2743 (url "https://github.com/Tessil/ordered-map")
2744 (commit (string-append "v" version))))
2745 (file-name (git-file-name name version))
2746 (sha256
2747 (base32
2748 "0bz5zgabalb7z0j9scng4zmi95hy7iasry5gz15x6y6dsdz0qf3j"))))
2749 (build-system cmake-build-system)
2750 (arguments
2751 (list
2752 #:phases
2753 #~(modify-phases %standard-phases
2754 (add-after 'unpack 'patch-cmake-test
2755 (lambda _
2756 (let ((file (open-file "CMakeLists.txt" "a")))
2757 (display "\nenable_testing()\nadd_subdirectory(tests)" file)
2758 (close-port file))
2759 (substitute* "tests/CMakeLists.txt"
2760 (("set\\(Boost_USE_STATIC_LIBS.*") "")
2761 (("add_subdirectory\\(\\.\\..*")
2762 "add_test(tsl_ordered_map_tests tsl_ordered_map_tests)\n")))))))
2763 (native-inputs (list boost))
2764 (home-page "https://github.com/Tessil/ordered-map")
2765 (synopsis "Order-preserving hash map and hash set")
2766 (description "This package provides a C++ implementation of a hash map and
2767a hash set which preserve the order of insertion. It is intended for
2768efficient ordered insertions and lookup, while sacrifing performance for
2769ordered erase operations.")
2770 (license license:expat)))
2771
2772(define-public tl-optional
2773 (package
2774 (name "tl-optional")
2775 (version "1.1.0")
2776 (source (origin
2777 (method git-fetch)
2778 (uri (git-reference
2779 (url "https://github.com/TartanLlama/optional")
2780 (commit (string-append "v" version))))
2781 (file-name (git-file-name name version))
2782 (sha256
2783 (base32
2784 "0qkjplmhilbi1iqxx3pz0grcx5355ymk6wwd4h4309mk156xgx2q"))))
2785 (build-system cmake-build-system)
2786 (arguments
2787 (list
2788 #:phases
2789 #~(modify-phases %standard-phases
2790 (add-after 'unpack 'patch-cmake-test
2791 (lambda _
2792 (substitute* "CMakeLists.txt"
2793 (("FetchContent_Declare.*") "")
2794 ((".*http.*catchorg/Catch2.*") "")
2795 (("FetchContent_MakeAvailable\\(Catch2\\)")
2796 "find_package(Catch2 REQUIRED)")))))))
2797 (native-inputs (list catch2))
2798 (home-page "https://github.com/TartanLlama/optional")
2799 (synopsis "Implementation of std::optional with extensions for C++11/14/17")
2800 (description "@code{tl::optional} provides a single-header implementation of
2801the std::optional for C++11/14/17, with support for monadic operations added in
2802C++23.")
2803 (license license:cc0)))