projects/guix·blob next-master · refs

5025 lines · 197.3 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-2024 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, 2024, 2025 Ricardo Wurmus <[email protected]>
12;;; Copyright © 2020 Brice Waegeneire <[email protected]>
13;;; Copyright © 2020, 2021, 2022, 2024, 2025 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-2024 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-2025 David Elsing <[email protected]>
33;;; Copyright © 2022-2024 Zheng Junjie <[email protected]>
34;;; Copyright © 2022, 2023, 2024 Maxim Cournoyer <[email protected]>
35;;; Copyright © 2022 Antero Mejr <[email protected]>
36;;; Copyright © 2023, 2025 Sughosha <[email protected]>
37;;; Copyright © 2023, 2024, 2025 Artyom V. Poptsov <[email protected]>
38;;; Copyright © 2023 Liliana Marie Prikler <[email protected]>
39;;; Copyright © 2023 Denis 'GNUtoo' Carikli <[email protected]>
40;;; Copyright © 2023 Foundation Devices, Inc. <[email protected]>
41;;; Copyright © 2023-2024 Paul A. Patience <[email protected]>
42;;; Copyright © 2024 dan <[email protected]>
43;;; Copyright © 2024 Peepo Froggings <[email protected]>
44;;; Copyright © 2024 Jakob Kirsch <[email protected]>
45;;; Copyright © 2025 Sharlatan Hellseher <[email protected]>
46;;; Copyright © 2025 Sergio Pastor Pérez <[email protected]>
47;;; Copyright © 2025 Ashish SHUKLA <[email protected]>
48;;; Copyright © 2025 Nicolas Graves <[email protected]>
49;;; Copyright © 2025 Romain Garbage <[email protected]>
50;;; Copyright © 2024, 2025 Janneke Nieuwenhuizen <[email protected]>
51;;; Copyright © 2025 Andreas Enge <[email protected]>
52;;; Copyright © 2025 Philippe Swartvagher <[email protected]>
53;;; Copyright © 2025 Murilo <[email protected]>
54;;;
55;;; This file is part of GNU Guix.
56;;;
57;;; GNU Guix is free software; you can redistribute it and/or modify it
58;;; under the terms of the GNU General Public License as published by
59;;; the Free Software Foundation; either version 3 of the License, or (at
60;;; your option) any later version.
61;;;
62;;; GNU Guix is distributed in the hope that it will be useful, but
63;;; WITHOUT ANY WARRANTY; without even the implied warranty of
64;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
65;;; GNU General Public License for more details.
66;;;
67;;; You should have received a copy of the GNU General Public License
68;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
69
70(define-module (gnu packages cpp)
71 #:use-module ((guix licenses) #:prefix license:)
72 #:use-module (guix packages)
73 #:use-module (guix download)
74 #:use-module (guix utils)
75 #:use-module (guix git-download)
76 #:use-module (guix build-system cmake)
77 #:use-module (guix build-system copy)
78 #:use-module (guix build-system gnu)
79 #:use-module (guix build-system meson)
80 #:use-module (guix build-system python)
81 #:use-module (guix build-system pyproject)
82 #:use-module (guix build-system scons)
83 #:use-module (guix modules)
84 #:use-module (guix gexp)
85 #:use-module (gnu packages)
86 #:use-module (gnu packages algebra)
87 #:use-module (gnu packages assembly)
88 #:use-module (gnu packages audio)
89 #:use-module (gnu packages autotools)
90 #:use-module (gnu packages base)
91 #:use-module (gnu packages bdw-gc)
92 #:use-module (gnu packages benchmark)
93 #:use-module (gnu packages boost)
94 #:use-module (gnu packages build-tools)
95 #:use-module (gnu packages c)
96 #:use-module (gnu packages check)
97 #:use-module (gnu packages cmake)
98 #:use-module (gnu packages code)
99 #:use-module (gnu packages compression)
100 #:use-module (gnu packages crypto)
101 #:use-module (gnu packages curl)
102 #:use-module (gnu packages datastructures)
103 #:use-module (gnu packages disk)
104 #:use-module (gnu packages documentation)
105 #:use-module (gnu packages fontutils)
106 #:use-module (gnu packages freedesktop)
107 #:use-module (gnu packages gcc)
108 #:use-module (gnu packages gl)
109 #:use-module (gnu packages glib)
110 #:use-module (gnu packages gnome)
111 #:use-module (gnu packages gtk)
112 #:use-module (gnu packages image)
113 #:use-module (gnu packages libevent)
114 #:use-module (gnu packages libffi)
115 #:use-module (gnu packages libunwind)
116 #:use-module (gnu packages linux)
117 #:use-module (gnu packages llvm)
118 #:use-module (gnu packages logging)
119 #:use-module (gnu packages maths)
120 #:use-module (gnu packages mpi)
121 #:use-module (gnu packages onc-rpc)
122 #:use-module (gnu packages perl)
123 #:use-module (gnu packages python)
124 #:use-module (gnu packages python-build)
125 #:use-module (gnu packages python-check)
126 #:use-module (gnu packages python-xyz)
127 #:use-module (gnu packages pkg-config)
128 #:use-module (gnu packages popt)
129 #:use-module (gnu packages pretty-print)
130 #:use-module (gnu packages pulseaudio)
131 #:use-module (gnu packages samba)
132 #:use-module (gnu packages sdl)
133 #:use-module (gnu packages tls)
134 #:use-module (gnu packages tex)
135 #:use-module (gnu packages web)
136 #:use-module (gnu packages webkit)
137 #:use-module (gnu packages xdisorg)
138 #:use-module (gnu packages xml)
139 #:use-module (gnu packages xorg)
140 ;; Using autoload to avoid a cycle.
141 ;; Note that (gnu packages serialization) has #:use-module (gnu packages cpp)
142 #:autoload (gnu packages serialization) (cereal jsoncpp)
143 #:use-module (ice-9 match))
144
145(define-public argagg
146 (package
147 (name "argagg")
148 (version "0.4.7")
149 (source (origin
150 (method git-fetch)
151 (uri (git-reference
152 (url "https://github.com/vietjtnguyen/argagg")
153 (commit version)))
154 (file-name (git-file-name name version))
155 (sha256
156 (base32
157 "1pr0xqcc3wpwh02fwll3yf67rbxj39wbr2rqdd6bvjalmahg6hqv"))))
158 (build-system cmake-build-system)
159 (outputs '("out" "doc"))
160 (arguments
161 (list
162 #:configure-flags #~(list
163 (format #f "-DCMAKE_CXX_FLAGS=~a"
164 (string-join
165 (list "-Wno-error=array-bounds="
166 "-Wno-error=sign-conversion"))))
167 #:phases #~(modify-phases %standard-phases
168 (add-after 'install 'move-doc
169 (lambda* (#:key outputs #:allow-other-keys)
170 (let ((name #$(package-name argagg))
171 (doc (assoc-ref outputs "doc")))
172 (mkdir-p (string-append doc "/share/doc"))
173 (rename-file
174 (string-append #$output "/share/doc/" name)
175 (string-append doc "/share/doc/" name))))))))
176 (native-inputs (list doxygen))
177 (home-page "https://github.com/vietjtnguyen/argagg")
178 (synopsis "C++11 command line argument parser")
179 (description
180 "ArgAgg is yet another C++ command line argument/option
181parser. It was written as a simple and idiomatic alternative to other
182frameworks like getopt, Boost program options, TCLAP, and others. The goal is
183to achieve the majority of argument parsing needs in a simple manner with an
184easy to use API.")
185 (license license:expat)))
186
187(define-public argpp
188 ;; XXX: Does not release anymore.
189 (let ((commit "9e1d54f8ed20af0aa5857e6653ab605b2ab63d5c")
190 (revision "0"))
191 (package
192 (name "argpp")
193 (version (git-version "0.0.0" revision commit))
194 (source
195 (origin
196 (method git-fetch)
197 (uri (git-reference
198 (url "https://github.com/Grumbel/argpp")
199 (commit commit)))
200 (file-name (git-file-name name version))
201 (sha256
202 (base32 "1izn9xfplhnqi9vs4w28dixqd2vy0n1n3asaa1751grg30bw0xxs"))))
203 (build-system cmake-build-system)
204 (arguments
205 (list
206 #:configure-flags
207 #~(list "-DBUILD_TESTS=ON")))
208 (native-inputs (list tinycmmc))
209 (home-page "https://github.com/Grumbel/argpp")
210 (synopsis "Argument parser for C++")
211 (description "This package provides a simple argument parser for C++.")
212 (license license:gpl3+))))
213
214(define-public asmjit
215 (let ((commit "cfc9f813cc6ccda63cad872edb32b38e0662bedb")
216 (revision "2"))
217 (package
218 (name "asmjit")
219 (version (git-version "0.0.0" revision commit))
220 (source
221 (origin
222 (method git-fetch)
223 (uri
224 (git-reference
225 (url "https://github.com/asmjit/asmjit")
226 (commit commit)))
227 (file-name (git-file-name name version))
228 (sha256
229 (base32 "0lxkfg0b2bc2la0cvs5658a26mb00zlir4n0jkzzlg97l0jrbwpv"))))
230 (build-system cmake-build-system)
231 (arguments
232 (list #:configure-flags #~(list "-DASMJIT_TEST=TRUE")))
233 (home-page "https://asmjit.com/")
234 (synopsis "Machine code generation for C++")
235 (description "AsmJit is a lightweight library for machine code
236generation written in C++ language. It can generate machine code for X86 and
237X86_64 architectures with the support for the whole instruction set from
238legacy MMX to the newest AVX-512 and AMX. It has a type-safe API that allows
239C++ compiler to do semantic checks at compile-time even before the assembled
240code is generated or executed. It also provides an optional register
241allocator that makes it easy to generate complex code without a significant
242development effort.")
243 (license license:zlib))))
244
245(define-public asyncplusplus
246 (package
247 (name "asyncplusplus")
248 (version "1.2")
249 (source (origin
250 (method git-fetch)
251 (uri (git-reference
252 (url "https://github.com/Amanieu/asyncplusplus")
253 (commit (string-append "v" version))))
254 (file-name (git-file-name name version))
255 (sha256
256 (base32
257 "0iswbh7y46kn412c52af0n8bc4fplm3y94yh10n2lchispzar72j"))
258 (modules '((guix build utils)))
259 (snippet
260 ;; Fix install location of cmake files.
261 '(substitute* "CMakeLists.txt"
262 (("DESTINATION cmake")
263 "DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake")))))
264 (build-system cmake-build-system)
265 (arguments
266 (list #:tests? #f)) ;no tests
267 (home-page "https://github.com/Amanieu/asyncplusplus")
268 (synopsis "Concurrency framework for C++11")
269 (description "Async++ is a concurrency framework for C++11.")
270 (license license:expat)))
271
272(define-public biblesync
273 (package
274 (name "biblesync")
275 (version "2.1.0")
276 (source (origin
277 (method git-fetch)
278 (uri
279 (git-reference
280 (url "https://github.com/karlkleinpaste/biblesync")
281 (commit version)))
282 (file-name (git-file-name name version))
283 (sha256
284 (base32
285 "0prmd12jq2cjdhsph5v89y38j7hhd51dr3r1hivgkhczr3m5hf4s"))))
286 (build-system cmake-build-system)
287 (arguments
288 (list
289 #:tests? #f ;FIXME: Not sure how to run tests, if any
290 #:configure-flags
291 #~(list (string-append "-DBUILD_SHARED_LIBS=TRUE"))))
292 (inputs (list `(,util-linux "lib")))
293 (synopsis "C++ library implementing the BibleSync protocol")
294 (description
295 "BibleSync is a multicast protocol to support Bible software shared
296co-navigation. The premise is that there is a local network over which to
297multicast Bible navigation, and someone, possibly several someones, will
298transmit, and others will receive. The library implementing the protocol is
299a single C++ class providing a complete yet minimal public interface to
300support mode setting, setup for packet reception, transmit on local
301navigation, and handling of incoming packets.")
302 (home-page "https://github.com/karlkleinpaste/biblesync")
303 (license license:public-domain)))
304
305(define-public castxml
306(package
307 (name "castxml")
308 (version "0.6.4")
309 (source (origin
310 (method git-fetch)
311 (uri
312 (git-reference
313 (url "https://github.com/CastXML/CastXML")
314 (commit (string-append "v" version))))
315 (file-name (git-file-name name version))
316 (sha256
317 (base32 "0l5ys9zmllfgwhjrm897akbsf38iswfcarhxg27xfhiy0bmzcwsg"))))
318 (build-system cmake-build-system)
319 (arguments
320 (list
321 #:configure-flags
322 #~(list
323 (string-append "-DCLANG_RESOURCE_DIR="
324 #$(this-package-native-input "clang") "/lib/clang/"
325 #$(version-major
326 (package-version (this-package-native-input "clang")))))))
327 (inputs (list libffi))
328 (native-inputs (list clang-17 llvm-17))
329 (home-page "https://github.com/CastXML/CastXML")
330 (synopsis "C-family abstract syntax tree XML output")
331 (description "CastXML is a C-family abstract syntax tree XML output tool.
332This project is maintained by Kitware in support of ITK, the Insight
333Segmentation and Registration Toolkit.")
334 (license license:asl2.0)))
335
336(define-public collada-dom
337 (package
338 (name "collada-dom")
339 (version "2.5.0")
340 (source
341 (origin
342 (method git-fetch)
343 (uri (git-reference
344 (url "https://github.com/rdiankov/collada-dom.git")
345 (commit (string-append "v" version))))
346 (file-name (git-file-name name version))
347 (sha256
348 (base32 "1npz3yynv02g7w70c39zqn5w0g4sb438bmkkw0x7gj8cknjnwv9z"))
349 (patches (search-patches "collada-dom-boost.patch"))))
350 (build-system cmake-build-system)
351 (arguments (list #:tests? #f)) ; No tests present
352 (native-inputs (list pkg-config))
353 (inputs (list boost libxml2 minizip zlib))
354 (home-page "https://github.com/rdiankov/collada-dom")
355 (synopsis "COLLADA DOM C++ library")
356 (description "COLLADA-DOM is a C++ library for loading
357and saving COLLADA documents that can contain 2D, 3D, physics
358and other types of content.")
359 (license license:expat)))
360
361(define-public cpp-utilities
362 (package
363 (name "cpp-utilities")
364 (version "5.27.3")
365 (source
366 (origin
367 (method git-fetch)
368 (uri (git-reference
369 (url "https://github.com/Martchus/cpp-utilities")
370 (commit (string-append "v" version))))
371 (file-name (git-file-name name version))
372 (sha256
373 (base32
374 "1nm6d87j11jc5617qk58a81ajxgrncr7xsf4dkyscrygi2n3dbgz"))))
375 (build-system cmake-build-system)
376 (arguments
377 (list #:tests? #f))
378 (home-page "https://github.com/Martchus/cpp-utilities/")
379 (synopsis "Useful C++ classes and routines")
380 (description
381 "This package provides useful C++ classes and routines such as argument
382parser, IO and conversion utilities.")
383 (license license:gpl2+)))
384
385(define-public rang
386 (package
387 (name "rang")
388 (version "3.2")
389 (source
390 (origin
391 (method git-fetch)
392 (uri (git-reference
393 (url "https://github.com/agauniyal/rang")
394 (commit (string-append "v" version))))
395 (file-name (git-file-name name version))
396 (sha256
397 (base32 "0x2fp7zjjivgxblvx1j0qphn4ln6jq42x7xr757fywm3k03y7bil"))))
398 (build-system cmake-build-system)
399 (arguments (list #:tests? #f)) ; no tests
400 (home-page "https://agauniyal.github.io/rang/")
401 (synopsis "Header only terminal C++ library")
402 (description
403 "Rang is a minimal, header only C++ library for terminal goodies.")
404 (license license:asl2.0)))
405
406(define-public range-v3
407 (package
408 (name "range-v3")
409 (version "0.12.0")
410 (source
411 (origin
412 (method git-fetch)
413 (uri (git-reference
414 (url "https://github.com/ericniebler/range-v3.git")
415 (commit version)))
416 (file-name (git-file-name name version))
417 (sha256
418 (base32 "0r85s5rmp5ixmik2y5y4w760pa38j1sg9hbr1fss2flibzvrf53d"))))
419 (build-system cmake-build-system)
420 (arguments
421 (list
422 #:configure-flags #~(list "-DRANGES_NATIVE=OFF")))
423 (native-inputs (list doxygen perl))
424 (inputs (list boost))
425 (synopsis "Range library for C++14/17/20")
426 (description
427 "Range-v3 is an extension of the Standard Template Library that
428makes its iterators and algorithms more powerful by making them composable.
429Unlike other range-like solutions which, seek to do away with iterators, in
430range-v3 ranges are an abstraction layer on top of iterators.")
431 (home-page "https://github.com/ericniebler/range-v3/")
432 (license (list
433 ;; Elements of Programming
434 (license:x11-style "file:///LICENSE.txt")
435 ;; SGI STL
436 license:sgifreeb2.0
437 ;; LibC++ (dual-licensed)
438 license:expat
439 license:ncsa
440 ;; Others
441 license:boost1.0))))
442
443(define-public robin-hood-hashing
444 (package
445 (name "robin-hood-hashing")
446 (version "3.11.5")
447 (source (origin
448 (method git-fetch)
449 (uri (git-reference
450 (url "https://github.com/martinus/robin-hood-hashing")
451 (commit version)))
452 (modules '((guix build utils)))
453 (snippet #~(delete-file-recursively "src/test/thirdparty"))
454 (file-name (git-file-name name version))
455 (sha256
456 (base32
457 "1qx6i09sp8c3l89mhyaql144nzh2h26ky9ms3n5l85qplx1vv2r7"))))
458 (build-system cmake-build-system)
459 (arguments
460 (list #:tests? #f ;; Needs bundled libraries for tests.
461 ;; By default this option is set to ON and removes the ability to
462 ;; install the library.
463 #:configure-flags
464 #~(list "-DRH_STANDALONE_PROJECT=OFF")))
465 (home-page "https://github.com/martinus/robin-hood-hashing")
466 (synopsis "Unordered set and map data structures library")
467 (description "This library provides a header-only unordered set and map
468data structures for C++.")
469 (license license:expat)))
470
471(define-public c++-gsl
472 (package
473 (name "c++-gsl")
474 (version "4.2.0")
475 (source
476 (origin
477 (method git-fetch)
478 (uri
479 (git-reference
480 (url "https://github.com/microsoft/GSL.git")
481 (commit
482 (string-append "v" version))))
483 (file-name
484 (git-file-name name version))
485 (sha256
486 (base32 "08w3ppd43wx9vq641ljw5izjd7p5w7drynw13ll9shwy41ydif9n"))))
487 (build-system cmake-build-system)
488 (native-inputs
489 (list googletest-1.13 pkg-config))
490 (synopsis "Guidelines Support Library")
491 (description "c++-gsl contains functions and types that are suggested for
492use by the C++ Core Guidelines maintained by the Standard C++ Foundation.")
493 (home-page "https://github.com/microsoft/GSL/")
494 (license license:expat)))
495
496(define-public c2ffi
497 (package
498 (name "c2ffi")
499 ;; As per the c2ffi README: the first three elements are encoding the
500 ;; required Clang/LLVM version, and the last one is the c2ffi revision.
501 (version "18.1.0.0")
502 (source
503 (origin
504 (method git-fetch)
505 (uri (git-reference
506 (url "https://github.com/rpav/c2ffi")
507 (commit (string-append "v" version))))
508 (file-name (git-file-name name version))
509 (sha256
510 (base32 "03hw650wjrc4jb4ra8bwc4rnprr0fpnf3wlxzacfjysvl25jb0j6"))
511 (modules '((guix build utils)))
512 (snippet
513 '(substitute* "CMakeLists.txt"
514 ;; Guix seems to be packaging LLVM libs separately thus -lLLVM
515 ;; won't work. Instead every library used must be listed.
516 (("c2ffi PUBLIC clang-cpp LLVM")
517 "c2ffi PUBLIC clang-cpp LLVMCore LLVMSupport LLVMMCParser \
518LLVMOption LLVMBitReader LLVMProfileData")))))
519 (build-system cmake-build-system)
520 (arguments
521 '(;; If LLVM was built without RTTI, we need to also be built without
522 ;; it. See: https://stackoverflow.com/q/11904519
523 #:configure-flags '("-DCMAKE_CXX_FLAGS=-fno-rtti")
524 #:phases
525 (modify-phases %standard-phases
526 (replace 'check
527 (lambda* (#:key tests? #:allow-other-keys)
528 (when tests?
529 (invoke "./bin/c2ffi" "--help")))))))
530 (native-inputs
531 (list clang-18)) ; CMakeLists.txt invokes `clang -print-resource-dir`
532 (inputs
533 (list clang-18)) ; Compiled with gcc, but links against libclang-cpp.so
534 (home-page "https://github.com/rpav/c2ffi")
535 (synopsis "Clang-based FFI wrapper generator")
536 (description
537 "@code{c2ffi} is a tool for extracting definitions from C, C++, and
538Objective C headers for use with foreign function call interfaces. It uses
539the @code{Clang/LLVM} infrastructure to extract the data, and emits it in
540various formats, including @code{json}.")
541 (license license:gpl2+)))
542
543(define-public edlib
544 (package
545 (name "edlib")
546 (version "1.2.7")
547 (source
548 (origin
549 (method git-fetch)
550 (uri (git-reference
551 (url "https://github.com/Martinsos/edlib")
552 (commit (string-append "v" version))))
553 (file-name (git-file-name name version))
554 (sha256
555 (base32 "0ibpxs3r8ii2s3g7kdbyr8brg6ha5l0fb21idw8531gx9v2qzh4v"))))
556 (build-system cmake-build-system)
557 (arguments
558 '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
559 (home-page "https://github.com/Martinsos/edlib")
560 (synopsis "Lightweight library for sequence alignment")
561 (description "This package provides a lightweight library for calculating
562the edit distance between two sequences and finding an optimal alignment path
563for transforming one sequence into another.")
564 (license license:expat)))
565
566(define-public expected-lite
567 (package
568 (name "expected-lite")
569 (version "0.9.0")
570 (source (origin
571 (method git-fetch)
572 (uri (git-reference
573 (url "https://github.com/martinmoene/expected-lite")
574 (commit (string-append "v" version))))
575 (file-name (git-file-name name version))
576 (sha256
577 (base32
578 "0j3vwil4qippjmwvyah7c4cjw08ady0vkdkjfnyrlkyhl18z259d"))))
579 (build-system cmake-build-system)
580 (home-page "https://github.com/martinmoene/expected-lite")
581 (synopsis "Expected objects in C++11 and later")
582 (description "@i{expected lite} is a single-file header-only library for
583objects that either represent a valid value or an error that can be passed by
584value. It is intended for use with C++11 and later. The library is based on
585the @code{std::expected} proposal (@url{http://wg21.link/p0323}).")
586 (license license:boost1.0)))
587
588(define-public libzen
589 (package
590 (name "libzen")
591 (version "0.4.41")
592 (source (origin
593 (method url-fetch)
594 ;; Warning: This source has proved unreliable 1 time at least.
595 ;; Consider an alternate source or report upstream if this
596 ;; happens again.
597 (uri (string-append "https://mediaarea.net/download/source/"
598 "libzen/" version "/"
599 "libzen_" version ".tar.bz2"))
600 (sha256
601 (base32
602 "0b8yj3rmmcv2fn3b5bnchfkk82fy4w5446c70sxccvfa7myps8zb"))))
603 (native-inputs
604 (list autoconf automake libtool))
605 (build-system gnu-build-system)
606 (arguments
607 '(#:phases
608 ;; The build scripts are not at the root of the archive.
609 (modify-phases %standard-phases
610 (add-after 'unpack 'pre-configure
611 (lambda _
612 (chdir "Project/GNU/Library"))))))
613 (home-page "https://github.com/MediaArea/ZenLib")
614 (synopsis "C++ utility library")
615 (description "ZenLib is a C++ utility library. It includes classes for handling
616strings, configuration, bit streams, threading, translation, and cross-platform
617operating system functions.")
618 (license license:zlib)))
619
620(define-public lunasvg
621 (package
622 (name "lunasvg")
623 (version "3.5.0")
624 (source
625 (origin
626 (method git-fetch)
627 (uri (git-reference
628 (url "https://github.com/sammycage/lunasvg")
629 (commit (string-append "v" version))))
630 (file-name (git-file-name name version))
631 (sha256
632 (base32 "1scmm1q35j3r87117p401fg3c1bx2nkiyvc2f3svvr2m2y9ihabr"))))
633 (build-system cmake-build-system)
634 (inputs (list plutovg))
635 (arguments
636 '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON -DUSE_SYSTEM_PLUTOVG=ON")
637 #:tests? #f)) ;No tests.
638 (home-page "https://github.com/sammycage/lunasvg")
639 (synopsis "SVG rendering and manipulation library in C++")
640 (description
641 "LunaSVG is an SVG rendering library in C++, designed to be
642lightweight and portable, offering efficient rendering and manipulation of
643Scalable Vector Graphics (SVG) files.")
644 (license license:expat)))
645
646(define-public rttr
647 (package
648 (name "rttr")
649 (version "0.9.6")
650 (source
651 (origin
652 (method git-fetch)
653 (uri (git-reference
654 (url "https://github.com/rttrorg/rttr/")
655 (commit (string-append "v" version))))
656 (sha256
657 (base32 "1yxad8sj40wi75hny8w6imrsx8wjasjmsipnlq559n4b6kl84ijp"))
658 (file-name (git-file-name name version))))
659 (build-system cmake-build-system)
660 (arguments
661 (list
662 ;; No check target. Setting test-target to "unit_test" runs it twice.
663 #:tests? #f
664 #:configure-flags
665 #~(list "-DBUILD_DOCUMENTATION=OFF"
666 "-DBUILD_EXAMPLES=OFF"
667 "-DBUILD_UNIT_TESTS=OFF")
668 #:phases
669 #~(modify-phases %standard-phases
670 ;; library_test fails in chroot.
671 (add-after 'unpack 'skip-library-test
672 (lambda _
673 (substitute* "src/unit_tests/unit_tests.cmake"
674 (("misc/library_test.cpp") "")))))))
675 (native-inputs (list pkg-config))
676 (home-page "https://github.com/rttrorg/rttr/")
677 (synopsis "C++ Reflection Library")
678 (description
679 "RTTR stands for Run Time Type Reflection. It describes the ability of a
680computer program to introspect and modify an object at runtime. It is also
681the name of the library itself, which is written in C++.")
682 (license license:expat)))
683
684(define-public rct
685 (let* ((commit "b3e6f41d9844ef64420e628e0c65ed98278a843a")
686 (revision "2"))
687 (package
688 (name "rct")
689 (version (git-version "0.0.0" revision commit))
690 (source (origin
691 (method git-fetch)
692 (uri (git-reference
693 (url "https://github.com/Andersbakken/rct")
694 (commit commit)))
695 (sha256
696 (base32
697 "1m2931jacka27ghnpgf1z1plkkr64z0pga4r4zdrfpp2d7xnrdvb"))
698 (patches (search-patches "rct-add-missing-headers.patch"))
699 (file-name (git-file-name name version))))
700 (build-system cmake-build-system)
701 (arguments
702 '(#:configure-flags
703 '("-DWITH_TESTS=ON" ; To run the test suite
704 "-DRCT_RTTI_ENABLED=ON")))
705 (native-inputs
706 (list cppunit pkg-config))
707 (inputs
708 (list openssl zlib))
709 (home-page "https://github.com/Andersbakken/rct")
710 (synopsis "C++ library providing Qt-like APIs on top of the STL")
711 (description "Rct is a set of C++ tools that provide nicer (more Qt-like)
712 APIs on top of Standard Template Library (@dfn{STL}) classes.")
713 (license (list license:expat ; cJSON
714 license:bsd-4))))) ; everything else (LICENSE.txt)
715
716(define-public plutovg
717 (package
718 (name "plutovg")
719 (version "1.3.1")
720 (source
721 (origin
722 (method git-fetch)
723 (uri (git-reference
724 (url "https://github.com/sammycage/plutovg")
725 (commit (string-append "v" version))))
726 (file-name (git-file-name name version))
727 (sha256
728 (base32 "1pkil2g9vvnhn7xycha5lwya0kp9h1ndg0lszgh8nkbilnavwig9"))))
729 (build-system cmake-build-system)
730 (arguments
731 '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")
732 #:tests? #f)) ;No tests.
733 (home-page "https://github.com/sammycage/plutovg")
734 (synopsis "Tiny 2D vector graphics library in C")
735 (description "PlutoVG is a standalone 2D vector graphics library in C.")
736 (license license:expat)))
737
738(define-public plutosvg
739 (package
740 (name "plutosvg")
741 (version "0.0.7")
742 (source
743 (origin
744 (method git-fetch)
745 (uri (git-reference
746 (url "https://github.com/sammycage/plutosvg")
747 (commit (string-append "v" version))))
748 (file-name (git-file-name name version))
749 (sha256
750 (base32 "0vj21y4sr98mb337sr2yrgzs8ipgrnhd23qk3c1gykdxwgiy94p0"))))
751 (build-system cmake-build-system)
752 (native-inputs (list plutovg))
753 (arguments
754 '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")
755 #:tests? #f)) ;No tests.
756 (home-page "https://github.com/sammycage/plutovg")
757 (synopsis "Tiny SVG rendering library in C")
758 (description
759 "PlutoSVG is a compact and efficient SVG rendering library written in C.
760It is specifically designed for parsing and rendering SVG documents embedded
761in OpenType fonts, providing an optimal balance between speed and minimal
762memory usage. It is also suitable for rendering scalable icons.")
763 (license license:expat)))
764
765(define-public pystring
766 (package
767 (name "pystring")
768 (version "1.1.4")
769 (source
770 (origin
771 (method git-fetch)
772 (uri (git-reference
773 (url "https://github.com/imageworks/pystring")
774 (commit (string-append "v" version))))
775 (sha256
776 (base32 "0h12x24skrlx4fv0k5vl8wnar8gi6bq091yp93awkwsbnm8qwkzd"))
777 (file-name (git-file-name name version))))
778 (build-system cmake-build-system)
779 (arguments
780 (list #:phases
781 #~(modify-phases %standard-phases
782 ;; The install phase doesn't install the header
783 (add-after 'install 'install-header
784 (lambda _
785 (mkdir-p (string-append #$output "/include"))
786 (copy-file
787 (string-append #$(package-source this-package)
788 "/pystring.h")
789 (string-append #$output
790 "/include/pystring.h")))))))
791 (native-inputs (list pkg-config))
792 (home-page "https://github.com/imageworks/pystring")
793 (synopsis "C++ functions matching the Python string methods")
794 (description
795 "Pystring is a collection of C++ functions which match the interface and
796behavior of Python's string class methods using std::string. Implemented in
797C++, it does not require or make use of a python interpreter. It provides
798convenience and familiarity for common string operations not included in the
799standard C++ library. It's also useful in environments where both C++ and
800Python are used.")
801 (license license:bsd-3)))
802
803(define-public dashel
804 (package
805 (name "dashel")
806 (version "1.3.3")
807 (source
808 (origin
809 (method git-fetch)
810 (uri (git-reference
811 (url "https://github.com/aseba-community/dashel")
812 (commit version)))
813 (sha256
814 (base32 "0anks2l2i2qp0wlzqck1qgpq15a3l6dg8lw2h8s4nsj7f61lffwy"))
815 (file-name (git-file-name name version))))
816 (build-system cmake-build-system)
817 (arguments '(#:tests? #f)) ; no tests
818 (native-inputs (list pkg-config))
819 (home-page "https://github.com/aseba-community/dashel")
820 (synopsis "Data stream helper encapsulation library")
821 (description
822 "Dashel is a data stream helper encapsulation C++ library. It provides a
823unified access to TCP/UDP sockets, serial ports, console, and files streams.
824It also allows a server application to wait for any activity on any
825combination of these streams.")
826 (license license:bsd-3)))
827
828(define-public debug-assert
829 (package
830 (name "debug-assert")
831 (version "1.3.4")
832 (source
833 (origin
834 (method git-fetch)
835 (uri (git-reference
836 (url "https://github.com/foonathan/debug_assert")
837 (commit (string-append "v" version))))
838 (file-name (git-file-name name version))
839 (sha256
840 (base32 "0z9wfh9h83rv6khm6s6bym40vgv2igy4yh665ygsdxwamil254b9"))))
841 (build-system cmake-build-system)
842 (arguments (list #:tests? #f)) ; no tests
843 (home-page "https://github.com/foonathan/debug_assert")
844 (synopsis "Assertion macro for C++")
845 (description
846 "debug_assert is a C++11 header-only library which provides the
847@code{DEBUG_ASSERT()} macro, which among other features can be selectively
848enabled in different parts of your code.")
849 (license license:zlib)))
850
851(define-public xdgpp
852 (let ((commit "f01f810714443d0f10c333d4d1d9c0383be41375")
853 (revision "0"))
854 (package
855 (name "xdgpp")
856 (version (git-version "0.0.0" revision commit))
857 (source
858 (origin
859 (method git-fetch)
860 (uri (git-reference
861 (url "https://git.sr.ht/~danyspin97/xdgpp")
862 (commit commit)))
863 (file-name (git-file-name name version))
864 (sha256
865 (base32 "1w8da10whrhc7j82jf90814m3blabkl9s0kg8hv8h2fj5y3ji7hw"))))
866 (build-system gnu-build-system)
867 (native-inputs (list catch2))
868 (arguments
869 (list
870 #:test-target "test"
871 #:phases
872 #~(modify-phases %standard-phases
873 (delete 'configure)
874 (replace 'install
875 (lambda _
876 (install-file "xdg.hpp"
877 (string-append #$output "/include")))))))
878 (home-page "https://git.sr.ht/~danyspin97/xdgpp")
879 (synopsis "C++17 implementation of the XDG Base Directory Specification")
880 (description
881 "This package provides a header-only library to retrieve the file names
882of XDG base directories, such as XDG_CONFIG_HOME.")
883 (license license:expat))))
884
885(define-public xsimd
886 (package
887 (name "xsimd")
888 (version "13.2.0")
889 (source
890 (origin
891 (method git-fetch)
892 (uri (git-reference
893 (url "https://github.com/xtensor-stack/xsimd")
894 (commit version)))
895 (sha256
896 (base32 "1w3hffv5yr1xdl3f46dnnza3kixfgj13450181qf7spq2cknv2rg"))
897 (file-name (git-file-name name version))))
898 (build-system cmake-build-system)
899 (arguments
900 (list
901 #:configure-flags #~(list "-DBUILD_TESTS=ON")))
902 (native-inputs
903 (list doctest
904 googletest))
905 (home-page "https://github.com/xtensor-stack/xsimd")
906 (synopsis "C++ wrappers for SIMD intrinsics and math implementations")
907 (description
908 "xsimd provides a unified means for using @acronym{SIMD, single
909instruction multiple data} features for library authors. Namely, it enables
910manipulation of batches of numbers with the same arithmetic operators as for
911single values. It also provides accelerated implementation of common
912mathematical functions operating on batches.")
913 (license license:bsd-3)))
914
915(define-public icecream-cpp
916 (package
917 (name "icecream-cpp")
918 (version "1.0.0")
919 (source
920 (origin
921 (method git-fetch)
922 (uri (git-reference
923 (url "https://github.com/renatoGarcia/icecream-cpp")
924 (commit (string-append "v" version))))
925 (file-name (git-file-name name version))
926 (sha256
927 (base32 "1pl3qibxa9m7qkfpxszablwyhlnn9qz0cgms8kr2wwvxdzipr1p0"))))
928 (build-system cmake-build-system)
929 (arguments
930 (list
931 #:configure-flags #~(list "-DCMAKE_CXX_STANDARD=17")))
932 (native-inputs (list boost catch2))
933 (home-page "https://github.com/renatoGarcia/icecream-cpp")
934 (synopsis "C++ library for @code{printf} debugging")
935 (description
936 "IceCream-Cpp is a C++ library for @code{printf} debugging. It is
937inspired by the @url{https://github.com/gruns/icecream, Python library} of the
938same name.")
939 (license license:expat)))
940
941(define-public google-highway
942 (package
943 (name "google-highway")
944 (version "1.3.0")
945 (source
946 (origin
947 (method git-fetch)
948 (uri (git-reference
949 (url "https://github.com/google/highway")
950 (commit version)))
951 (file-name (git-file-name name version))
952 (sha256
953 (base32 "1bl576f3zlygxfmjqs5rrk3sag411hlhx2210lpq461plvvs80zi"))))
954 (build-system cmake-build-system)
955 (arguments
956 `(#:configure-flags (list "-DHWY_SYSTEM_GTEST=on"
957 "-DBUILD_SHARED_LIBS=ON")
958 ,@(if (string-prefix? "i686-linux" (or (%current-system)
959 (%current-target-system)))
960 '(#:phases
961 (modify-phases %standard-phases
962 (add-after 'unpack 'really-skip-precision-tests
963 (lambda _
964 (substitute* "hwy/contrib/math/math_test.cc"
965 (("Skipping math_test due to GCC issue with excess precision.*" m)
966 (string-append m "return;\n")))))))
967 '())))
968 (native-inputs
969 (list googletest))
970 (home-page "https://github.com/google/highway")
971 (synopsis "SIMD library with runtime dispatch")
972 (description "Highway is a performance-portable, length-agnostic C++
973library for SIMD (Single Instruction, Multiple Data) with runtime dispatch.")
974 (license license:asl2.0)))
975
976(define-public hyprgraphics
977 (package
978 (name "hyprgraphics")
979 (version "0.5.0")
980 (source (origin
981 (method git-fetch)
982 (uri (git-reference
983 (url "https://github.com/hyprwm/hyprgraphics")
984 (commit (string-append "v" version))))
985 (file-name (git-file-name name version))
986 (modules '((guix build utils)))
987 (snippet #~(substitute* "CMakeLists.txt" (("libjxl_cms") "")))
988 (sha256
989 (base32
990 "1l8yfnv1vs6iqnh7r73yyfkbl8l61mqpmpyhri65sqwvplkgw41i"))))
991 (build-system cmake-build-system)
992 (native-inputs (list gcc-15 pkg-config))
993 (inputs (list cairo
994 hyprutils
995 libjpeg-turbo
996 libjxl
997 ;; Note: The current librsvg-2.40 for non-Rust architectures
998 ;; is too old.
999 (librsvg-for-system)
1000 libwebp
1001 pango
1002 pixman
1003 spng))
1004 (home-page "https://wiki.hypr.land/Hypr-Ecosystem/hyprgraphics/")
1005 (synopsis "Hyprland graphics/resource utilities")
1006 (description
1007 "Hyprgraphics is a small C++ library with graphics/resource related
1008utilities used across the hypr* ecosystem.")
1009 (license license:bsd-3)))
1010
1011(define-public hyprlang
1012 (package
1013 (name "hyprlang")
1014 (version "0.6.8")
1015 (source (origin
1016 (method git-fetch)
1017 (uri (git-reference
1018 (url "https://github.com/hyprwm/hyprlang")
1019 (commit (string-append "v" version))))
1020 (file-name (git-file-name name version))
1021 (sha256
1022 (base32
1023 "06wiizy73f0x6zj1ar878gm1w9zam1gmgjw0ybixj3qag0gxqv34"))))
1024 (build-system cmake-build-system)
1025 (arguments
1026 (list
1027 #:phases
1028 #~(modify-phases %standard-phases
1029 (add-after 'unpack 'fix-cross-compilation
1030 (lambda _
1031 (substitute* "CMakeLists.txt"
1032 (("find_package.PkgConfig" all)
1033 (string-append
1034 "set(PKG_CONFIG_EXECUTABLE " #$(pkg-config-for-target) ")\n"
1035 all))))))))
1036 (native-inputs (list gcc-15 pkg-config))
1037 (inputs (list hyprutils))
1038 (home-page "https://wiki.hypr.land/Hypr-Ecosystem/hyprlang/")
1039 (synopsis "Official implementation library for hypr config language")
1040 (description
1041 "This package provides the official implementation for hypr configuration
1042language used in Hyprland.")
1043 (license license:lgpl3)))
1044
1045(define-public hyprutils
1046 (package
1047 (name "hyprutils")
1048 (version "0.11.0")
1049 (source (origin
1050 (method git-fetch)
1051 (uri (git-reference
1052 (url "https://github.com/hyprwm/hyprutils")
1053 (commit (string-append "v" version))))
1054 (file-name (git-file-name name version))
1055 (sha256
1056 (base32
1057 "1ymiqzncppdik8lw3ad7xaqig6c7bjcy7crcwbq3rjfk2hrc8rmc"))))
1058 (build-system cmake-build-system)
1059 (arguments
1060 (list
1061 #:tests? #f ; No tests in Release build type
1062 #:phases
1063 #~(modify-phases %standard-phases
1064 (add-after 'unpack 'fix-cross-compilation
1065 (lambda _
1066 (substitute* "CMakeLists.txt"
1067 (("find_package.PkgConfig" all)
1068 (string-append
1069 "set(PKG_CONFIG_EXECUTABLE " #$(pkg-config-for-target) ")\n"
1070 all))))))))
1071 (native-inputs (list gcc-15 pkg-config))
1072 (inputs (list pixman))
1073 (home-page "https://github.com/hyprwm/hyprutils")
1074 (synopsis "C++ library for utilities used across Hyprland ecosystem")
1075 (description
1076 "This package provides a C++ library for utilities used across Hyprland
1077ecosystem.")
1078 (license license:bsd-3)))
1079
1080(define-public hyprtoolkit
1081 (package
1082 (name "hyprtoolkit")
1083 (version "0.5.3")
1084 (source (origin
1085 (method git-fetch)
1086 (uri (git-reference
1087 (url "https://github.com/hyprwm/hyprtoolkit")
1088 (commit (string-append "v" version))))
1089 (file-name (git-file-name name version))
1090 (sha256
1091 (base32
1092 "0jjb1bf55270r3qc3fzxd1l3ahqsbgs948z46qi9niapa3gx1zli"))))
1093 (build-system cmake-build-system)
1094 (arguments (list #:tests? #f)) ; No tests in Release build type
1095 (native-inputs (list pkg-config hyprwayland-scanner))
1096 (inputs
1097 (list aquamarine
1098 cairo
1099 googletest
1100 hyprgraphics
1101 hyprlang
1102 hyprutils
1103 iniparser
1104 mesa
1105 libglvnd
1106 libxkbcommon
1107 pango
1108 pixman
1109 wayland
1110 wayland-protocols))
1111 (home-page "https://github.com/hyprwm/hyprtoolkit")
1112 (synopsis "Modern C++ Wayland-native GUI toolkit")
1113 (description "This package provides a C++ toolkit for making wayland GUI
1114apps.")
1115 (license license:bsd-3)))
1116
1117(define-public hyprwire
1118 (package
1119 (name "hyprwire")
1120 (version "0.2.1")
1121 (source (origin
1122 (method git-fetch)
1123 (uri (git-reference
1124 (url "https://github.com/hyprwm/hyprwire")
1125 (commit (string-append "v" version))))
1126 (file-name (git-file-name name version))
1127 (sha256
1128 (base32
1129 "0rzclhk42x9im9n6fz2bj98l9lb7jhl3vijvck4rj6yhb80kvli0"))))
1130 (build-system cmake-build-system)
1131 (arguments (list #:tests? #f)) ; There are no tests
1132 (native-inputs (list pkg-config gcc-15))
1133 (inputs
1134 (list hyprutils
1135 libffi
1136 pugixml))
1137 (home-page "https://github.com/hyprwm/hyprwire")
1138 (synopsis "Fast and consistent wire protocol for IPC")
1139 (description "This package provides a fast and consistent wire protocol,
1140and its implementation. This is essentially a method for processes to talk to
1141each other.")
1142 (license license:bsd-3)))
1143
1144(define-public hyprland-guiutils
1145 (package
1146 (name "hyprland-guiutils")
1147 (version "0.2.1")
1148 (source (origin
1149 (method git-fetch)
1150 (uri (git-reference
1151 (url "https://github.com/hyprwm/hyprland-guiutils")
1152 (commit (string-append "v" version))))
1153 (file-name (git-file-name name version))
1154 (sha256
1155 (base32
1156 "0x5757ch8rvgbph66fkf5cg39r37isvfy450429746xmajsy0qa7"))))
1157 (build-system cmake-build-system)
1158 (arguments (list #:tests? #f)) ; There are no tests
1159 (native-inputs (list pkg-config gcc-15))
1160 (inputs
1161 (list aquamarine
1162 cairo
1163 hyprgraphics
1164 hyprlang
1165 hyprtoolkit
1166 hyprutils
1167 mesa
1168 libxkbcommon
1169 pixman))
1170 (home-page "https://github.com/hyprwm/hyprland-guiutils")
1171 (synopsis "Hyprland GUI utilities")
1172 (description "This package provides GUI utilities for hyprland. It is the
1173successor of hyprland-qtutils.")
1174 (license license:bsd-3)))
1175
1176(define-public xsimd-benchmark
1177 (package
1178 (inherit xsimd)
1179 (name "xsimd-benchmark")
1180 (arguments
1181 `(#:configure-flags (list "-DBUILD_BENCHMARK=ON" "-DBUILD_EXAMPLES=ON")
1182 #:tests? #f
1183 #:phases (modify-phases %standard-phases
1184 (add-after 'unpack 'remove-march=native
1185 (lambda _
1186 (substitute* "benchmark/CMakeLists.txt"
1187 (("-march=native") ""))))
1188 (replace 'install
1189 (lambda* (#:key outputs #:allow-other-keys)
1190 ;; Install nothing but the executables.
1191 (let ((out (assoc-ref outputs "out")))
1192 (install-file "benchmark/benchmark_xsimd"
1193 (string-append out "/bin"))
1194 (install-file "examples/mandelbrot"
1195 (string-append out "/bin"))))))))
1196 (synopsis "Benchmark of the xsimd library")
1197
1198 ;; Mark as tunable to take advantage of SIMD code in xsimd/xtensor.
1199 (properties '((tunable? . #t)))))
1200
1201(define-public chaiscript
1202 (package
1203 (name "chaiscript")
1204 (version "6.1.0")
1205 (source
1206 (origin
1207 (method git-fetch)
1208 (uri (git-reference
1209 (url "https://github.com/ChaiScript/ChaiScript")
1210 (commit (string-append "v" version))))
1211 (file-name (git-file-name name version))
1212 (sha256
1213 (base32 "0i1c88rn1wwz8nf3dpapcdkk4w623m3nksfy5yjai10k9irkzy3c"))
1214 (modules '((guix build utils)))
1215 ;; It's bundled catch2 fails to build.
1216 (snippet '(begin
1217 (delete-file "unittests/catch.hpp")
1218 (substitute* "unittests/compiled_tests.cpp"
1219 (("catch[.]hpp") "catch2/catch.hpp"))
1220 (substitute* "unittests/type_info_test.cpp"
1221 (("catch[.]hpp") "catch2/catch.hpp"))))))
1222 (build-system cmake-build-system)
1223 (inputs (list catch2))
1224 (home-page "https://chaiscript.com/")
1225 (synopsis "Embedded scripting language designed for C++")
1226 (description
1227 "ChaiScript is one of the only embedded scripting language designed from
1228the ground up to directly target C++ and take advantage of modern C++
1229development techniques. Being a native C++ application, it has some advantages
1230over existing embedded scripting languages:
1231
1232@enumerate
1233@item Uses a header-only approach, which makes it easy to integrate with
1234existing projects.
1235@item Maintains type safety between your C++ application and the user scripts.
1236@item Supports a variety of C++ techniques including callbacks, overloaded
1237functions, class methods, and stl containers.
1238@end enumerate\n")
1239 (license license:bsd-3)))
1240
1241(define-public fifo-map
1242 (package
1243 (name "fifo-map")
1244 (version "1.0.0")
1245 (home-page "https://github.com/nlohmann/fifo_map")
1246 (source (origin
1247 (method git-fetch)
1248 (uri (git-reference
1249 (url home-page)
1250 (commit (string-append "v" version))))
1251 (sha256
1252 (base32
1253 "0y59fk6ycrgjln9liwcja3l5j1vxpa5i671bynpbsjlyq5f2560q"))
1254 (patches (search-patches "fifo-map-remove-catch.hpp.patch"
1255 "fifo-map-fix-flags-for-gcc.patch"))
1256 (file-name (git-file-name name version))
1257 (modules '((guix build utils)))
1258 (snippet '(delete-file-recursively "./test/thirdparty"))))
1259 (inputs
1260 (list catch2-1))
1261 (build-system cmake-build-system)
1262 (arguments
1263 '(#:phases
1264 (modify-phases %standard-phases
1265 (replace 'check
1266 (lambda* (#:key tests? #:allow-other-keys)
1267 (when tests? (invoke "./unit"))))
1268 (replace 'install
1269 (lambda* (#:key outputs #:allow-other-keys)
1270 (let* ((out (assoc-ref outputs "out"))
1271 (inc (string-append out "/include/fifo_map")))
1272 (with-directory-excursion "../source"
1273 (install-file "src/fifo_map.hpp" inc))))))))
1274 (synopsis "FIFO-ordered associative container for C++")
1275 (description "Fifo_map is a C++ header only library for associative
1276container which uses the order in which keys were inserted to the container
1277as ordering relation.")
1278 (license license:expat)))
1279
1280(define-public frozen
1281 ;; The test suite fails to compile with the latest 1.1.1 release; use a
1282 ;; newer commit (see:
1283 ;; https://github.com/serge-sans-paille/frozen/issues/163).
1284 (let ((commit "dd1f58c5f6c97fbf0832cc4e84676663839b913e")
1285 (revision "0"))
1286 (package
1287 (name "frozen")
1288 (version (git-version "1.1.1" revision commit))
1289 (source (origin
1290 (method git-fetch)
1291 (uri (git-reference
1292 (url "https://github.com/serge-sans-paille/frozen")
1293 (commit commit)))
1294 (file-name (git-file-name name version))
1295 (sha256
1296 (base32
1297 "06i307a7v6alxfy24d47b1sjkz5f4mrqwl2vb4j8zx7wlgnrf08b"))))
1298 (build-system cmake-build-system)
1299 (home-page "https://github.com/serge-sans-paille/frozen")
1300 (synopsis "C++ constexpr alternative header-only library")
1301 (description "@code{frozen} is a header-only library that provides zero
1302cost initialization for immutable containers, fixed-size containers, and
1303various algorithms. It provides features such as:
1304@itemize
1305@item
1306immutable (also known as frozen), @code{constexpr}-compatible versions of
1307{std::set}, {std::unordered_set}, {std::map} and {std::unordered_map}
1308@item
1309fixed-capacity, @code{constinit}-compatible versions of @code{std::map} and
1310@code{std::unordered_map} with immutable, compile-time selected keys mapped to
1311mutable values.
1312@item
1313zero cost initialization version of @code{std::search} for frozen needles
1314using Boyer-Moore or Knuth-Morris-Pratt algorithms.
1315@end itemize
1316The @code{unordered_*} containers are guaranteed perfect (no hash
1317collision) and the extra storage is linear with respect to the number of
1318keys.")
1319 (license license:asl2.0))))
1320
1321(define-public glaze
1322 (package
1323 (name "glaze")
1324 (version "7.0.1")
1325 (source (origin
1326 (method git-fetch)
1327 (uri (git-reference
1328 (url "https://github.com/stephenberry/glaze")
1329 (commit (string-append "v" version))))
1330 (file-name (git-file-name name version))
1331 (sha256
1332 (base32
1333 "1plzxrpk470yqm0pzdw5ghc39jvcafn2xj90hk4gpy7r82wvwfhs"))))
1334 (build-system cmake-build-system)
1335 (arguments
1336 (list #:tests? #f
1337 #:configure-flags
1338 ;; Building tests require fetching external libraries
1339 #~(list "-DBUILD_TESTING=OFF")))
1340 (home-page "https://github.com/stephenberry/glaze")
1341 (synopsis "Fast, in memory, JSON and reflection library for modern C++")
1342 (description "Glaze is an in-memory JSON and reflection library for modern
1343C++. It also provides support for BEVE, CBOR, CSV, MessagePack, TOML, YAML,
1344and EETF.")
1345 (license license:expat)))
1346
1347(define-public json-dto
1348 (package
1349 (name "json-dto")
1350 (version "0.3.1")
1351 (source (origin
1352 (method git-fetch)
1353 (uri (git-reference
1354 (url "https://github.com/Stiffstream/json_dto")
1355 (commit (string-append "v." version))))
1356 (file-name (git-file-name name version))
1357 (sha256
1358 (base32
1359 "0wr1srp08fr2mv4fmnqr626pwiw60svn6wkvy2xg7j080mgwb3ml"))))
1360 (build-system cmake-build-system)
1361 (arguments
1362 (list
1363 #:configure-flags #~(list "-DJSON_DTO_INSTALL_SAMPLES=OFF")
1364 #:phases
1365 #~(modify-phases %standard-phases
1366 (add-after 'unpack 'change-directory
1367 (lambda _
1368 (chdir "dev"))))))
1369 (native-inputs (list catch2))
1370 (propagated-inputs (list rapidjson)) ;#include'd
1371 (home-page "https://github.com/Stiffstream/json_dto")
1372 (synopsis "JSON to C++ structures conversion library")
1373 (description "@code{json_dto} library is a small header-only helper for
1374converting data between JSON representation and C++ structs. DTO stands for
1375data transfer object.")
1376 (license license:bsd-3)))
1377
1378(define-public nlohmann-json
1379 (package
1380 (name "nlohmann-json")
1381 (version "3.12.0")
1382 (home-page "https://github.com/nlohmann/json")
1383 (source
1384 (origin
1385 (method git-fetch)
1386 (uri (git-reference (url home-page)
1387 (commit (string-append "v" version))))
1388 (sha256
1389 (base32 "09nqq56ighr3lghhn3fs399lkllghz717j0xyp87x0giw86ayh3h"))
1390 (file-name (git-file-name name version))
1391 (modules '((guix build utils)))
1392 (snippet
1393 #~(begin
1394 ;; Delete bundled software. Preserve doctest_compatibility.h, which
1395 ;; is a wrapper library added by this package.
1396 (install-file "./tests/thirdparty/doctest/doctest_compatibility.h"
1397 "/tmp")
1398 (delete-file-recursively "./tests/thirdparty")
1399 (install-file "/tmp/doctest_compatibility.h"
1400 "./tests/thirdparty/doctest")
1401
1402 ;; Adjust for the unbundled fifo_map and doctest.
1403 (substitute* (find-files "./tests/" "\\.h(pp)?")
1404 (("#include \"doctest\\.h\"") "#include <doctest/doctest.h>")
1405 (("#include <doctest\\.h>") "#include <doctest/doctest.h>"))
1406 (with-directory-excursion "tests/src"
1407 (let ((files (find-files "." "\\.cpp$")))
1408 (substitute* files
1409 (("#include ?\"(fifo_map.hpp)\"" all fifo-map-hpp)
1410 (string-append
1411 "#include <fifo_map/" fifo-map-hpp ">")))))))))
1412 (build-system cmake-build-system)
1413 (arguments
1414 (list
1415 #:configure-flags
1416 #~(list "-DJSON_MultipleHeaders=ON" ; For json_fwd.hpp.
1417 (string-append "-DJSON_TestDataDirectory="
1418 (dirname
1419 (search-input-directory %build-inputs
1420 "json_nlohmann_tests"))))
1421 #:phases
1422 #~(modify-phases %standard-phases
1423 (replace 'check
1424 (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
1425 (if tests?
1426 ;; Some tests need git and a full checkout, skip those.
1427 (invoke "ctest" "-LE" "git_required"
1428 "-j" (if parallel-tests?
1429 (number->string (parallel-job-count))
1430 "1"))
1431 (format #t "test suite not run~%")))))))
1432 (native-inputs
1433 (list amalgamate
1434 (let ((version "3.1.0"))
1435 (origin
1436 (method git-fetch)
1437 (uri (git-reference
1438 (url "https://github.com/nlohmann/json_test_data")
1439 (commit (string-append "v" version))))
1440 (file-name (git-file-name "json_test_data" version))
1441 (sha256
1442 (base32
1443 "0nbirc428qx0lpi940p7y24fzdjbwl6xig3h5rdbihyymmdzhvbc"))))))
1444 (inputs
1445 (list doctest fifo-map))
1446 (synopsis "JSON parser and printer library for C++")
1447 (description "@code{nlohmann::json} is a C++ JSON library that provides
1448intuitive syntax and trivial integration.")
1449 (license license:expat)))
1450
1451(define-deprecated-package json-modern-cxx
1452 nlohmann-json)
1453
1454(define-public jthread
1455 (let ((commit "0fa8d394254886c555d6faccd0a3de819b7d47f8")
1456 (revision "0"))
1457 (package
1458 (name "jthread")
1459 (version (git-version "0.0.0" revision commit))
1460 (source
1461 (origin
1462 (method git-fetch)
1463 (uri (git-reference
1464 (url "https://github.com/josuttis/jthread")
1465 (commit commit)))
1466 (file-name (git-file-name name version))
1467 (sha256
1468 (base32 "11cq4zh7pv86c62ah5im00gxr4cw6d396dp9117z8s271j4lrp6f"))
1469 (snippet
1470 ;; NOTE: remove precompiled PDFs.
1471 #~(begin
1472 (use-modules (guix build utils))
1473 (for-each (lambda (file)
1474 (delete-file file))
1475 (find-files "." ".pdf"))
1476 (delete-file-recursively "doc")))))
1477 (outputs '("out" "doc"))
1478 (build-system cmake-build-system)
1479 (arguments
1480 (list
1481 #:phases
1482 #~(modify-phases %standard-phases
1483 (delete 'configure)
1484 (delete 'build)
1485 (add-after 'unpack 'cd-and-generate-makefile
1486 (lambda _
1487 (call-with-output-file "source/Makefile.h"
1488 (lambda (port)
1489 ;; GCC 2.95 fails to deal with anonymous unions in glibc's
1490 ;; 'struct_rusage.h', so skip that.
1491 (display "CXX17 := c++ -std=c++17 -pthread\n" port)))))
1492 (replace 'check
1493 (lambda* (#:key tests? #:allow-other-keys)
1494 (when tests?
1495 (invoke "make" "-C" "source"))))
1496 (add-after 'check 'build-docs
1497 (lambda _
1498 (with-directory-excursion "tex"
1499 ;; NOTE: remove strict versioning.
1500 (substitute* "styles.tex"
1501 (("lst@CheckVersion\\{1.6\\}")
1502 "lst@CheckVersion{1.10c}"))
1503 (invoke "pdflatex" "std")
1504 (invoke "pdflatex" "std")))) ;Rerun to update references.
1505 (replace 'install
1506 (lambda _
1507 (for-each (lambda (file)
1508 (install-file file
1509 (string-append #$output "/include")))
1510 '("source/condition_variable_any2.hpp"
1511 "source/stop_token.hpp" "source/jthread.hpp"))))
1512 (add-after 'install 'install-doc
1513 (lambda _
1514 (let ((out (string-append #$output:doc "/share/doc/")))
1515 (mkdir-p out)
1516 (copy-file "tex/std.pdf"
1517 (string-append out
1518 #$name "-"
1519 #$version ".pdf"))))))))
1520 (native-inputs
1521 (list perl
1522 (texlive-local-tree
1523 (list texlive-booktabs
1524 texlive-caption
1525 texlive-enumitem
1526 texlive-etoolbox
1527 texlive-extract
1528 texlive-isodate
1529 texlive-jknapltx
1530 texlive-listings
1531 texlive-memoir
1532 texlive-microtype
1533 texlive-relsize
1534 texlive-rsfs
1535 texlive-substr
1536 texlive-ulem
1537 texlive-underscore
1538 texlive-xcolor
1539 texlive-xkeyval
1540 texlive-xpatch))))
1541 (home-page "https://github.com/josuttis/jthread")
1542 (synopsis "C++ class for a joining and cooperative interruptible thread")
1543 (description
1544 "This package provides a reference implementation of @code{std::jthread},
1545a cooperatively interruptible thread that is joined upon destruction.")
1546 (license license:cc-by4.0))))
1547
1548(define-public toml11
1549 (package
1550 (name "toml11")
1551 (version "3.7.1")
1552 (source
1553 (origin
1554 (method git-fetch)
1555 (uri (git-reference
1556 (url "https://github.com/ToruNiina/toml11")
1557 (commit (string-append "v" version))))
1558 (file-name (git-file-name name version))
1559 (sha256
1560 (base32 "090i2qg88iknldxd6v2mh3jfvkdkwc5m38czhrbm58r3y835fy0y"))))
1561 (build-system cmake-build-system)
1562 (arguments (list #:tests? #f))
1563 (home-page "https://github.com/ToruNiina/toml11")
1564 (synopsis "TOML for modern C++")
1565 (description
1566 "@code{toml11} is a C++11 (or later) header-only toml parser/encoder
1567depending only on C++ standard library.
1568
1569@itemize
1570@item It is compatible to the latest version of TOML v1.0.0.
1571@item It is one of the most TOML standard compliant libraries, tested with
1572a language agnostic test suite for TOML parsers.
1573@item It shows highly informative error messages.
1574@item It has configurable container. You can use any random-access containers
1575and key-value maps as backend containers.
1576@item It optionally preserves comments without any overhead.
1577@item It has configurable serializer that supports comments, inline tables,
1578literal strings and multiline strings.
1579@item It supports user-defined type conversion from/into toml values.
1580@item It correctly handles UTF-8 sequences, with or without BOM.
1581@end itemize")
1582 (license license:expat)))
1583
1584(define-public tomlplusplus
1585 (package
1586 (name "tomlplusplus")
1587 (version "3.4.0")
1588 (source (origin
1589 (method git-fetch)
1590 (uri (git-reference
1591 (url "https://github.com/marzer/tomlplusplus")
1592 (commit (string-append "v" version))))
1593 (file-name (git-file-name name version))
1594 (sha256
1595 (base32
1596 "1hvbifzcc97r9jwjzpnq31ynqnj5y93cjz4frmgddnkg8hxmp6w7"))))
1597 (build-system meson-build-system)
1598 (arguments
1599 (list #:configure-flags
1600 #~(list "-Dbuild_tests=true")
1601 #:phases
1602 #~(modify-phases %standard-phases
1603 (add-after 'unpack 'set-test-locales
1604 (lambda _
1605 (substitute* "tests/meson.build"
1606 (("foreach locale : test_locales" all)
1607 (format #f "test_locales = [~{'~a.utf8', ~}]~%~a"
1608 ;; %default-utf8-locales in (gnu packages base).
1609 '("C" "de_DE" "el_GR" "en_US" "fr_FR" "tr_TR")
1610 all))))))))
1611 ;; Tests require locales.
1612 (native-inputs (list cmake-minimal (libc-utf8-locales-for-target)))
1613 (home-page "https://marzer.github.io/tomlplusplus/")
1614 (synopsis "Header-only TOML config file parser and serializer for C++17")
1615 (description
1616 "This package provides header-only TOML config file parser and serializer
1617for C++17.")
1618 (license license:expat)))
1619
1620(define-public xtl
1621 (package
1622 (name "xtl")
1623 (version "0.7.7")
1624 (source
1625 (origin
1626 (method git-fetch)
1627 (uri (git-reference
1628 (url "https://github.com/xtensor-stack/xtl")
1629 (commit version)))
1630 (sha256
1631 (base32 "1b42mjxchinsf2ylbvhyypfysg5sfphxqby53vlg82wvr23rijkz"))
1632 (file-name (git-file-name name version))))
1633 (build-system cmake-build-system)
1634 (arguments
1635 (list
1636 #:configure-flags #~(list "-DBUILD_TESTS=ON")))
1637 (native-inputs
1638 (list doctest
1639 googletest
1640 nlohmann-json))
1641 (home-page "https://github.com/xtensor-stack/xtl")
1642 (synopsis "C++ template library providing some basic tools")
1643 (description "xtl is a C++ header-only template library providing basic
1644tools (containers, algorithms) used by other QuantStack packages.")
1645 (license license:bsd-3)))
1646
1647(define-public ccls
1648 (package
1649 (name "ccls")
1650 (version "0.20250815.1")
1651 (source
1652 (origin
1653 (method git-fetch)
1654 (uri (git-reference
1655 (url "https://github.com/MaskRay/ccls")
1656 (commit version)))
1657 (sha256
1658 (base32 "1jl4jv1z8vxjfmkv2mvii68aqqx2nrcbd6bhzjs5dd65r23bqs6x"))
1659 (file-name (git-file-name name version))))
1660 (build-system cmake-build-system)
1661 (arguments
1662 '(#:tests? #f)) ; no check target
1663 (inputs
1664 (list rapidjson))
1665 (native-inputs
1666 (list clang llvm))
1667 (home-page "https://github.com/MaskRay/ccls")
1668 (synopsis "C/C++/Objective-C language server")
1669 (description
1670 "@code{ccls} is a server implementing the Language Server Protocol (LSP)
1671for C, C++ and Objective-C languages. It uses @code{clang} to perform static
1672code analysis and supports cross references, hierarchies, completion and
1673syntax highlighting. @code{ccls} is derived from @code{cquery} which is not
1674maintained anymore.")
1675 (license license:asl2.0)))
1676
1677(define-public concurrentqueue
1678 (package
1679 (name "concurrentqueue")
1680 (version "1.0.3")
1681 (source
1682 (origin
1683 (method git-fetch)
1684 (uri (git-reference
1685 (url "https://github.com/cameron314/concurrentqueue/")
1686 (commit "3747268264d0fa113e981658a99ceeae4dad05b7")))
1687 (file-name (git-file-name name version))
1688 (sha256
1689 (base32 "1n5v7n27llzg7khg1jvi35jrcf9v6adw8gaic9ndxn65dp723ssy"))))
1690 (build-system cmake-build-system)
1691 (arguments '(#:tests? #false)) ;no check target
1692 (home-page "https://github.com/cameron314/concurrentqueue/")
1693 (synopsis "Multi-producer, multi-consumer lock-free concurrent queue for C++11")
1694 (description
1695 "This package provides a fast multi-producer, multi-consumer lock-free
1696concurrent queue for C++11.")
1697 (license license:bsd-2)))
1698
1699(define-public spscqueue
1700 (package
1701 (name "spscqueue")
1702 (version "1.1")
1703 (source
1704 (origin
1705 (method git-fetch)
1706 (uri (git-reference
1707 (url "https://github.com/rigtorp/SPSCQueue/")
1708 (commit (string-append "v" version))))
1709 (file-name (git-file-name name version))
1710 (sha256
1711 (base32 "1428cj9x318afvnvnkhg0711iy4czqn86fi7ysgfhw91asa316rc"))))
1712 (build-system cmake-build-system)
1713 (home-page "https://github.com/rigtorp/SPSCQueue/")
1714 (synopsis "Single producer single consumer queue written in C++11")
1715 (description
1716 "This package provides a single producer single consumer wait-free and
1717lock-free fixed size queue written in C++11.")
1718 (license license:expat)))
1719
1720(define-public syscmdline
1721 (package
1722 (name "syscmdline")
1723 (version "0.0.1.4")
1724 (source (origin
1725 (method git-fetch)
1726 (uri (git-reference
1727 (url "https://github.com/SineStriker/syscmdline")
1728 (commit version)))
1729 (file-name (git-file-name name version))
1730 (sha256
1731 (base32
1732 "00n9vkyymp1dzixxl93f6pkpd3ndsk1vib7shhlxv4zvy5hjqhqw"))))
1733 (build-system cmake-build-system)
1734 (arguments
1735 (list #:configure-flags
1736 #~(list "-DSYSCMDLINE_BUILD_STATIC=OFF" ;build a shared library
1737 "-DSYSCMDLINE_BUILD_TESTS=ON")
1738 #:phases #~(modify-phases %standard-phases
1739 (replace 'check
1740 ;; There isn't currently any exposed test target.
1741 (lambda* (#:key tests? #:allow-other-keys)
1742 (when tests?
1743 (invoke "bin/tst_basic")))))))
1744 (home-page "https://github.com/SineStriker/syscmdline")
1745 (synopsis "C++ advanced command line parser")
1746 (description "SysCmdLine is a C++ command line parser that is inspired by
1747@code{QCommandLineParser} from Qt and @code{System.CommandLine} from C#. It
1748has features such as:
1749@itemize
1750@item Support sub-commands
1751@item Support case-insensitive parsing
1752@item Support global options
1753@item Support mutually exclusive options
1754@item Support short options and group flags
1755@item Support help text customization
1756@item Support localization
1757@item Simple tips for typo correction
1758@item Highly configurable
1759@item Friendly interface
1760@end itemize")
1761 (license license:expat)))
1762
1763(define-public gperftools
1764 (package
1765 (name "gperftools")
1766 (version "2.11")
1767 (source
1768 (origin
1769 (method git-fetch)
1770 (uri (git-reference
1771 (url "https://github.com/gperftools/gperftools")
1772 (commit (string-append "gperftools-" version))))
1773 (sha256
1774 (base32 "1mwsa4y696m8zjya0k7xzr9vsgb24dq4aq13m21hb5ygy7nh47id"))
1775 (file-name (git-file-name name version))))
1776 (build-system gnu-build-system)
1777 (arguments
1778 ;; The tests are flaky when run in parallel. For more info:
1779 ;; https://bugs.gnu.org/46562
1780 `(#:parallel-tests? #f
1781 ,@(if (target-riscv64?)
1782 `(#:make-flags (list "LDFLAGS=-latomic"))
1783 '())))
1784 (native-inputs
1785 (list autoconf automake libtool
1786 ;; For tests.
1787 perl))
1788 (home-page "https://github.com/gperftools/gperftools")
1789 (synopsis "Multi-threaded malloc() and performance analysis tools for C++")
1790 (description
1791 "@code{gperftools} is a collection of a high-performance multi-threaded
1792malloc() implementation plus some thread-friendly performance analysis
1793tools:
1794
1795@itemize
1796@item tcmalloc,
1797@item heap profiler,
1798@item heap checker,
1799@item CPU checker.
1800@end itemize\n")
1801 (license license:bsd-3)))
1802
1803(define-public gperftools-for-friction
1804 (let ((commit "b97c293c812c7ec3cdeccd50a89769e746c01377")
1805 (revision "0")
1806 (base-version "0.9.6"))
1807 (package
1808 (inherit gperftools)
1809 (name "gperftools")
1810 (version (git-version base-version revision commit))
1811 (source
1812 (origin
1813 (method git-fetch)
1814 (uri (git-reference
1815 (url "https://github.com/friction2d/gperftools")
1816 (commit (string-append "friction-" base-version))))
1817 (sha256
1818 (base32 "1ffkzlsdpcjjq8md21kr7a1q10bia77xriga6far2608rplmwsk8"))
1819 (file-name (git-file-name name version)))))))
1820
1821(define-public cpp-httplib
1822 ;; this package is not graftable, as everything is implemented in a single
1823 ;; header
1824 (package
1825 (name "cpp-httplib")
1826 (version "0.20.0")
1827 (source
1828 (origin
1829 (method git-fetch)
1830 (uri (git-reference
1831 (url "https://github.com/yhirose/cpp-httplib")
1832 (commit (string-append "v" version))))
1833 (sha256
1834 (base32 "0w5klyfsaws793xb0cbkjxg7lwrdm6f3m4z4v7pzkwl957f9q70m"))
1835 (file-name (git-file-name name version))))
1836 (build-system cmake-build-system)
1837 (arguments
1838 `(#:parallel-tests? #f
1839 #:configure-flags
1840 '("-DBUILD_SHARED_LIBS=ON"
1841 "-DHTTPLIB_TEST=ON"
1842 "-DHTTPLIB_COMPILE=ON"
1843 "-DHTTPLIB_REQUIRE_BROTLI=ON"
1844 "-DHTTPLIB_REQUIRE_OPENSSL=ON"
1845 "-DHTTPLIB_REQUIRE_ZLIB=ON")
1846 #:make-flags
1847 '(,(string-append "CXX=" (cxx-for-target)))
1848 #:phases
1849 (modify-phases %standard-phases
1850 (add-after 'unpack 'disable-network-tests
1851 (lambda _
1852 (for-each
1853 (lambda (test)
1854 (substitute* "test/test.cc"
1855 (((string-append "\\(" test))
1856 (string-append "(DISABLED_" test))))
1857 ;; There are tests requiring network access, disable them
1858 '("AbsoluteRedirectTest" "BaseAuthTest" "CancelTest"
1859 "ConnectionErrorTest"
1860 "ChunkedEncodingTest" "ChunkedEncodingTest"
1861 "ClientDefaultHeadersTest"
1862 "DecodeWithChunkedEncoding" "DefaultHeadersTest"
1863 "DigestAuthTest" "HttpsToHttpRedirectTest"
1864 "HostnameToIPConversionTest"
1865 "RangeTest" "RedirectTest" "RelativeRedirectTest"
1866 "SSLClientTest" "SendAPI"
1867 "SpecifyServerIPAddressTest"
1868 "TooManyRedirectTest" "UrlWithSpace"
1869 "YahooRedirectTest" "YahooRedirectTest")))))))
1870 (native-inputs
1871 (list curl googletest python))
1872 (inputs
1873 (list brotli openssl zlib))
1874 (home-page "https://github.com/yhirose/cpp-httplib")
1875 (synopsis "C++ HTTP/HTTPS server and client library")
1876 (description "cpp-httplib is a C++11 single-file cross platform blocking
1877HTTP/HTTPS library, easy to setup. It can also be used as a single-header
1878library.")
1879 (license license:expat)))
1880
1881(define-public rapidfuzz-cpp
1882 (package
1883 (name "rapidfuzz-cpp")
1884 (version "3.3.3")
1885 (source
1886 (origin
1887 (method git-fetch)
1888 (uri (git-reference
1889 (url "https://github.com/rapidfuzz/rapidfuzz-cpp")
1890 (commit (string-append "v" version))))
1891 (file-name (git-file-name name version))
1892 (sha256
1893 (base32 "1ma2hpp4c53fwjb8yi7rpkgivhsw7bkd8agw3sw5zwdlwsks88xv"))))
1894 (build-system cmake-build-system)
1895 (arguments
1896 (list
1897 #:configure-flags #~(list "-DRAPIDFUZZ_BUILD_TESTING=ON")))
1898 (native-inputs (list catch2))
1899 (home-page "https://github.com/rapidfuzz/rapidfuzz-cpp")
1900 (synopsis "Rapid fuzzy string matching using the Levenshtein Distance")
1901 (description
1902 "RapidFuzz is a fast string matching library for Python and C++, which is
1903using the string similarity calculations from FuzzyWuzzy.")
1904 (license license:expat)))
1905
1906(define-public cpplint
1907 (package
1908 (name "cpplint")
1909 (version "2.0.0")
1910 (source
1911 (origin
1912 (method git-fetch)
1913 ;; Fetch from github instead of pypi, since the test cases are not in
1914 ;; the pypi archive.
1915 (uri (git-reference
1916 (url "https://github.com/cpplint/cpplint")
1917 (commit version)))
1918 (sha256
1919 (base32 "06km4wh4944az1hk61g5w8pjhbvbccpgarz1dy7vhwkhfvmvggnk"))
1920 (file-name (git-file-name name version))))
1921 (build-system pyproject-build-system)
1922 (arguments
1923 (list #:modules `((srfi srfi-1)
1924 (srfi srfi-26)
1925 ,@%pyproject-build-system-modules)
1926 #:phases
1927 #~(modify-phases (@ (guix build pyproject-build-system) %standard-phases)
1928 (add-after 'unpack 'patch-build-system
1929 (lambda _
1930 (substitute* "pyproject.toml"
1931 (("setuptools\\.build_meta:__legacy__")
1932 "setuptools.build_meta"))))
1933 (add-before 'wrap 'reduce-GUIX_PYTHONPATH
1934 (lambda _
1935 ;; Hide the transitive native inputs from GUIX_PYTHONPATH
1936 ;; to prevent them from ending up in the run-time closure.
1937 ;; See also <https://bugs.gnu.org/25235>.
1938 (let ((transitive-native-inputs
1939 '#$(match (package-transitive-native-inputs
1940 this-package)
1941 (((labels packages) ...) packages))))
1942 ;; Save the original PYTHONPATH because we need it for
1943 ;; tests later.
1944 (setenv "TMP_PYTHONPATH" (getenv "GUIX_PYTHONPATH"))
1945 (setenv "GUIX_PYTHONPATH"
1946 (string-join
1947 (filter (lambda (path)
1948 (not (any (cut string-prefix? <> path)
1949 transitive-native-inputs)))
1950 (search-path-as-string->list
1951 (getenv "GUIX_PYTHONPATH")))
1952 ":")))))
1953 (add-after 'wrap 'reset-GUIX_PYTHONPATH
1954 (lambda _
1955 (setenv "GUIX_PYTHONPATH"
1956 (getenv "TMP_PYTHONPATH")))))))
1957 (native-inputs
1958 (list python-coverage
1959 python-parameterized
1960 python-pytest
1961 python-pytest-cov
1962 python-pytest-runner
1963 python-pytest-timeout
1964 python-setuptools
1965 python-testfixtures
1966 python-wheel))
1967 (home-page "https://github.com/cpplint/cpplint")
1968 (synopsis "Static code checker for C++")
1969 (description "@code{cpplint} is a command-line tool to check C/C++ files
1970for style issues following Google’s C++ style guide. While Google maintains
1971its own version of the tool, this is a fork that aims to be more responsive
1972and make @code{cpplint} usable in wider contexts.")
1973 (license license:bsd-3)))
1974
1975(define-public reproc
1976 (package
1977 (name "reproc")
1978 (version "14.2.5")
1979 (source
1980 (origin
1981 (method git-fetch)
1982 (uri (git-reference
1983 (url "https://github.com/DaanDeMeyer/reproc")
1984 (commit (string-append "v" version))))
1985 (file-name (git-file-name name version))
1986 (sha256
1987 (base32 "07h11rzhvplgmd420v650h8abyvwcbws4w1xlq8x18nxbp4nnqn1"))))
1988 (build-system cmake-build-system)
1989 (arguments
1990 (list #:tests? #f ; No tests.
1991 #:configure-flags #~(list "-DBUILD_SHARED_LIBS=ON"
1992 "-DREPROC++=ON")))
1993 (native-inputs
1994 (list pkg-config))
1995 (synopsis "Process IO library")
1996 (description "reproc (Redirected Process) is a C/C++ library that
1997simplifies starting, stopping and communicating with external programs. The
1998main use case is executing command line applications directly from C or C++
1999code and retrieving their output.")
2000 (home-page "https://github.com/DaanDeMeyer/reproc")
2001 (license license:expat)))
2002
2003(define-public scn
2004 (package
2005 (name "scn")
2006 (version "4.0.1")
2007 (source (origin
2008 (method git-fetch)
2009 (uri (git-reference
2010 (url "https://github.com/eliaskosunen/scnlib")
2011 (commit (string-append "v" version))))
2012 (file-name (git-file-name name version))
2013 (patches (search-patches "scn-fast-float-compat.patch"))
2014 (sha256
2015 (base32 "0lnb9r004y75n4s4pd3k58cdcjpcylhdgr5phwja713g3dd40im8"))))
2016 (build-system cmake-build-system)
2017 (arguments
2018 (list #:configure-flags #~(list "-DSCN_USE_EXTERNAL_GTEST=yes"
2019 "-DSCN_USE_EXTERNAL_BENCHMARK=yes"
2020 "-DSCN_USE_EXTERNAL_FAST_FLOAT=yes"
2021 "-DBUILD_SHARED_LIBS=yes")))
2022 (propagated-inputs (list fast-float))
2023 (native-inputs (list googletest googlebenchmark))
2024 (home-page "https://scnlib.dev/")
2025 (synopsis "Type-safe text parsing library")
2026 (description "@code{scn} is a text parsing library for C++. It can
2027be used as a safe alternative to @code{scanf} or as a fast alternative to
2028@code{IOStreams}, analogous to @code{fmt}.")
2029 (license license:asl2.0)))
2030
2031(define-public sobjectizer
2032 (package
2033 (name "sobjectizer")
2034 (version "5.8.2")
2035 (source
2036 (origin
2037 (method git-fetch)
2038 (uri (git-reference
2039 (url "https://github.com/Stiffstream/sobjectizer")
2040 (commit (string-append "v." version))))
2041 (sha256
2042 (base32 "0ya5xlgm3arvzvcnsajw03kc3cibbdbap9p7kgpxn00byqbxixr7"))
2043 (file-name (git-file-name name version))))
2044 (build-system cmake-build-system)
2045 (arguments
2046 `(#:tests? #f
2047 #:phases
2048 (modify-phases %standard-phases
2049 (add-after 'unpack 'change-directory
2050 (lambda _
2051 (chdir "dev"))))))
2052 (home-page "https://stiffstream.com/en/products/sobjectizer.html")
2053 (synopsis "Cross-platform actor framework for C++")
2054 (description
2055 "SObjectizer is a cross-platform \"actor frameworks\" for C++.
2056SObjectizer supports not only the Actor Model but also the Publish-Subscribe
2057Model and CSP-like channels. The goal of SObjectizer is to simplify
2058development of concurrent and multithreaded applications in C++.")
2059 (license license:bsd-3)))
2060
2061(define-public taskflow
2062 (package
2063 (name "taskflow")
2064 (version "3.10.0")
2065 (source
2066 (origin
2067 (method git-fetch)
2068 (uri (git-reference
2069 (url "https://github.com/taskflow/taskflow")
2070 (commit (string-append "v" version))))
2071 (file-name (git-file-name name version))
2072 (sha256
2073 (base32 "08z7vif8lk4jri9m77j9gqyyv7nwza5qfgab0bk5gl9akb63qh5k"))))
2074 (build-system cmake-build-system)
2075 (home-page "https://taskflow.github.io/")
2076 (synopsis
2077 "General-purpose parallel and heterogeneous task programming system")
2078 (description
2079 "Taskflow is a C++ library for writing parallel and heterogeneous task
2080programs.")
2081 (license license:expat)))
2082
2083(define-public kokkos
2084 (package
2085 (name "kokkos")
2086 (version "4.6.02")
2087 (source
2088 (origin
2089 (method git-fetch)
2090 (uri (git-reference
2091 (url "https://github.com/kokkos/kokkos")
2092 (commit version)))
2093 (file-name (git-file-name name version))
2094 (sha256
2095 (base32 "0pfrxqjirm8qccb9k1krlw9fh0qlva62q6gyc6j7yz0zvdrdyi59"))
2096 (modules '((guix build utils)))
2097 (snippet
2098 ;; Remove bundled googletest.
2099 #~(delete-file-recursively "tpls/gtest"))))
2100 (build-system cmake-build-system)
2101 (arguments
2102 (list #:configure-flags
2103 ;; deal.II uses only the serial backend, so do not enable the
2104 ;; others yet.
2105 #~(list "-DBUILD_SHARED_LIBS=ON"
2106 "-DKokkos_ENABLE_SERIAL=ON"
2107 "-DKokkos_ENABLE_TESTS=ON"
2108 "-DKokkos_ENABLE_EXAMPLES=ON"
2109 "-DKokkos_ENABLE_HWLOC=ON"
2110 "-DKokkos_ENABLE_MEMKIND=ON")
2111 #:phases
2112 #~(modify-phases %standard-phases
2113 (add-after 'install-license-files 'remove-cruft
2114 (lambda _
2115 (delete-file
2116 (string-append #$output "/share/doc/"
2117 #$name "-" #$version
2118 "/LICENSE_FILE_HEADER")))))))
2119 (native-inputs
2120 (list googletest python))
2121 (inputs
2122 (list `(,hwloc "lib") memkind))
2123 (home-page "https://github.com/kokkos/kokkos")
2124 (synopsis "C++ abstractions for parallel execution and data management")
2125 (description
2126 "Kokkos Core implements a programming model in C++ for writing performance
2127portable applications targeting all major HPC platforms. For that purpose it
2128provides abstractions for both parallel execution of code and data management.
2129Kokkos is designed to target complex node architectures with N-level memory
2130hierarchies and multiple types of execution resources.")
2131
2132 ;; Code exhibits integer size mismatches when compiled on 32-bit systems.
2133 (supported-systems %64bit-supported-systems)
2134
2135 ;; This code can benefit from SIMD optimizations; tuning gives an effect
2136 ;; equivalent to setting the 'KOKKOS_ARCH_NATIVE' CMake flag, except for
2137 ;; the configuration metadata recorded in 'Kokkos_Core.cpp'.
2138 (properties '((tunable? . #t)))
2139
2140 (license license:asl2.0))) ; With LLVM exception
2141
2142(define-public kokkos-kernels
2143 (package
2144 (name "kokkos-kernels")
2145 ;; Synchronize with Kokkos version.
2146 (version (package-version kokkos))
2147 (source
2148 (origin
2149 (method git-fetch)
2150 (uri (git-reference
2151 (url "https://github.com/kokkos/kokkos-kernels")
2152 (commit version)))
2153 (file-name (git-file-name name version))
2154 (sha256
2155 ;; Version 4.6.02.
2156 (base32 "05g4dp1359rsx0y2wrg2yv4zx3aq5anxr8jgb2c5f1ay3nq3639s"))))
2157 (build-system cmake-build-system)
2158 (arguments
2159 (list #:tests? #f
2160 #:configure-flags
2161 #~(list "-DBUILD_SHARED_LIBS=ON")))
2162 (inputs
2163 (list kokkos
2164 openblas))
2165 (properties '((tunable? . #t)))
2166 (home-page "https://kokkos.org")
2167 (synopsis
2168 "Math kernels for Kokkos")
2169 (description "KokkosKernels implements local computational kernels for
2170linear algebra and graph operations, using the Kokkos shared-memory parallel
2171programming model. \"Local\" means not using MPI, or running within a
2172single MPI process without knowing about MPI.")
2173 (license license:asl2.0))) ;with LLVM exception
2174
2175(define-public kokkos-fft
2176 (package
2177 (name "kokkos-fft")
2178 (version "0.3.0")
2179 (source
2180 (origin
2181 (method git-fetch)
2182 (uri (git-reference
2183 (url "https://github.com/kokkos/kokkos-fft")
2184 (commit (string-append "v" version))))
2185 (file-name (git-file-name name version))
2186 (sha256 (base32 "0skajkzkrmlsfzrzkvspzqf6z9wqvs529cmknzhk4mhn917pykh6"))))
2187 (build-system cmake-build-system)
2188 (arguments
2189 (list #:configure-flags
2190 #~(list "-DKokkosFFT_DEPENDENCY_POLICIES=INSTALLED"
2191 "-DKokkosFFT_ENABLE_TESTS=ON")))
2192 (inputs
2193 (list kokkos
2194 fftw
2195 fftwf))
2196 (native-inputs
2197 (list googletest))
2198 (home-page "https://kokkosfft.readthedocs.io/")
2199 (synopsis "Shared-memory FFT for the Kokkos ecosystem")
2200 (description "Kokkos-fft is an experimental FFT interface for the
2201Kokkos C++ environment. It implements local interfaces between Kokkos
2202and FFT libraries such as FFTW, cufft, hipfft (rocfft), and oneMKL.
2203\"Local\" means not using MPI, or running within a single MPI process
2204without knowing about MPI.")
2205 ;; dual licensed, asl2.0 with LLVM exception
2206 (license (list license:expat license:asl2.0))))
2207
2208(define-public tweeny
2209 (package
2210 (name "tweeny")
2211 (version "3")
2212 (source
2213 (origin
2214 (method git-fetch)
2215 (uri (git-reference
2216 (url "https://github.com/mobius3/tweeny")
2217 (commit (string-append "v" version))))
2218 (file-name (git-file-name name version))
2219 (sha256
2220 (base32 "1adm4c17pi7xf3kf6sjyxibz5rdg1ka236p72xsm6js4j9gzlbp4"))))
2221 (arguments
2222 '(#:tests? #f)) ;no check target
2223 (build-system cmake-build-system)
2224 (home-page "https://mobius3.github.io/tweeny/")
2225 (synopsis "Modern C++ tweening library")
2226 (description "@code{Tweeny} is an inbetweening library designed for the
2227creation of complex animations for games and other beautiful interactive
2228software. It leverages features of modern @code{C++} to empower developers with
2229an intuitive API for declaring tweenings of any type of value, as long as they
2230support arithmetic operations. The goal of @code{Tweeny} is to provide means to
2231create fluid interpolations when animating position, scale, rotation, frames or
2232other values of screen objects, by setting their values as the tween starting
2233point and then, after each tween step, plugging back the result.")
2234 (license license:expat)))
2235
2236(define-public abseil-cpp-20220623
2237 (package
2238 (name "abseil-cpp")
2239 (version "20220623.2")
2240 (source (origin
2241 (method git-fetch)
2242 (uri (git-reference
2243 (url "https://github.com/abseil/abseil-cpp")
2244 (commit version)))
2245 (file-name (git-file-name name version))
2246 (sha256
2247 (base32
2248 "1cmchfcqp85yp5hc3i47xv3i14v0f2wd5h2jblvcjjmjyhji1bwr"))
2249 (patches
2250 (search-patches "abseil-cpp-20220623.1-no-kepsilon-i686.patch"))))
2251 (build-system cmake-build-system)
2252 (arguments
2253 (list
2254 #:configure-flags
2255 ;; The following convoluted expression has been crafted to avoid
2256 ;; changing the derivation when removing inheritance from
2257 ;; abseil-cpp-20200923.3.
2258 #~(cons*
2259 "-DABSL_BUILD_TESTING=ON"
2260 (delete
2261 "-DABSL_RUN_TESTS=ON"
2262 (list "-DBUILD_SHARED_LIBS=ON"
2263 "-DABSL_RUN_TESTS=ON"
2264 "-DABSL_USE_EXTERNAL_GOOGLETEST=ON"
2265 ;; Needed, else we get errors like:
2266 ;; ld: CMakeFiles/absl_periodic_sampler_test.dir/internal/periodic_sampler_test.cc.o:
2267 ;; undefined reference to symbol '_ZN7testing4Mock16UnregisterLockedEPNS_8internal25UntypedFunctionMockerBaseE'
2268 ;; ld: /gnu/store/...-googletest-1.10.0/lib/libgmock.so:
2269 ;; error adding symbols: DSO missing from command line
2270 ;; collect2: error: ld returned 1 exit status
2271 "-DCMAKE_EXE_LINKER_FLAGS=-lgtest -lpthread -lgmock")))
2272 #:phases
2273 #~(modify-phases %standard-phases
2274 (add-after 'unpack 'fix-max
2275 (lambda _
2276 (substitute* "absl/debugging/failure_signal_handler.cc"
2277 (("std::max\\(SIGSTKSZ, 65536\\)")
2278 "std::max<size_t>(SIGSTKSZ, 65536)"))))
2279 (add-before 'configure 'remove-gtest-check
2280 ;; The CMakeLists fails to find our googletest for some reason, but
2281 ;; it works nonetheless.
2282 (lambda _
2283 (substitute* "CMakeLists.txt"
2284 (("check_target\\(gtest\\)") "")
2285 (("check_target\\(gtest_main\\)") "")
2286 (("check_target\\(gmock\\)") "")))))))
2287 (native-inputs
2288 (list googletest-1.12))
2289 (home-page "https://abseil.io")
2290 (synopsis "Augmented C++ standard library")
2291 (description "Abseil is a collection of C++ library code designed to
2292augment the C++ standard library. The Abseil library code is collected from
2293Google's C++ code base.")
2294 (license license:asl2.0)))
2295
2296(define-public abseil-cpp
2297 (let ((base abseil-cpp-20220623))
2298 (package
2299 (inherit base)
2300 (name "abseil-cpp")
2301 (version "20250814.1")
2302 (source (origin
2303 (method git-fetch)
2304 (uri (git-reference
2305 (url "https://github.com/abseil/abseil-cpp")
2306 (commit version)))
2307 (file-name (git-file-name name version))
2308 (sha256
2309 (base32
2310 "1wm2271hwy2pnfv9b5iy0y9xvbhiwffdf9i6s3dn89k630wh6928"))
2311 (patches
2312 (search-patches "abseil-cpp-20220623.1-no-kepsilon-i686.patch"))))
2313 (arguments
2314 (substitute-keyword-arguments (package-arguments base)
2315 ((#:configure-flags flags #~'())
2316 (if (target-riscv64?)
2317 #~(cons* "-DCMAKE_SHARED_LINKER_FLAGS=-latomic"
2318 #$flags)
2319 flags))
2320 ((#:phases phases)
2321 #~(modify-phases #$phases
2322 (add-before 'check 'set-env-vars
2323 (lambda* (#:key inputs #:allow-other-keys)
2324 ;; absl_time_test requires this environment variable.
2325 (setenv "TZDIR" (string-append #$(package-source this-package)
2326 "/absl/time/internal/cctz/testdata/zoneinfo"))))
2327 #$@(if (target-riscv64?)
2328 #~((replace 'check
2329 (lambda* (#:key tests? #:allow-other-keys)
2330 (when tests?
2331 (setenv "CTEST_OUTPUT_ON_FAILURE" "1")
2332 (invoke "ctest" "-E"
2333 "absl_symbolize_test|absl_log_format_test")))))
2334 #~())))))
2335 (native-inputs
2336 (modify-inputs (package-native-inputs base)
2337 (replace "googletest" googletest))))))
2338
2339(define-public abseil-cpp-20250127
2340 (let ((base abseil-cpp))
2341 (package
2342 (inherit base)
2343 (name "abseil-cpp")
2344 (version "20250127.1")
2345 (source (origin
2346 (method git-fetch)
2347 (uri (git-reference
2348 (url "https://github.com/abseil/abseil-cpp")
2349 (commit version)))
2350 (file-name (git-file-name name version))
2351 (sha256
2352 (base32
2353 "0r2j360csym12jlgmcy92rgwdmng63shchxvfmln3j5402lv0g21"))
2354 (patches
2355 (search-patches "abseil-cpp-20220623.1-no-kepsilon-i686.patch")))))))
2356
2357(define (abseil-cpp-for-c++-standard base version)
2358 (hidden-package
2359 (package/inherit base
2360 (arguments
2361 (substitute-keyword-arguments (package-arguments base)
2362 ((#:configure-flags flags)
2363 #~(cons* #$(string-append "-DCMAKE_CXX_STANDARD="
2364 (number->string version))
2365 #$flags)))))))
2366
2367(define (make-static-abseil-cpp version)
2368 (let ((base abseil-cpp))
2369 (hidden-package
2370 (package/inherit base
2371 (arguments
2372 (substitute-keyword-arguments (package-arguments base)
2373 ((#:configure-flags flags)
2374 #~(cons* "-DCMAKE_POSITION_INDEPENDENT_CODE=ON"
2375 (delete "-DBUILD_SHARED_LIBS=ON" #$flags)))))))))
2376
2377(define-public abseil-cpp-cxxstd17
2378 (abseil-cpp-for-c++-standard abseil-cpp 17)) ;XXX: the default with GCC 11?
2379
2380(define-public abseil-cpp-cxxstd11
2381 (abseil-cpp-for-c++-standard abseil-cpp-20220623 11)) ;last version on C++11
2382
2383(define-public static-abseil-cpp
2384 (make-static-abseil-cpp abseil-cpp))
2385
2386(define-public miniaudio
2387 (package
2388 (name "miniaudio")
2389 (version "0.11.22")
2390 (source
2391 (origin
2392 (method git-fetch)
2393 (uri (git-reference
2394 (url "https://github.com/mackron/miniaudio")
2395 (commit version)))
2396 (file-name (git-file-name name version))
2397 (sha256
2398 (base32 "1pjaiq71x24n9983vkhjxrsbraa24053h727db22b1rb2xyfrzm3"))))
2399 (build-system gnu-build-system)
2400 (arguments
2401 (list
2402 #:phases
2403 #~(modify-phases %standard-phases
2404 (delete 'build)
2405 (delete 'configure)
2406 (replace 'check
2407 (lambda* (#:key tests? #:allow-other-keys)
2408 (when tests?
2409 (with-directory-excursion "tests/_build"
2410 (let ((tests '("conversion" "filtering" "generation")))
2411 (mkdir "bin")
2412 ;; Compile tests
2413 (for-each (lambda (test)
2414 (invoke "gcc"
2415 (string-append "../" test "/" test
2416 ".c")
2417 "-o"
2418 (string-append "bin/" test)
2419 "-ldl"
2420 "-lm"
2421 "-lpthread"
2422 "-Wall"
2423 "-Wextra"
2424 "-Wpedantic")
2425 (let ((bin (string-append "./bin/" test)))
2426 (if (string= test "filtering")
2427 ;; NOTE: the 'filtering' test
2428 ;; requires an input file.
2429 (invoke bin bin)
2430 (invoke bin))))
2431 tests))))))
2432 (replace 'install
2433 (lambda _
2434 (install-file "miniaudio.h"
2435 (string-append #$output "/include"))
2436 (copy-recursively "extras"
2437 (string-append #$output
2438 "/include/extras/")))))))
2439 (home-page "https://miniaud.io")
2440 (synopsis "Audio playback and capture library for C and C++")
2441 (description
2442 "Miniaudio is an audio playback and capture library for C and C++. It is
2443made up of a single source file and has no external dependencies.")
2444 (license license:expat)))
2445
2446(define-public pegtl
2447 (package
2448 (name "pegtl")
2449 (version "3.2.7")
2450 (source (origin
2451 (method git-fetch)
2452 (uri (git-reference
2453 (url "https://github.com/taocpp/PEGTL")
2454 (commit version)))
2455 (file-name (git-file-name name version))
2456 (sha256
2457 (base32
2458 "01adjqqdr9yf4h379jl1x0526kvixfpqk4hdk9mna49qc4s5hpi1"))))
2459 (build-system cmake-build-system)
2460 (home-page "https://github.com/taocpp/PEGTL")
2461 (synopsis "Parsing Expression Grammar template library")
2462 (description "The Parsing Expression Grammar Template Library (PEGTL) is
2463a zero-dependency C++ header-only parser combinator library for creating
2464parsers according to a Parsing Expression Grammar (PEG).")
2465 (license license:expat)))
2466
2467(define-public lexy
2468 (package
2469 (name "lexy")
2470 (version "2025.05.0")
2471 (source
2472 (origin
2473 (method git-fetch)
2474 (uri (git-reference
2475 (url "https://github.com/foonathan/lexy")
2476 (commit (string-append "v" version))))
2477 (file-name (git-file-name name version))
2478 (sha256
2479 (base32 "14j2z7x2l65q95j5br5nw7awgd87p9m2xw7mma4qspiricd0rniq"))))
2480 (build-system cmake-build-system)
2481 (arguments
2482 (list #:configure-flags #~(list "-DLEXY_BUILD_DOCS=OFF") ; needs Hugo
2483 #:phases
2484 #~(modify-phases %standard-phases
2485 (add-after 'unpack 'fix-dependencies
2486 (lambda _
2487 (substitute* "tests/CMakeLists.txt"
2488 (("^message\\(STATUS \"Fetching doctest\"\\).*") "")
2489 (("^include\\(FetchContent\\).*") "")
2490 (("^FetchContent_Declare\\(doctest .*") "")
2491 (("^FetchContent_MakeAvailable\\(doctest\\)")
2492 "find_package(doctest REQUIRED)")
2493 (("^(target_link_libraries\\(lexy_test_base .*) doctest\\)"
2494 _ prefix)
2495 (string-append prefix ")"))))))))
2496 (native-inputs (list doctest))
2497 (home-page "https://lexy.foonathan.net/")
2498 (synopsis "C++ parser combinator library")
2499 (description "lexy is a parser combinator library for C++17 and later.")
2500 (license license:boost1.0)))
2501
2502(define-public psascan
2503 (package
2504 (name "psascan")
2505 (version "0.1.0")
2506 (source (origin
2507 (method url-fetch)
2508 (uri (string-append "https://www.cs.helsinki.fi/group"
2509 "/pads/software/pSAscan"
2510 "/pSAscan-" version ".tar.bz2"))
2511 (sha256
2512 (base32
2513 "1cphk4gf202nzkxz6jdjzls4zy27055gwpm0r8cn99gr6c8548cy"))
2514 (modules '((guix build utils)))
2515 (snippet '(begin (substitute* '("src/Makefile"
2516 "tools/delete-bytes-255/Makefile")
2517 (("-march=native") ""))))))
2518 (build-system gnu-build-system)
2519 (arguments
2520 (list
2521 #:tests? #false ;there are none
2522 #:phases
2523 #~(modify-phases %standard-phases
2524 (add-after 'unpack 'chdir (lambda _ (chdir "src")))
2525 (delete 'configure)
2526 (replace 'install
2527 (lambda _
2528 (install-file "psascan"
2529 (string-append #$output "/bin")))))))
2530 (inputs (list libdivsufsort))
2531 (properties '((tunable? . #t)))
2532 (home-page "https://www.cs.helsinki.fi/group/pads/pSAscan.html")
2533 (synopsis "Parallel external memory suffix array construction")
2534 (description "This package contains an implementation of the parallel
2535external-memory suffix array construction algorithm called pSAscan. The
2536algorithm is based on the sequential external-memory suffix array construction
2537algorithm called SAscan.")
2538 ;; Code exhibits integer size mismatches when compiled on 32-bit systems.
2539 (supported-systems %64bit-supported-systems)
2540 (license license:expat)))
2541
2542(define-public cxxopts
2543 (package
2544 (name "cxxopts")
2545 (version "3.2.1")
2546 (source (origin
2547 (method git-fetch)
2548 (uri (git-reference
2549 (url "https://github.com/jarro2783/cxxopts")
2550 (commit (string-append "v" version))))
2551 (file-name (git-file-name name version))
2552 (sha256
2553 (base32
2554 "0cvpgp4p4nfwnivv0399hnm311xlrkwx0n5jnrw8aj7v1jipgqb8"))))
2555 (build-system cmake-build-system)
2556 (synopsis "Lightweight C++ command line option parser")
2557 (description
2558 "A lightweight header-only C++ option parser library, supporting the
2559standard GNU style syntax for options.")
2560 (home-page "https://github.com/jarro2783/cxxopts/wiki")
2561 (license license:expat)))
2562
2563(define-public folly
2564 (package
2565 (name "folly")
2566 (version "2025.11.10.00")
2567 (source (origin
2568 (method git-fetch)
2569 (uri (git-reference
2570 (url "https://github.com/facebook/folly")
2571 (commit (string-append "v" version))))
2572 (file-name (git-file-name name version))
2573 (sha256
2574 (base32
2575 "11gdrc2jhb9dzjgpq6h3p5453f8gyvv4ngsnrqi4rylfil8a3b3i"))))
2576 (build-system cmake-build-system)
2577 (arguments
2578 (list
2579 ;; Tests must be explicitly enabled
2580 ;;#:configure-flags #~(list "-DBUILD_TESTS=ON")
2581 ;; Leave tests disabled; see https://github.com/facebook/folly/issues/2246
2582 #:tests? #f))
2583 (propagated-inputs
2584 (list boost gflags glog liburing))
2585 (inputs
2586 (list bzip2
2587 double-conversion
2588 fast-float
2589 fmt
2590 libaio
2591 libevent
2592 libiberty
2593 libsodium
2594 libunwind
2595 lz4
2596 openssl
2597 snappy
2598 zlib
2599 `(,zstd "lib")))
2600 (native-inputs
2601 (list googletest))
2602 (synopsis "Collection of C++ components complementing the standard library")
2603 (description
2604 "Folly (acronymed loosely after Facebook Open Source Library) is a library
2605of C++14 components that complements @code{std} and Boost.")
2606 (home-page "https://github.com/facebook/folly/wiki")
2607 ;; 32-bit is not supported: https://github.com/facebook/folly/issues/103
2608 (supported-systems '("aarch64-linux" "x86_64-linux"))
2609 (license license:asl2.0)))
2610
2611(define-public poco
2612 (package
2613 (name "poco")
2614 (version "1.13.3")
2615 (source (origin
2616 (method git-fetch)
2617 (uri (git-reference
2618 (url "https://github.com/pocoproject/poco")
2619 (commit (string-append "poco-" version "-release"))))
2620 (file-name (git-file-name name version))
2621 (sha256
2622 (base32
2623 "1b8w3s6j020r356s6j6ijpnvzjdby4qwwndhzhfjc3rm727m085g"))))
2624 (build-system cmake-build-system)
2625 (arguments
2626 (list
2627 #:configure-flags #~(list "-DENABLE_TESTS=ON" "-DENABLE_CRYPTO=ON"
2628 "-DENABLE_NETSSL=ON")
2629 #:phases
2630 #~(modify-phases %standard-phases
2631 (add-after 'unpack 'disable-problematic-tests
2632 (lambda _
2633 (substitute* (list "Foundation/CMakeLists.txt" ; XXX: fails.
2634 ;; Require network access.
2635 "Net/CMakeLists.txt"
2636 "MongoDB/CMakeLists.txt"
2637 "Redis/CMakeLists.txt"
2638 ;; Requires network access and uses certificates
2639 ;; that will expire.
2640 "NetSSL_OpenSSL/CMakeLists.txt")
2641 (("ENABLE_TESTS") "FALSE")))))))
2642 (inputs (list openssl))
2643 (home-page "https://pocoproject.org/")
2644 (synopsis "Portable C++ components")
2645 (description "This package provides a collection of C++ libraries intended
2646to be useful for building network-based applications.")
2647 (license license:boost1.0)))
2648
2649(define-public aws-crt-cpp
2650 (package
2651 (name "aws-crt-cpp")
2652 ;; Update only when updating aws-sdk-cpp, and when updating also update
2653 ;; versions of library dependencies linked from from
2654 ;; https://github.com/awslabs/aws-crt-cpp/tree/{aws-crt-cpp commit}/crt
2655 (version "0.32.3")
2656 (source (origin
2657 (method git-fetch)
2658 (uri (git-reference
2659 (url "https://github.com/awslabs/aws-crt-cpp")
2660 (commit (string-append "v" version))))
2661 (file-name (git-file-name name version))
2662 (sha256
2663 (base32
2664 "0hl62qngg3qcm4dykv89bm2sn5wn8p1ik0vb79d7djq3r1bblzks"))))
2665 (build-system cmake-build-system)
2666 (arguments
2667 '(#:configure-flags
2668 (list "-DBUILD_DEPS=OFF"
2669 "-DBUILD_SHARED_LIBS=ON"
2670 (string-append "-DCMAKE_PREFIX_PATH="
2671 (assoc-ref %build-inputs "aws-c-common"))
2672 "-DENABLE_NET_TESTS=OFF")))
2673 (propagated-inputs
2674 (list aws-c-auth
2675 aws-c-cal
2676 aws-c-event-stream
2677 aws-c-http
2678 aws-c-mqtt
2679 aws-c-s3))
2680 (synopsis "C++ wrapper for Amazon Web Services C libraries")
2681 (description "The AWS Common Runtime (CRT) library provides a C++ wrapper
2682implementation for the following @acronym{AWS,Amazon Web Services} C libraries:
2683aws-c-auth, aws-c-cal, aws-c-common, aws-c-compression, aws-c-event-stream,
2684aws-c-http, aws-c-io, aws-c-mqtt, aws-checksums, and s2n.")
2685 (home-page "https://github.com/awslabs/aws-crt-cpp")
2686 (license license:asl2.0)))
2687
2688(define-public aws-sdk-cpp
2689 (package
2690 (name "aws-sdk-cpp")
2691 ; When updating also check for a tagged update to aws-crt-cpp from
2692 ; https://github.com/aws/aws-sdk-cpp/tree/main/crt
2693 (version "1.11.541")
2694 (source (origin
2695 (method git-fetch)
2696 (uri (git-reference
2697 (url "https://github.com/aws/aws-sdk-cpp")
2698 (commit version)))
2699 (file-name (git-file-name name version))
2700 (sha256
2701 (base32
2702 "0lvsskwpniip1m75w00aqa3ic1337r2c6a6brvgs6ff2qqi27cdg"))))
2703 (build-system cmake-build-system)
2704 (arguments
2705 '(;; Tests are run during the build phase.
2706 #:tests? #f
2707 #:configure-flags
2708 (list "-DBUILD_DEPS=OFF"
2709 "-DBUILD_SHARED_LIBS=ON"
2710 (string-append "-DCMAKE_PREFIX_PATH="
2711 (assoc-ref %build-inputs "aws-c-common")))))
2712 (propagated-inputs
2713 (list aws-crt-cpp))
2714 (inputs
2715 (list curl pulseaudio zlib))
2716 (synopsis "Amazon Web Services SDK for C++")
2717 (description
2718 "The AWS SDK for C++ provides a C++11 interface to the @acronym{AWS,Amazon
2719Web Services} API. AWS provides on-demand computing infrastructure and software
2720services including database, analytic, and machine learning technologies.")
2721 (home-page "https://github.com/aws/aws-sdk-cpp")
2722 (license license:asl2.0)))
2723
2724(define-public libexpected
2725 (package
2726 (name "libexpected")
2727 (version "1.1.0")
2728 (source
2729 (origin
2730 (method git-fetch)
2731 (uri (git-reference
2732 (url "https://github.com/TartanLlama/expected")
2733 (commit (string-append "v" version))
2734 ;; NOTE: Requires TL_CMAKE from custom
2735 ;; repository. Should not affect reproducibility.
2736 (recursive? #t)))
2737 (file-name (git-file-name name version))
2738 (sha256
2739 (base32 "17akrv80h0n4cfmxwvlvbb8ycqza7y3qqygjyphv95rrabqm9r02"))
2740 (patches (search-patches "libexpected-use-provided-catch2.patch"))))
2741 (build-system cmake-build-system)
2742 (native-inputs
2743 (list catch2))
2744 (synopsis "C++11/14/17 std::expected with functional-style extensions")
2745 (description "@code{std::expected} is proposed as the preferred way to
2746represent objects which will either have an expected value, or an unexpected
2747value giving information about why something failed. Unfortunately, chaining
2748together many computations which may fail can be verbose, as error-checking
2749code will be mixed in with the actual programming logic. This implementation
2750provides a number of utilities to make coding with expected cleaner.")
2751 (home-page "https://tl.tartanllama.xyz/")
2752 (license license:cc0)))
2753
2754(define-public immer
2755 ;; Use latest commit to fix build with gcc 14.
2756 (let ((commit "df6ef46d97e1fe81f397015b9aeb32505cef653b")
2757 (revision "0"))
2758 (package
2759 (name "immer")
2760 (version (git-version "0.8.1" revision commit))
2761 (source (origin
2762 (method git-fetch)
2763 (uri (git-reference
2764 (url "https://github.com/arximboldi/immer")
2765 (commit commit)))
2766 (file-name (git-file-name name version))
2767 (sha256
2768 (base32 "032rb84ahvdnc1m6sj4lflrwnk4p1f2jsq1pv03xbgizp2lr2pkx"))))
2769 (build-system cmake-build-system)
2770 (arguments
2771 (list
2772 ;; -Werror appears to report false positives.
2773 ;; See <https://github.com/arximboldi/immer/issues/223>.
2774 #:configure-flags #~'("-DDISABLE_WERROR=ON")
2775 #:modules `((guix build cmake-build-system)
2776 ((guix build gnu-build-system) #:prefix gnu:)
2777 (guix build utils))
2778 #:phases
2779 #~(modify-phases %standard-phases
2780 (replace 'check (assoc-ref gnu:%standard-phases 'check)))))
2781 (inputs (list boost libgc c-rrb))
2782 (native-inputs (list catch2-3 doctest fmt pkg-config))
2783 (home-page "https://sinusoid.es/immer")
2784 (synopsis "Immutable data structures")
2785 (description "Immer is a library of persistent and immutable data structures
2786written in C++.")
2787 (properties '((lint-hidden-cpe-vendors . ("immer_project"))))
2788 (license license:boost1.0))))
2789
2790(define-public zug
2791 (package
2792 (name "zug")
2793 (version "0.1.1")
2794 (source (origin
2795 (method git-fetch)
2796 (uri (git-reference
2797 (url "https://github.com/arximboldi/zug")
2798 (commit (string-append "v" version))))
2799 (file-name (git-file-name name version))
2800 (sha256
2801 (base32 "06vsbzx4ripidpb6ia7y1y8pmjk6gxzr93ilby90ahj6p2x08baf"))
2802 (modules '((guix build utils)))
2803 (snippet #~(delete-file-recursively "tools"))))
2804 (build-system cmake-build-system)
2805 (arguments
2806 (list
2807 #:modules `((guix build cmake-build-system)
2808 ((guix build gnu-build-system) #:prefix gnu:)
2809 (guix build utils))
2810 #:phases
2811 #~(modify-phases %standard-phases
2812 (replace 'check (assoc-ref gnu:%standard-phases 'check)))))
2813 (native-inputs (list boost catch2))
2814 (home-page "https://sinusoid.es/zug")
2815 (synopsis "Higher-order sequence transformers")
2816 (description "Zug is a C++ library providing transducers, that is,
2817composable sequential transformations.")
2818 (license license:boost1.0)))
2819
2820(define-public lager
2821 (package
2822 (name "lager")
2823 (version "0.1.1")
2824 (source (origin
2825 (method git-fetch)
2826 (uri (git-reference
2827 (url "https://github.com/arximboldi/lager")
2828 (commit (string-append "v" version))))
2829 (file-name (git-file-name name version))
2830 (sha256
2831 (base32 "1by9d49qnkncifyjcq16zy605d7v4ps6hvc01q5nsp1nbswm94m4"))))
2832 (build-system cmake-build-system)
2833 (arguments (list #:configure-flags #~(list "-Dlager_BUILD_EXAMPLES=no")
2834 #:modules `((guix build cmake-build-system)
2835 ((guix build gnu-build-system) #:prefix gnu:)
2836 (guix build utils))
2837 #:phases
2838 #~(modify-phases %standard-phases
2839 (add-after 'unpack 'delete-failing-tests
2840 (lambda _
2841 (delete-file-recursively "test/event_loop")))
2842 (replace 'check (assoc-ref gnu:%standard-phases 'check)))))
2843 (inputs (list boost-1.83 immer zug))
2844 (native-inputs (list catch2 cereal))
2845 (home-page "https://sinusoid.es/lager")
2846 (synopsis "Library for value-oriented design")
2847 (description "Lager is a library for value-oriented design implementing
2848the unidirectional data-flow architecture. Apart from a store and various
2849event loops it also provides lenses and cursors.")
2850 (license license:expat)))
2851
2852(define-public atomic-queue
2853 (package
2854 (name "atomic-queue")
2855 (version "1.6.5")
2856 (source (origin
2857 (method git-fetch)
2858 (uri (git-reference
2859 (url "https://github.com/max0x7ba/atomic_queue")
2860 (commit (string-append "v" version))))
2861 (file-name (git-file-name name version))
2862 (sha256
2863 (base32
2864 "1qr9wi017pb62cfga91prxgqjsz4y2jr8fyp4dvfccwr2pynwrnh"))))
2865 (build-system meson-build-system)
2866 (arguments
2867 `(#:configure-flags '("-Dbenchmarks=false")
2868 #:phases
2869 (modify-phases %standard-phases
2870 ,@(if (%current-target-system)
2871 `(;; boost is a test dependency. We don't run tests when
2872 ;; cross-compiling. Disable all targets that depend on it.
2873 (add-after 'unpack 'do-not-check-for-boost
2874 (lambda _
2875 (substitute* "meson.build"
2876 (("unit_test_framework = [^\n]*" all)
2877 "unit_test_framework = disabler()")))))
2878 '())
2879 (replace 'check
2880 (lambda* (#:key tests? #:allow-other-keys)
2881 (when tests?
2882 (invoke "./tests"))))
2883 (replace 'install
2884 (lambda* (#:key outputs #:allow-other-keys)
2885 (copy-recursively "../source/include/atomic_queue"
2886 (string-append (assoc-ref outputs "out")
2887 "/include/atomic_queue")))))))
2888 (native-inputs
2889 (list boost
2890 pkg-config))
2891 (home-page "https://github.com/max0x7ba/atomic_queue")
2892 (synopsis "C++ lockless queue")
2893 (description
2894 "This package contains a C++11 multiple-producer-multiple-consumer lockless
2895queues header library based on circular buffer with @code{std::atomic}.")
2896 (license license:expat)))
2897
2898(define-public magic-enum
2899 (package
2900 (name "magic-enum")
2901 (version "0.9.6")
2902 (home-page "https://github.com/Neargye/magic_enum")
2903 (source (origin
2904 (method git-fetch)
2905 (uri (git-reference
2906 (url home-page)
2907 (commit (string-append "v" version))))
2908 (file-name (git-file-name name version))
2909 (sha256
2910 (base32
2911 "15lxn4sjwygxyq4am3jbwl0m7lb0fw8w39fghgm7a8klcwavv4yn"))))
2912 (build-system cmake-build-system)
2913 (synopsis "C++17 header only library for compile time reflection of enums")
2914 (description "Magic Enum offers static reflection of enums, with
2915conversions to and from strings, iteration and related functionality.")
2916 (license license:expat)))
2917
2918(define-public mcpp
2919 (package
2920 (name "mcpp")
2921 (version "2.7.2")
2922 (source (origin
2923 (method url-fetch)
2924 (uri (string-append "mirror://sourceforge/mcpp/mcpp/"
2925 "V." version "/mcpp-" version ".tar.gz"))
2926 (sha256
2927 (base32
2928 "0r48rfghjm90pkdyr4khxg783g9v98rdx2n69xn8f6c5i0hl96rv"))))
2929 (build-system gnu-build-system)
2930 (arguments
2931 (list #:configure-flags
2932 #~(list "--enable-mcpplib"
2933 "--disable-static"
2934 (string-append "CFLAGS=-g -O2"
2935 " -Wno-error=incompatible-pointer-types"
2936 " -Wno-error=implicit-function-declaration"))))
2937 (home-page "https://mcpp.sourceforge.net/")
2938 (synopsis "C/C++ preprocessor")
2939 (description
2940 "@code{mcpp} is Matsui's CPP implementation precisely conformed to
2941standards.")
2942 (license license:bsd-2)))
2943
2944(define-public cli11
2945 (package
2946 (name "cli11")
2947 (version "2.4.2")
2948 (source
2949 (origin
2950 (method git-fetch)
2951 (uri (git-reference
2952 (url "https://github.com/CLIUtils/CLI11")
2953 (commit (string-append "v" version))))
2954 (file-name (git-file-name name version))
2955 (sha256
2956 (base32 "1kxggvgbdjx73rx9d91dm9imzcacf5jjfnjn2vaq6h6lvwlcdf04"))))
2957 (build-system cmake-build-system)
2958 (arguments
2959 (list #:configure-flags
2960 #~(list "-DCLI11_SINGLE_FILE=OFF"
2961 "-DCLI11_BUILD_EXAMPLES=OFF")))
2962 (native-inputs
2963 (list catch2 doxygen googletest))
2964 (synopsis "Command line parser for C++11")
2965 (description
2966 "CLI11 is a command line parser for C++11 and beyond that provides a rich
2967feature set with a simple and intuitive interface.")
2968 (home-page "https://cliutils.github.io/CLI11/book/")
2969 (license license:bsd-3)))
2970
2971(define-public caf
2972 (package
2973 (name "caf")
2974 (version "1.0.2")
2975 (source (origin
2976 (method git-fetch)
2977 (uri (git-reference
2978 (url "https://github.com/actor-framework/actor-framework")
2979 (commit version)))
2980 (file-name (git-file-name name version))
2981 (sha256
2982 (base32
2983 "1za7yja76csa0jnvkyavg2hc5zcc00za46c4x2fq42skh1apqcnl"))))
2984 (build-system cmake-build-system)
2985 (arguments
2986 (list #:configure-flags
2987 #~(list "-DCAF_ENABLE_EXAMPLES=OFF")))
2988 (inputs
2989 (list openssl))
2990 (synopsis "C++ implementation of the actor model")
2991 (description "The C++ Actor Framework (CAF) offers a high-level C++17
2992programming environment using the actor model for concurrent, distributed
2993computation.")
2994 (home-page "https://www.actor-framework.org/")
2995 (license license:bsd-3)))
2996
2997(define-public clipper
2998 (package
2999 (name "clipper")
3000 (version "6.4.2")
3001 (source
3002 (origin
3003 (method url-fetch)
3004 (uri (string-append "mirror://sourceforge/polyclipping"
3005 "/clipper_ver" version ".zip"))
3006 (sha256
3007 (base32 "09q6jc5k7p9y5d75qr2na5d1gm0wly5cjnffh127r04l47c20hx1"))))
3008 (build-system cmake-build-system)
3009 (arguments
3010 `(#:tests? #f ;no check target
3011 #:phases (modify-phases %standard-phases
3012 (replace 'unpack
3013 (lambda* (#:key source #:allow-other-keys)
3014 (and (invoke "unzip" source)
3015 (chdir "cpp")))))))
3016 (native-inputs
3017 `(("unzip" ,unzip)))
3018 (home-page "https://sourceforge.net/projects/polyclipping")
3019 (synopsis "Polygon and line clipping and offsetting library")
3020 (description
3021 "The Clipper library performs line & polygon clipping - intersection,
3022union, difference & exclusive-or, and line & polygon offsetting.
3023The library is based on Vatti's clipping algorithm.")
3024 (license license:boost1.0)))
3025
3026(define-public clipper2
3027 (package
3028 (inherit clipper)
3029 (name "clipper2")
3030 (version "1.5.2")
3031 (source
3032 (origin
3033 (method git-fetch)
3034 (uri (git-reference
3035 (url "https://github.com/AngusJohnson/Clipper2")
3036 (commit (string-append "Clipper2_" version))))
3037 (file-name (git-file-name name version))
3038 (sha256
3039 (base32 "1w8cmx712k45cb8gh9dakmbmybiwdx8c0b45mwpcldywx2lwxi2j"))
3040 (modules '((guix build utils)))
3041 (snippet #~(for-each
3042 delete-file-recursively
3043 '("CSharp" "DLL" "Delphi")))))
3044 (build-system cmake-build-system)
3045 (arguments
3046 (list
3047 #:configure-flags
3048 #~(list "-DUSE_EXTERNAL_GTEST=ON"
3049 "-DCLIPPER2_EXAMPLES=OFF")
3050 #:phases #~(modify-phases %standard-phases
3051 (add-after 'unpack 'chdir
3052 (lambda _
3053 (chdir "CPP"))))))
3054 (native-inputs (list googletest))
3055 (home-page "https://github.com/AngusJohnson/Clipper2")
3056 (description
3057 (string-append (package-description clipper) "\
3058Note: This package is a major update of the original clipper library."))))
3059
3060(define-public pcg-cpp
3061 (let ((commit "428802d1a5634f96bcd0705fab379ff0113bcf13")
3062 (revision "3"))
3063 (package
3064 (name "pcg-cpp")
3065 (version (git-version "0.98.1" revision commit))
3066 (source (origin
3067 (method git-fetch)
3068 (uri (git-reference
3069 (url "https://github.com/imneme/pcg-cpp")
3070 (commit commit)))
3071 (file-name (git-file-name name version))
3072 (sha256
3073 (base32
3074 "0w4xb52b6glldkz1wnjc4r4m750m59yxp8jky71j3l4pvfbbj2m5"))))
3075 (build-system gnu-build-system)
3076 (arguments
3077 `(#:test-target "test"
3078 #:phases
3079 (modify-phases %standard-phases
3080 (delete 'configure))
3081 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
3082 (synopsis "C++11 header only library for random number generation")
3083 (description "The Permuted Congruential Generator (PCG) extends the
3084Linear Congruential Generator (LCG) with a permutation function to increase
3085output randomness while retaining speed, simplicity, and conciseness.")
3086 (home-page "https://www.pcg-random.org")
3087 (license (list license:expat license:asl2.0))))) ; dual licensed
3088
3089(define-public libconfini
3090 (package
3091 (name "libconfini")
3092 (version "1.16.4")
3093 (source (origin
3094 (method git-fetch)
3095 (uri (git-reference
3096 (url "https://github.com/madmurphy/libconfini")
3097 (commit version)))
3098 (file-name (git-file-name name version))
3099 (sha256
3100 (base32
3101 "002lmf1b2phmc6s348k00yx5shrcc7psn3pgqvraxvr6n8g747jx"))))
3102 (build-system gnu-build-system)
3103 (arguments
3104 `(#:configure-flags
3105 (list "--disable-static")
3106 #:phases
3107 (modify-phases %standard-phases
3108 (replace 'bootstrap
3109 (lambda _ (invoke "sh" "bootstrap" "--noconfigure"))))))
3110 (native-inputs
3111 (list autoconf automake libtool))
3112 (home-page "https://madmurphy.github.io/libconfini/html/index.html")
3113 (synopsis "INI file parser")
3114 (description "@code{libconfini} is an INI file parser library written in
3115C. It focuses on standardization and parsing exactness and is at ease with
3116almost every type of file containing key/value pairs.")
3117 (license license:gpl3+)))
3118
3119(define-public libcppgenerate
3120 ;; dbus-cxx requires an unreleased fix.
3121 (let ((commit "930c5503f76c877b72b9ff8546353d6f422bd010")
3122 (revision "0"))
3123 (package
3124 (name "libcppgenerate")
3125 (version (git-version "0.2" revision commit))
3126 (source (origin
3127 (method git-fetch)
3128 (uri (git-reference
3129 (url "https://github.com/rm5248/libcppgenerate")
3130 (commit commit)))
3131 (file-name (git-file-name name version))
3132 (sha256
3133 (base32
3134 "0csdg9b406i85aqgivjmvqjdnqbyiyjh3s0xsfsxppv7wlh7j85r"))))
3135 (build-system cmake-build-system)
3136 (arguments (list #:configure-flags #~'("-DENABLE_TESTS=ON")))
3137 (home-page "https://github.com/rm5248/libcppgenerate")
3138 (synopsis "C++ code generator library for C++")
3139 (description "@code{libcppgenerate} is a library for generating C++ code
3140from C++.")
3141 (license license:asl2.0))))
3142
3143(define-public libcutl
3144 (package
3145 (name "libcutl")
3146 (version "1.10.0")
3147 (source (origin
3148 (method url-fetch)
3149 (uri (string-append
3150 "https://www.codesynthesis.com/download/libcutl/"
3151 (version-major+minor version)
3152 "/libcutl-" version ".tar.bz2"))
3153 (sha256
3154 (base32
3155 "070j2x02m4gm1fn7gnymrkbdxflgzxwl7m96aryv8wp3f3366l8j"))
3156 (modules '((guix build utils)))
3157 (snippet
3158 '(begin
3159 ;; Remove bundled sources.
3160 (with-directory-excursion "cutl/details"
3161 (for-each delete-file-recursively
3162 ;; FIXME: Boost_RegEx isn't being detected.
3163 (list
3164 ;;"boost"
3165 "expat")))))))
3166 (build-system gnu-build-system)
3167 (arguments
3168 `(#:configure-flags (list "--disable-static"
3169 ;;"--with-external-boost"
3170 "--with-external-expat")))
3171 (inputs
3172 (list ;;("boost ,boost)
3173 expat))
3174 (native-inputs
3175 (list gcc-10)) ;does not build with gcc-12
3176 (home-page "https://www.codesynthesis.com/projects/libcutl/")
3177 (synopsis "C++ utility library with generic and independent components")
3178 (description "libcutl is a C++ utility library. It contains a collection
3179of generic and independent components such as meta-programming tests, smart
3180pointers, containers, compiler building blocks, etc.")
3181 (license (list license:expat ;everything except...
3182 license:boost1.0)))) ;...the files under cutl/details/boost
3183
3184(define-public libxsd-frontend
3185 (package
3186 (name "libxsd-frontend")
3187 (version "2.0.0")
3188 (source
3189 (origin
3190 (method url-fetch)
3191 (uri (string-append "https://www.codesynthesis.com/download/"
3192 "libxsd-frontend/" (version-major+minor version)
3193 "/libxsd-frontend-" version ".tar.bz2"))
3194 (sha256
3195 (base32 "1nmzchsvwvn66jpmcx18anzyl1a3l309x1ld4zllrg37ijc31fim"))))
3196 (build-system gnu-build-system)
3197 (arguments
3198 `(#:test-target "test"
3199 #:imported-modules ((guix build copy-build-system)
3200 ,@%default-gnu-imported-modules)
3201 #:modules (((guix build copy-build-system) #:prefix copy:)
3202 (guix build gnu-build-system)
3203 (guix build utils))
3204 #:make-flags (list (string-append "--include-dir="
3205 (assoc-ref %build-inputs "build")
3206 "/include/"))
3207 #:phases
3208 (modify-phases %standard-phases
3209 (delete 'configure)
3210 (replace 'install
3211 (lambda args
3212 (apply (assoc-ref copy:%standard-phases 'install)
3213 #:install-plan
3214 '(("xsd-frontend" "include/xsd-frontend"
3215 #:include-regexp ("\\.?xx$"))
3216 ("xsd-frontend" "lib"
3217 #:include-regexp ("\\.so$")))
3218 args))))))
3219 (native-inputs
3220 (list build gcc-10))
3221 (inputs
3222 `(("libcutl" ,libcutl)
3223 ("libxerces-c" ,xerces-c)))
3224 (synopsis "XSD Front-end")
3225 (description "@code{libxsd-frontend} is a compiler frontend for the W3C
3226XML Schema definition language. It includes a parser, semantic graph types
3227and a traversal mechanism.")
3228 (home-page "https://www.codesynthesis.com/projects/libxsd-frontend/")
3229 (license license:gpl2+)))
3230
3231(define-public cli
3232 (package
3233 (name "cli")
3234 (version "1.1.0")
3235 (source
3236 (origin
3237 (method url-fetch)
3238 (uri (string-append "https://www.codesynthesis.com/download/"
3239 "cli/" (version-major+minor version)
3240 "/cli-" version ".tar.bz2"))
3241 (sha256
3242 (base32 "0bg0nsai2q4h3mldpnj0jz4iy4svs0bcfvmq0v0c9cdyknny606g"))))
3243 (build-system gnu-build-system)
3244 (arguments
3245 `(#:test-target "test"
3246 #:make-flags (list (string-append "--include-dir="
3247 (assoc-ref %build-inputs "build")
3248 "/include")
3249 (string-append "install_prefix="
3250 (assoc-ref %outputs "out")))
3251 #:phases
3252 (modify-phases %standard-phases
3253 (add-after 'unpack 'patch
3254 (lambda _
3255 (substitute* (find-files "." "\\.make$")
3256 (("build-0\\.3")
3257 (string-append (assoc-ref %build-inputs "build")
3258 "/include/build-0.3")))
3259 ;; Add the namespace prefix, to avoid errors such as "error:
3260 ;; ‘iterate_and_dispatch’ was not declared in this scope".
3261 (substitute* (find-files "." "\\.?xx$")
3262 (("add \\(typeid \\(type\\), \\*this\\);" all)
3263 (string-append "traverser_map<B>::" all))
3264 (("iterate_and_dispatch \\(s\\.names_begin.*;" all)
3265 (string-append "edge_dispatcher::" all)))))
3266 (delete 'configure))))
3267 (native-inputs
3268 (list build gcc-10))
3269 (inputs
3270 (list libcutl))
3271 (synopsis "C++ Command Line Interface (CLI) definition language")
3272 (description "@code{cli} is a domain-specific language (DSL) for defining
3273command line interfaces of C++ programs. It allows you to describe the
3274options that your program supports, their types, default values, and
3275documentation.")
3276 (home-page "https://codesynthesis.com/projects/cli/")
3277 (properties `((lint-hidden-cpe-vendors . ("github" "snyk"))))
3278 (license license:expat)))
3279
3280(define-public xsd
3281 (package
3282 (name "xsd")
3283 (version "4.0.0")
3284 (source
3285 (origin
3286 (method url-fetch)
3287 (uri (string-append "https://www.codesynthesis.com/download/"
3288 "xsd/" (version-major+minor version)
3289 "/xsd-" version ".tar.bz2"))
3290 (sha256
3291 (base32 "1hi9ppxd34np8ydv1h0vgc2qpdmgcd1cdzgk30aidv670xjg91fx"))))
3292 (build-system gnu-build-system)
3293 (outputs '("out" "doc")) ;3.8 MiB of doc and examples
3294 (arguments
3295 `(#:test-target "test"
3296 #:make-flags (list (string-append "--include-dir="
3297 (assoc-ref %build-inputs "build")
3298 "/include/")
3299 (string-append "install_prefix="
3300 (assoc-ref %outputs "out")))
3301 #:phases (modify-phases %standard-phases
3302 (add-after 'install 'move-doc
3303 (lambda* (#:key outputs #:allow-other-keys)
3304 (let ((out (assoc-ref outputs "out"))
3305 (doc (assoc-ref outputs "doc")))
3306 (mkdir-p (string-append doc "/share/doc"))
3307 (rename-file (string-append out "/share/doc/xsd")
3308 (string-append doc "/share/doc/xsd-"
3309 ,version)))))
3310 (delete 'configure))))
3311 (native-inputs
3312 (list build cli gcc-10))
3313 (inputs
3314 (list libcutl libnsl libxsd-frontend))
3315 (propagated-inputs
3316 ;; The code XSD generates requires the following library at run time;
3317 ;; propagate it for convenience.
3318 (list xerces-c))
3319 (synopsis "XML Data Binding for C++")
3320 (description "CodeSynthesis XSD (also known as libxsd or xsdcxx) is an XML
3321Schema to C++ data binding compiler. Provided with an XML instance
3322specification (XML Schema), it generates C++ classes that represent the given
3323vocabulary as well as XML parsing and serialization code. The data stored in
3324XML can then be accessed using types and functions that semantically
3325correspond to an application domain rather than dealing with the intricacies
3326of reading and writing XML.")
3327 (home-page "https://codesynthesis.com/projects/xsd/")
3328 ;; Exceptions are made to allow using the generated source files as well
3329 ;; as the libxsd library in free software projects whose license is
3330 ;; incompatible with the GPL v2. Refer to the file named FLOSSE for the
3331 ;; details.
3332 (license license:gpl2+)))
3333
3334(define-public jsonnet
3335 (package
3336 (name "jsonnet")
3337 (version "0.17.0")
3338 (source
3339 (origin
3340 (method git-fetch)
3341 (uri (git-reference
3342 (url "https://github.com/google/jsonnet")
3343 (commit (string-append "v" version))))
3344 (file-name (git-file-name name version))
3345 (sha256
3346 (base32 "1ddz14699v5lqx3dh0mb7hfffr6fk5zhmzn3z8yxkqqvriqnciim"))
3347 (modules '((guix build utils)))
3348 (patches (search-patches "jsonnet-include-cstdint-for-gcc-13-builds.patch"))
3349 (snippet
3350 #~(begin
3351 (rename-file "third_party/md5" ".md5")
3352 (delete-file-recursively "third_party")
3353 (delete-file-recursively "doc/third_party")
3354 (substitute* '("core/vm.cpp")
3355 (("#include \"json.hpp\"") "#include <nlohmann/json.hpp>"))
3356 (mkdir "third_party")
3357 (rename-file ".md5" "third_party/md5")))))
3358 (build-system cmake-build-system)
3359 (arguments
3360 `(#:configure-flags '("-DUSE_SYSTEM_GTEST=ON" "-DUSE_SYSTEM_JSON=ON"
3361 "-DBUILD_STATIC_LIBS=OFF")))
3362 (native-inputs
3363 (list googletest pkg-config))
3364 (inputs
3365 (list nlohmann-json))
3366 (home-page "https://jsonnet.org/")
3367 (synopsis "Data templating language")
3368 (description "Jsonnet is a templating language extending JSON
3369syntax with variables, conditions, functions and more.")
3370 (license license:asl2.0)))
3371
3372(define-public python-jsonnet
3373 (package
3374 (inherit jsonnet)
3375 (name "python-jsonnet")
3376 (build-system pyproject-build-system)
3377 (arguments
3378 (list #:test-flags #~(list "--ignore=case_studies/")))
3379 (native-inputs (modify-inputs (package-native-inputs jsonnet)
3380 (append python-pyyaml python-pytest python-setuptools)))
3381 (synopsis "Python bindings for Jsonnet, the data templating language")
3382 (description "This package provides a Python library named @code{_jsonnet}
3383which can evaluate Jsonnet files and expressions.")))
3384
3385(define-public simdjson
3386 (package
3387 (name "simdjson")
3388 (version "3.13.0")
3389 (source (origin
3390 (method git-fetch)
3391 (uri (git-reference
3392 (url "https://github.com/simdjson/simdjson")
3393 (commit (string-append "v" version))))
3394 (file-name (git-file-name name version))
3395 (sha256
3396 (base32
3397 "005yli56nrkvlyx9g9cq8dczk42r9a18l162i2s5k81lj3y7mcrp"))))
3398 (build-system cmake-build-system)
3399 (arguments
3400 '(#:tests? #f ; tests require downloading dependencies
3401 #:configure-flags
3402 '("-DBUILD_SHARED_LIBS=ON")))
3403 (synopsis "JSON parser for C++ using SIMD instructions")
3404 (description
3405 "The simdjson library uses commonly available SIMD instructions and
3406microparallel algorithms to implement a strict JSON parser with UTF-8
3407validation.")
3408 (home-page "https://github.com/simdjson/simdjson")
3409 (license license:asl2.0)))
3410
3411(define-public bloomberg-bde-tools
3412 (package
3413 (name "bloomberg-bde-tools")
3414 (version "4.27.0.0")
3415 (source (origin
3416 (method git-fetch)
3417 (uri (git-reference
3418 (url "https://github.com/bloomberg/bde-tools")
3419 (commit version)))
3420 (file-name (git-file-name name version))
3421 (sha256
3422 (base32
3423 "0zkf6vdvzp73h6bai6kmd062k0wyqwrrdv2z9m416kgxr6qickl2"))
3424 (patches
3425 (search-patches
3426 "bloomberg-bde-tools-fix-install-path.patch"))))
3427 (build-system copy-build-system)
3428 ;; Unable to be an inline dependency of bloomberg-bde due to patch.
3429 (properties '((hidden? . #t)))
3430 (synopsis "Tools for developing and building libraries modeled on BDE")
3431 (description
3432 "This package provides the cmake imports needed to build bloomberg-bde.")
3433 (home-page "https://github.com/bloomberg/bde-tools")
3434 (license license:asl2.0)))
3435
3436(define-public bloomberg-bde
3437 (package
3438 (name "bloomberg-bde")
3439 (version "4.27.0.0")
3440 (source (origin
3441 (method git-fetch)
3442 (uri (git-reference
3443 (url "https://github.com/bloomberg/bde")
3444 (commit version)))
3445 (file-name (git-file-name name version))
3446 (sha256
3447 (base32
3448 "17315r9j20pvv4ccnd59m85miq96hp07pysfr64glb7r4f4zjkfs"))
3449 ;;(modules '((guix build utils)))
3450 (snippet
3451 `(begin
3452 ;; FIXME: Delete bundled software. The third-party packages
3453 ;; may be patched or modified from upstream sources.
3454 ;;(for-each delete-file-recursively
3455 ;; (list "thirdparty"))
3456 ))))
3457 (build-system cmake-build-system)
3458 (arguments
3459 (list
3460 ;; Set UFID to build shared libraries. Flag descriptions can be found at
3461 ;; https://bloomberg.github.io/bde-tools/bbs/reference/bbs_build_configuration.html#ufid
3462 #:configure-flags #~(list "-DUFID=opt_dbg_exc_mt_64_shr_cpp20")
3463 #:test-exclude (string-join (list "balcl_commandline.t"
3464 "balst_stacktraceprintutil.t"
3465 "bslalg_numericformatterutil.t"
3466 "bslh_hash.t"
3467 "bslstl_deque.0[1345].t"
3468 "bslstl_queue.t"
3469 "bslstl_stack.t"
3470 "bslstl_string_test.t")
3471 "|")
3472 #:modules '((guix build cmake-build-system)
3473 ((guix build gnu-build-system) #:prefix gnu:)
3474 (guix build utils))
3475 #:phases
3476 #~(modify-phases %standard-phases
3477 ;; Explicitly build tests after the main build.
3478 (add-after 'build 'build-tests
3479 (lambda* (#:key make-flags #:allow-other-keys #:rest args)
3480 (apply (assoc-ref gnu:%standard-phases 'build)
3481 (list #:make-flags (list "all.t"))))))))
3482 (native-inputs
3483 (list bloomberg-bde-tools pkg-config python))
3484 (synopsis "Foundational C++ libraries used at Bloomberg")
3485 (description
3486 "The BDE Development Environment libraries provide an enhanced
3487implementation of STL containers, vocabulary types for representing common
3488concepts (like dates and times), and building blocks for developing
3489multi-threaded applications and network applications.")
3490 (home-page "https://github.com/bloomberg/bde")
3491 ;; Out-of-memory on i686-linux, compile errors with non-x86.
3492 (supported-systems '("x86_64-linux"))
3493 (license license:asl2.0)))
3494
3495(define-public gulrak-filesystem
3496 (package
3497 (name "gulrak-filesystem")
3498 (version "1.5.12")
3499 (source (origin
3500 (method git-fetch)
3501 (uri (git-reference
3502 (url "https://github.com/gulrak/filesystem")
3503 (commit (string-append "v" version))))
3504 (file-name (git-file-name name version))
3505 (sha256
3506 (base32
3507 "1qg10akvhp801xirkj4mqcpvcxj90z81ygpyg752xv110zj4914g"))))
3508 (build-system cmake-build-system)
3509 (synopsis "Header only C++ std::filesystem compatible library")
3510 (description "This package provides a header-only single-file
3511std::filesystem compatible helper library, based on the C++17 and C++20 specs,
3512but implemented for C++11, C++14, C++17 or C++20.")
3513 (home-page "https://github.com/gulrak/filesystem")
3514 (license license:expat)))
3515
3516(define-public bitsery
3517 (package
3518 (name "bitsery")
3519 (version "5.2.4")
3520 (source (origin
3521 (method git-fetch)
3522 (uri (git-reference
3523 (url "https://github.com/fraillt/bitsery")
3524 (commit (string-append "v" version))))
3525 (file-name (git-file-name name version))
3526 (sha256
3527 (base32
3528 "0s628p6qayajan4v8arsmbvzsml8zhc56k01zhmnlakbl7v0vwip"))))
3529 (build-system cmake-build-system)
3530 (arguments
3531 (list #:configure-flags
3532 #~(list "-DBITSERY_BUILD_TESTS=ON"
3533 "-DCMAKE_CXX_FLAGS=-Wno-error=maybe-uninitialized")))
3534 (native-inputs (list googletest))
3535 (synopsis "Header only C++ binary serialization library")
3536 (description "This package provides header only C++ binary serialization
3537library. It is designed around the networking requirements for real-time data
3538delivery, especially for games.")
3539 (home-page "https://github.com/fraillt/bitsery")
3540 (license license:expat)))
3541
3542(define-public function2
3543 (package
3544 (name "function2")
3545 (version "4.2.5")
3546 (source (origin
3547 (method git-fetch)
3548 (uri (git-reference
3549 (url "https://github.com/Naios/function2")
3550 (commit version)))
3551 (file-name (git-file-name name version))
3552 (sha256
3553 (base32
3554 "0sn760zk79hfbf21v9qvf67mrrlnmw6a2rhrp5l440b6f4f3xbzr"))
3555 (modules '((guix build utils)))
3556 (snippet
3557 ;; Unbundle googletest.
3558 '(begin
3559 (delete-file-recursively "test")
3560 (substitute* "CMakeLists.txt"
3561 (("add_subdirectory\\(test\\)") ""))))))
3562 (build-system cmake-build-system)
3563 ;; The test size_match_layout fails on i586/i686. For more info:
3564 ;; https://github.com/Naios/function2/issues/57
3565 (arguments
3566 (list #:tests? #f))
3567 (synopsis "Improved implementations of std::function")
3568 (description "This package provides the following implementations of
3569std::function:
3570@itemize
3571@item copyable @code{fu2::function}
3572@item move-only @code{fu2::unique_function} (capable of holding move only
3573 types)
3574@item non-owning @code{fu2::function_view} (capable of referencing callables in
3575 a non owning way)
3576@end itemize")
3577 (home-page "https://naios.github.io/function2/")
3578 (license license:boost1.0)))
3579
3580(define-public cpp-mustache
3581 (package
3582 (name "cpp-mustache")
3583 (version "5.0")
3584 (source (origin
3585 (method git-fetch)
3586 (uri (git-reference
3587 (url "https://github.com/kainjow/Mustache")
3588 (commit "4ed8c0b5a2a43d59394bd6900dc04e738dbf8c02")))
3589 (file-name (git-file-name name version))
3590 (sha256
3591 (base32
3592 "0qwrg35gby851viwd6dgrc346712701a0gll8a0m4xs8invxavrh"))))
3593 (build-system cmake-build-system)
3594 (arguments
3595 (list #:configure-flags
3596 #~(list
3597 (string-append "-DCMAKE_CXX_FLAGS=-I"
3598 #$(this-package-native-input "catch2")
3599 "/include/catch2/"))
3600 #:phases
3601 #~(modify-phases %standard-phases
3602 (replace 'check
3603 (lambda* (#:key tests? #:allow-other-keys)
3604 (when tests?
3605 (invoke "./tests/mustache-unit-tests"))))
3606 (replace 'install
3607 (lambda* (#:key outputs #:allow-other-keys)
3608 (install-file "../source/mustache.hpp"
3609 (string-append (assoc-ref outputs "out")
3610 "/include")))))))
3611 (native-inputs (list catch2))
3612 (home-page "https://github.com/kainjow/Mustache")
3613 (synopsis "Mustache text templates for modern C++")
3614 (description "@code{cpp-mustache} is a Mustache implementation for C++ 11
3615and above. It is header only and has zero dependencies. It provides a
3616templated string type for compatibility with any STL-like string (std::string,
3617std::wstring, etc).")
3618 (license license:boost1.0)))
3619
3620(define fast-float-test-files
3621 (let ((name "fast-float-test-files")
3622 (version "1.0.0"))
3623 (origin
3624 (method git-fetch)
3625 (uri (git-reference
3626 (url "https://github.com/fastfloat/supplemental_test_files")
3627 (commit version)))
3628 (file-name (git-file-name name version))
3629 (sha256
3630 (base32
3631 "0z0z7qy3pxv6bhg2apvs8gp3mnixbxk92a9f7vby01p26zq1lnwl")))))
3632
3633(define-public fast-float
3634 (package
3635 (name "fast-float")
3636 (version "8.0.2")
3637 (source (origin
3638 (method git-fetch)
3639 (uri (git-reference
3640 (url "https://github.com/fastfloat/fast_float")
3641 (commit (string-append "v" version))))
3642 (file-name (git-file-name name version))
3643 (sha256
3644 (base32
3645 "19x1yklf641yrpad6lk4cq3jmird10d5ig8hicm3p9lxh92k78cl"))))
3646 (build-system cmake-build-system)
3647 (arguments
3648 (list
3649 #:configure-flags #~(list "-DFASTFLOAT_TEST=ON"
3650 "-DSYSTEM_DOCTEST=ON")
3651 #:phases
3652 #~(modify-phases %standard-phases
3653 (add-after 'unpack 'patch-cmake-tests
3654 (lambda* (#:key inputs native-inputs #:allow-other-keys)
3655 (substitute* "tests/CMakeLists.txt"
3656 (("FetchContent_GetProperties\\(supplemental_test_files.*")
3657 "")
3658 (("if\\(NOT supplemental_test_files_POPULATED.*")
3659 (string-append
3660 "set(supplemental_test_files_BINARY_DIR "
3661 #$fast-float-test-files ")\nif(0)\n"))))))))
3662 (native-inputs (list doctest fast-float-test-files))
3663 (home-page "https://github.com/fastfloat/fast_float")
3664 (synopsis "Floating point number parser for C++")
3665 (description "@code{fast_float} is a header-only C++ library for parsing
3666floating point numbers from strings. It implements the C++ from_chars
3667functions for the float and double types.")
3668 (license (list license:asl2.0 license:boost1.0 license:expat)))) ; triple licensed
3669
3670(define-public pocketfft-cpp
3671 (let ((commit "daa8bb18327bc5c7d22c69428c25cf5dc64167d3")
3672 (revision "0"))
3673 (package
3674 (name "pocketfft-cpp")
3675 (version (git-version "0" revision commit))
3676 (source (origin
3677 (method git-fetch)
3678 (uri (git-reference
3679 (url "https://github.com/mreineck/pocketfft")
3680 (commit commit)))
3681 (file-name (git-file-name name version))
3682 (sha256
3683 (base32
3684 "1dbkkqkmkxgmz1qjpsqzic5ig3qw1pqndbb3dvjc7xq5f2rdzyq1"))
3685 (patches (search-patches
3686 "pocketfft-cpp-prefer-preprocessor-if.patch"))))
3687 (build-system copy-build-system)
3688 (arguments
3689 (list
3690 #:install-plan #~'(("pocketfft_hdronly.h" "include/"))))
3691 (home-page "https://github.com/mreineck/pocketfft")
3692 (synopsis "C++11 header-only Fast Fourier Transform library")
3693 (description "This package provides a single-header C++11 library for
3694computing Fast Fourier transformations. It supports multidimensional arrays,
3695different floating point sizes and complex transformations.")
3696 (license license:bsd-3))))
3697
3698(define-public priocpp
3699 ;; XXX: No releases.
3700 (let ((commit "214a0ff789d5c58e76d870fe2e75f98857991855")
3701 (revision "0"))
3702 (package
3703 (name "priocpp")
3704 (version (git-version "0.0.0" revision commit))
3705 (source
3706 (origin
3707 (method git-fetch)
3708 (uri (git-reference
3709 (url "https://github.com/Grumbel/priocpp")
3710 (commit commit)))
3711 (file-name (git-file-name name version))
3712 (sha256
3713 (base32 "0ksrgajcwqvim5ymxikj26akza3sbhvx3kn4n9xib6r57131kq2m"))))
3714 (build-system cmake-build-system)
3715 (arguments
3716 (list
3717 #:configure-flags
3718 #~(list "-DBUILD_TESTS=ON")))
3719 (inputs (list fmt-8 logmich))
3720 (native-inputs (list googletest pkg-config tinycmmc))
3721 ;; XXX: CMake-built dependents currently require propagation.
3722 (propagated-inputs (list jsoncpp sexp-cpp))
3723 (home-page "https://github.com/Grumbel/priocpp")
3724 (synopsis "Property input/output for C++")
3725 (description
3726 "This package provides simple property input/output utilities for C++.")
3727 (license license:gpl3+))))
3728
3729(define-public sajson
3730 (let ((commit "ec644013e34f9984a3cc9ba568cab97a391db9cd")
3731 (revision "0"))
3732 (package
3733 (name "sajson")
3734 (version (git-version "1.0" revision commit))
3735 (source (origin
3736 (method git-fetch)
3737 (uri (git-reference
3738 (url "https://github.com/chadaustin/sajson")
3739 (commit commit)))
3740 (file-name (git-file-name name version))
3741 (patches
3742 (search-patches "sajson-build-with-gcc10.patch"))
3743 (sha256
3744 (base32
3745 "0fjag27w7gvkc5pdhq3ad7yc09rabpzahndw1sgsg04ipznidmmq"))
3746 (modules '((guix build utils)))
3747 (snippet '(delete-file-recursively "third-party"))))
3748 (build-system scons-build-system)
3749 (arguments
3750 (list
3751 #:phases
3752 #~(modify-phases %standard-phases
3753 (add-after 'unpack 'disable-other-builds
3754 (lambda _
3755 (substitute* "SConstruct"
3756 (("for name, tools in builds:")
3757 "for name, tools in [('opt', [gcc, opt])]:"))))
3758 (add-after 'unpack 'use-external-unittest-cpp
3759 (lambda _
3760 (substitute* "SConscript"
3761 (("unittestpp_env\\.Library") "_dummy = ")
3762 (("test_env = env.Clone\\(tools=\\[unittestpp, sajson\\]\\)")
3763 (string-append
3764 "test_env = env.Clone(tools=[sajson])\n"
3765 "test_env.Append(CPPPATH='"
3766 (search-input-directory %build-inputs "/include/UnitTest++")
3767 "', LIBPATH='"
3768 (string-append #$(this-package-native-input "unittest-cpp")
3769 "/lib")
3770 "', LIBS=['UnitTest++'])")))))
3771 (add-after 'unpack 'fix-example
3772 (lambda _
3773 (substitute* "example/main.cpp"
3774 (("fclose\\(file\\);")
3775 "if (file != nullptr) {fclose(file); file = nullptr;}"))))
3776 (replace 'build
3777 (lambda* (#:key tests? #:allow-other-keys #:rest args)
3778 (when tests?
3779 (apply (assoc-ref %standard-phases 'build)
3780 args))))
3781 (replace 'check
3782 (lambda* (#:key tests? #:allow-other-keys)
3783 (when tests?
3784 (invoke "build/opt/test")
3785 (invoke "build/opt/test_unsorted"))))
3786 (replace 'install
3787 (lambda _
3788 (let ((out (string-append #$output "/include")))
3789 (install-file "include/sajson.h" out)
3790 (install-file "include/sajson_ostream.h" out)))))))
3791 (native-inputs (list unittest-cpp))
3792 (home-page "https://github.com/chadaustin/sajson")
3793 (synopsis "C++11 header-only, in-place JSON parser")
3794 (description "@code{sajson} is an in-place JSON parser with support for
3795parsing with only a single memory allocation.")
3796 (license license:expat))))
3797
3798(define-public sajson-for-gemmi
3799 (package/inherit sajson
3800 (name "sajson-for-gemmi")
3801 (source (origin
3802 (inherit (package-source sajson))
3803 (patches (cons
3804 (search-patch
3805 "sajson-for-gemmi-numbers-as-strings.patch")
3806 (origin-patches (package-source sajson))))))
3807 (arguments
3808 (substitute-keyword-arguments (package-arguments sajson)
3809 ;; This is a modified version used in gemmi, in which numbers are kept
3810 ;; as strings. Building the tests fails with the modification.
3811 ((#:tests? _ #f) #f)))
3812 (properties '((hidden? . #t)))))
3813
3814(define-public optional-lite
3815 (package
3816 (name "optional-lite")
3817 (version "3.5.0")
3818 (source (origin
3819 (method git-fetch)
3820 (uri (git-reference
3821 (url "https://github.com/martinmoene/optional-lite")
3822 (commit (string-append "v" version))))
3823 (file-name (git-file-name name version))
3824 (sha256
3825 (base32
3826 "0jpsm94kp1504yk9s2km86zv8xrszz30qanmhz2ljmvsdblz2l47"))))
3827 (build-system cmake-build-system)
3828 (home-page "https://github.com/martinmoene/optional-lite")
3829 (synopsis "Nullable object for C++98, C++11 and later")
3830 (description
3831 "Optional lite is a single-file header-only library to represent optional
3832(nullable) objects and pass them by value. The library aims to provide a
3833C++17-like optional for use with C++98 and later. If available,
3834@code{std::optional} is used.")
3835 (license license:boost1.0)))
3836
3837(define-public optionparser
3838 (package
3839 (name "optionparser")
3840 (version "1.7")
3841 (source (origin
3842 (method url-fetch)
3843 (uri
3844 (string-append "mirror://sourceforge/optionparser/"
3845 "optionparser-" version ".tar.gz"))
3846 (sha256
3847 (base32
3848 "04gfxrdzwacaynb8scsz6rr7nh64n6yk6w9dh2qdhrxw4caqr0dk"))))
3849 (outputs '("out" "doc"))
3850 (build-system gnu-build-system)
3851 (arguments
3852 (list
3853 #:phases
3854 #~(modify-phases %standard-phases
3855 (delete 'configure)
3856 (add-before 'build 'chdir
3857 (lambda _ (chdir "src")))
3858 (replace 'check
3859 (lambda* (#:key tests? #:allow-other-keys)
3860 (when tests?
3861 (begin
3862 (invoke "./example_arg")
3863 (invoke "./testparse")
3864 (invoke "./testprintusage")
3865 (invoke "./testodr")
3866 (invoke "./example")))))
3867 (replace 'install
3868 (lambda _
3869 (install-file "optionparser.h"
3870 (string-append #$output "/include"))))
3871 (add-after 'install 'install-doc
3872 (lambda _
3873 (copy-recursively
3874 "../html"
3875 (string-append #$output:doc "/share/doc/optionparser/html")))))))
3876 (native-inputs (list doxygen))
3877 (home-page "https://optionparser.sourceforge.net/")
3878 (synopsis "Header-only C++ library to parse command line options")
3879 (description "This package provides a header-only C++ library to parse
3880command line options. It supports the short and long option formats of
3881getopt(), getopt_long() and getopt_long_only().")
3882 (license license:expat)))
3883
3884(define-public safeint
3885 (package
3886 (name "safeint")
3887 (version "3.0.28")
3888 (source
3889 (origin
3890 (method git-fetch)
3891 (uri (git-reference
3892 (url "https://github.com/dcleblanc/SafeInt")
3893 (commit version)))
3894 (file-name (git-file-name name version))
3895 (sha256
3896 (base32 "0bgqvyz5zp4mqzkm9545r3564n52bcdnq8bjn6azhxdsmap26g56"))
3897 (patches
3898 (search-patches "safeint-disable-tests.patch"))))
3899 (build-system cmake-build-system)
3900 (arguments
3901 (list
3902 #:phases
3903 #~(modify-phases %standard-phases
3904 (replace 'install
3905 (lambda _
3906 (let ((include-dir (string-append #$output "/include")))
3907 (with-directory-excursion "../source"
3908 (install-file "SafeInt.hpp" include-dir)
3909 (install-file "safe_math.h" include-dir)
3910 (install-file "safe_math_impl.h" include-dir)))))
3911 (add-after 'install 'install-doc
3912 (lambda _
3913 (let ((doc-dir (string-append #$output "/share/doc/safeint")))
3914 (with-directory-excursion "../source"
3915 (install-file "helpfile.md" doc-dir))))))))
3916 (home-page "https://github.com/dcleblanc/SafeInt")
3917 (synopsis "C and C++ library for managing integer overflows")
3918 (description
3919 "SafeInt is a class library for C++ that manages integer overflows. It
3920also includes a C library that checks casting, multiplication, division,
3921addition and subtraction for all combinations of signed and unsigned 32-bit and
392264-bit integers.")
3923 (license license:expat)))
3924
3925(define-public wide-integer
3926 (let ((commit "22b8428746248e682d5276f8e8b7fb52af73ea47")
3927 (revision "1314")) ; commit count
3928 (package
3929 (name "wide-integer")
3930 (version (git-version "0" revision commit))
3931 (source (origin
3932 (method git-fetch)
3933 (uri (git-reference
3934 (url "https://github.com/ckormanyos/wide-integer")
3935 (commit commit)))
3936 (file-name (git-file-name name version))
3937 (sha256
3938 (base32 "0bhjnbdcphv5kddddh8kpwjpjix23m12vmfsz0r6wjc5d27md33z"))
3939 (modules '((guix build utils)))
3940 (snippet #~(substitute* "CMakeLists.txt"
3941 (("WideIntegerTargets") "wide-integer-targets")
3942 (("WideIntegerConfig") "wide-integer-config")
3943 (("WideInteger") "wide-integer")))))
3944 (build-system cmake-build-system)
3945 (native-inputs (list boost))
3946 (home-page "https://github.com/ckormanyos/wide-integer")
3947 (synopsis "C++ template for arbitrary-precision integers")
3948 (description "This package implements a generic template for extended
3949width signed and unsigned integral types. Up to 63 limbs of any built-in
3950integer type are supported, and can be used to build powers of two like
3951int128_t, uint256_t, but also somewhat esoteric types such as int24_t,
3952uint80_t, or uint1536_t. The provided types can be used in much the same
3953way as basic integer types.")
3954 (license license:boost1.0))))
3955
3956(define-public swell
3957 (let ((commit "3024ec8e000f769454b5ee4ac927dc5cecfc6a6b")
3958 (revision "0"))
3959 (package
3960 (name "swell")
3961 (version (git-version "0" revision commit)) ;no tags
3962 (source
3963 (origin
3964 (method git-fetch)
3965 (uri (git-reference
3966 (url "https://github.com/justinfrankel/WDL")
3967 (commit commit)))
3968 (file-name (git-file-name "wdl" version))
3969 (sha256
3970 (base32
3971 "1ssp5rwn224g01jj9k273q80w2q1qfj1vzgqvk3lfjrjga0jaj4w"))
3972 (modules '((guix build utils)))
3973 (snippet
3974 '(with-directory-excursion "WDL"
3975 ;; Delete 3rd party libraries and sample projects.
3976 (for-each delete-file-recursively
3977 (list "cmath"
3978 "giflib"
3979 "jpeglib"
3980 "libpng"
3981 "zlib"))
3982 ;; Fix including headers from the system.
3983 (substitute* (find-files "." "\\.(h|cpp)")
3984 (("\\\".*giflib\\/gif_lib\\.h\\\"") "<gif_lib.h>")
3985 (("\\\".*jpeglib\\/jpeglib\\.h\\\"") "<jpeglib.h>")
3986 (("\\\".*jnetlib\\/asyncdns\\.h\\\"") "<jnetlib/asyncdns.h>")
3987 (("\\\".*jnetlib\\/connection\\.h\\\"")
3988 "<jnetlib/connection.h>")
3989 (("\\\".*jnetlib\\/httpget\\.h\\\"") "<jnetlib/httpget.h>")
3990 (("\\\".*jnetlib\\/jnetlib\\.h\\\"") "<jnetlib/jnetlib.h>")
3991 (("\\\".*jnetlib\\/netinc\\.h\\\"") "<jnetlib/netinc.h>")
3992 (("\\\".*libpng\\/png\\.h\\\"") "<png.h>")
3993 (("\\\"\\.\\.\\/plush2\\/plush\\.h\\\"") "<plush2/plush.h>")
3994 (("\\\".*zlib\\.h\\\"") "<zlib.h>"))
3995 ;; Fix building jnetlib.
3996 (substitute* "jnetlib/Makefile"
3997 ;; Link the missing library.
3998 (("-pthread") "-pthread -lstdc++")
3999 ;; Remove the unavailable object.
4000 ((" sercon\\.o") "")
4001 ;; Add webserver.
4002 (("util\\.o") "util.o webserver.o "))
4003 ;; Fix building eel2.
4004 (substitute* "eel2/Makefile"
4005 ;; Do not build swell objects.
4006 ((" \\$\\(SWELL_OBJS\\)") "")
4007 ;; Do not depend again on the dependencies of swell.
4008 (("(-lX11 -lXi|\\$\\(shell pkg-config.*\\))") "")
4009 ;; Link swell.
4010 (("-lGL") "-lGL -lSwell"))))))
4011 (build-system gnu-build-system)
4012 (arguments
4013 (list #:tests? #f ;test object does not exist
4014 #:test-target "test"
4015 #:make-flags #~'("SWELL_SUPPORT_GTK=1")
4016 #:phases
4017 #~(modify-phases %standard-phases
4018 (delete 'configure) ;no configure script
4019 (add-after 'unpack 'change-directory
4020 (lambda _ (chdir "WDL/swell")))
4021 ;; No install rule.
4022 (replace 'install
4023 (lambda _
4024 (install-file "libSwell.so"
4025 (string-append #$output "/lib"))
4026 (for-each
4027 (lambda (file)
4028 (when (not (string-contains file "/sample_project"))
4029 (install-file file
4030 (string-append #$output
4031 "/include/SWELL"))))
4032 (find-files "." "\\.h$")))))))
4033 (native-inputs (list perl pkg-config))
4034 (inputs
4035 (list cairo
4036 fontconfig
4037 freetype
4038 gdk-pixbuf
4039 glib
4040 gtk+
4041 libxi
4042 libx11
4043 mesa
4044 zlib))
4045 (home-page "https://www.cockos.com/wdl/")
4046 (synopsis "Windows emulation layer")
4047 (description
4048 "SWELL is a Windows emulation Layer. It provides a set of common APIs,
4049common controls and win32-style extensions.")
4050 (license license:zlib))))
4051
4052(define-public swell-colortheme
4053 (package
4054 (inherit swell)
4055 (name "swell-colortheme")
4056 (arguments
4057 (substitute-keyword-arguments (package-arguments swell)
4058 ((#:make-flags flags)
4059 #~(append #$flags '("libSwell.colortheme")))
4060 ((#:phases phases)
4061 #~(modify-phases #$phases
4062 (replace 'install
4063 (lambda _
4064 (install-file "libSwell.colortheme"
4065 (string-append #$output
4066 "/share/SWELL"))))))))
4067 (native-inputs
4068 (list pkg-config
4069 gtk+)) ;only for compilation
4070 (inputs '())
4071 (synopsis "SWELL colortheme sample")
4072 (description
4073 "This package provides the default @code{libSwell.colortheme} file for
4074programs that use @code{swell}.")))
4075
4076(define-public jnetlib
4077 (package
4078 (inherit swell)
4079 (name "jnetlib")
4080 (arguments
4081 (substitute-keyword-arguments (package-arguments swell)
4082 ((#:tests? _ #t) #t)
4083 ((#:phases phases)
4084 #~(modify-phases #$phases
4085 (replace 'change-directory
4086 (lambda _ (chdir "WDL/jnetlib")))
4087 (replace 'install
4088 (lambda _
4089 (install-file "jnl.a" (string-append #$output "/lib"))
4090 (for-each (lambda (file)
4091 (install-file file (string-append #$output
4092 "/include"
4093 "/jnetlib")))
4094 (find-files "." "\\.h"))))))))
4095 (native-inputs '())
4096 (inputs '())
4097 (synopsis "C++ asynchronous network abstraction layer")
4098 (description
4099 "JNetLib is a portable C++ asynchronous network abstraction layer. It
4100features:
4101@itemize
4102@item TCP connections support,
4103@item listening sockets support,
4104@item asynchronous DNS support,
4105@item HTTP serving and getting support,
4106@item Completely asynchronous love for single threaded apps.
4107@end itemize")))
4108
4109(define-public eel2
4110 (package
4111 (inherit swell)
4112 (name "eel2")
4113 (arguments
4114 (substitute-keyword-arguments (package-arguments swell)
4115 ((#:tests? _ #t) #f) ;no tests
4116 ;; FIXME: Remove this flag when this issue will be fixed:
4117 ;; https://github.com/justinfrankel/WDL/issues/32.
4118 ((#:make-flags _ '()) #~'("NO_GFX=1"))
4119 ((#:phases phases)
4120 #~(modify-phases #$phases
4121 (replace 'change-directory
4122 (lambda _ (chdir "WDL/eel2")))
4123 (replace 'install
4124 (lambda _
4125 ;; Install executable files.
4126 (for-each (lambda (file)
4127 (install-file file
4128 (string-append #$output "/bin")))
4129 '("eel_pp" "loose_eel"))
4130 ;; Install headers.
4131 (for-each (lambda (file)
4132 (install-file file
4133 (string-append #$output
4134 "/include/EEL2")))
4135 (find-files "." "\\.h$"))
4136 ;; Install scripts.
4137 (copy-recursively "scripts"
4138 (string-append #$output
4139 "/share/EEL2/scripts"))))))))
4140 (native-inputs (list nasm))
4141 (inputs (list jnetlib))
4142 (home-page "https://www.cockos.com/EEL2/")
4143 (synopsis "Expression evaluation library")
4144 (description
4145 "EEL2 is an expression evaluation library and realtime compiler based on
4146@uref{http://1014.org/code/nullsoft/avs/, AVS's EEL}.")))
4147
4148(define-public juce
4149 (package
4150 (name "juce")
4151 (version "8.0.6")
4152 (source (origin
4153 (method git-fetch)
4154 (uri (git-reference
4155 (url "https://github.com/juce-framework/JUCE")
4156 (commit version)))
4157 (file-name (git-file-name name version))
4158 (sha256
4159 (base32
4160 "1n2w571wc7fl178x5ynxiaxvhjvqskfwnd0x295yzr6vpc35a1mv"))))
4161 (build-system cmake-build-system)
4162 (arguments
4163 (list #:tests? #f ;no test suite
4164 #:configure-flags #~(list "-DJUCE_TOOL_INSTALL_DIR=bin")
4165 #:phases
4166 #~(modify-phases %standard-phases
4167 (add-after 'unpack 'patch-paths
4168 (lambda* (#:key inputs #:allow-other-keys)
4169 (substitute*
4170 (find-files "." "jucer_ProjectExport_CodeBlocks.h$")
4171 (("/usr/include/freetype2")
4172 (search-input-directory inputs "/include/freetype2")))
4173 (substitute*
4174 (find-files "." "juce_linux_Fonts.cpp$")
4175 (("fonts\\.conf\" };")
4176 (string-append
4177 "fonts.conf\"\n\""
4178 (search-input-file inputs "/etc/fonts/fonts.conf")
4179 "\"\n};"))))))))
4180 (native-inputs
4181 (list alsa-lib
4182 curl
4183 jack-1
4184 libx11
4185 pkg-config
4186 webkitgtk-with-libsoup2))
4187 (inputs (list fontconfig freetype libjpeg-turbo libpng))
4188 (home-page "https://juce.com")
4189 (synopsis "C++ application framework for audio plugins and plugin hosts")
4190 (description
4191 "JUCE is a C++ application framework for creating applications including
4192VST, VST3, AU, AUv3, AAX and LV2 audio plug-ins and plug-in hosts.")
4193 (license
4194 (list license:asl2.0 ;for Oboe and AudioUnitSDK
4195 license:bsd-3 ;for FLAC, Ogg Vorbis and OpenGL Extension Wrangler
4196 license:expat ;for Mesa 3-D graphics and jucer icons
4197 license:gpl3 ;for JUCE and VST3 SDK
4198 license:ijg ;for jpeglib
4199 license:isc ;for LV2 SDK
4200 license:zlib)))) ;for pngLib, zlib and Box2D
4201
4202(define-public ftxui
4203 (package
4204 (name "ftxui")
4205 (version "5.0.0")
4206 (source (origin
4207 (method git-fetch)
4208 (uri (git-reference
4209 (url "https://github.com/ArthurSonzogni/FTXUI")
4210 (commit (string-append "v" version))))
4211 (sha256
4212 (base32
4213 "1qfk6jwasxhjk410igma7pdv1q664w8cgjf95ciln3hh1kiqcpi0"))
4214 (file-name (git-file-name name version))))
4215 (build-system cmake-build-system)
4216 (native-inputs (list googletest benchmark))
4217 (arguments
4218 (list #:configure-flags
4219 #~(list (string-append "-DFTXUI_BUILD_TESTS:BOOL="
4220 #$(if (%current-target-system)
4221 "OFF"
4222 "ON"))
4223 "-DFTXUI_BUILD_TESTS_FUZZER:BOOL=OFF"
4224 "-DBUILD_SHARED_LIBS=ON")))
4225 (home-page "https://github.com/ArthurSonzogni/FTXUI")
4226 (synopsis "C++ Functional Terminal User Interface")
4227 (description
4228 "Functional Terminal (X) User interface (FTXUI) is a simple C++ library for
4229terminal based user interfaces.
4230
4231Main features:
4232@itemize
4233@item Functional style.
4234@item Keyboard & mouse navigation.
4235@item Support for UTF8 and fullwidth chars.
4236@item Support for animations.
4237@item Support for drawing.
4238@item No dependencies.
4239@end itemize")
4240 (license license:expat)))
4241
4242(define-public mapbox-variant
4243 (package
4244 (name "mapbox-variant")
4245 (version "1.2.0")
4246 (source (origin
4247 (method git-fetch)
4248 (uri (git-reference
4249 (url "https://github.com/mapbox/variant")
4250 (commit (string-append "v" version))))
4251 (file-name (git-file-name name version))
4252 (sha256
4253 (base32 "03cmxm34ralh8y07bs80gz3v4pql51206dn5h7lcnm7vishkk241"))
4254 (modules '((guix build utils)))
4255 (snippet #~(begin
4256 (delete-file "test/include/catch.hpp")
4257 (substitute* (find-files "test" "\\.[ch]pp")
4258 (("\"catch.hpp\"") "<catch/catch.hpp>"))))))
4259 (build-system gnu-build-system)
4260 (arguments
4261 (list #:test-target "test"
4262 #:phases
4263 #~(modify-phases %standard-phases
4264 (delete 'bootstrap)
4265 (delete 'configure)
4266 (delete 'build)
4267 (replace 'install
4268 (lambda* (#:key outputs #:allow-other-keys)
4269 (copy-recursively "include"
4270 (string-append (assoc-ref outputs "out")
4271 "/include")))))))
4272 (native-inputs (list catch2-1))
4273 (home-page "https://github.com/mapbox/variant")
4274 (synopsis "Implementation of std::variant for C++11/14")
4275 (description "This package provides a header-only implementation of
4276std::variant (formerly boost::variant) for C++11/14.")
4277 (license license:bsd-3)))
4278
4279(define-public mpark-variant
4280 (package
4281 (name "mpark-variant")
4282 (version "1.4.0")
4283 (source (origin
4284 (method git-fetch)
4285 (uri (git-reference
4286 (url "https://github.com/mpark/variant")
4287 (commit (string-append "v" version))))
4288 (sha256
4289 (base32
4290 "0gz8d5qprlfqb42cfyyc4nbwhgarhw027a9nr52h3gbdn560j0j4"))
4291 (file-name (git-file-name name version))))
4292 (build-system cmake-build-system)
4293 (arguments
4294 (list
4295 #:configure-flags #~(list "-DMPARK_VARIANT_INCLUDE_TESTS=mpark")
4296 #:phases
4297 #~(modify-phases %standard-phases
4298 (add-after 'unpack 'find-googletest
4299 (lambda _
4300 (substitute* "test/CMakeLists.txt"
4301 (("add_subdirectory.*3rdparty/googletest.*\n")
4302 "find_package(GTest REQUIRED)\n")
4303 ((".*3rdparty/googletest.*\n") "")
4304 ((".*config_compiler_and_linker.*\n") "")
4305 (("gtest_main") "gtest gtest_main")))))))
4306 (native-inputs (list googletest))
4307 (home-page "https://github.com/mpark/variant")
4308 (synopsis "Implementation of std::variant for C++11/14/17")
4309 (description
4310 "MPark.Variant provides the C++17 std::variant for C++11/14/17. It is
4311based on the implementation of std::variant in libc++.")
4312 (license license:boost1.0)))
4313
4314(define-public nativefiledialog-extended
4315 (package
4316 (name "nativefiledialog-extended")
4317 (version "1.2.1")
4318 (source
4319 (origin
4320 (method git-fetch)
4321 (uri (git-reference
4322 (url "https://github.com/btzy/nativefiledialog-extended")
4323 (commit (string-append "v" version))))
4324 (file-name (git-file-name name version))
4325 (sha256
4326 (base32 "15l0jy3v4p6rgg9dk8zr80lqp51s32ii62cm4s90400ragdgh10v"))))
4327 (build-system cmake-build-system)
4328 (arguments
4329 '(#:tests? #f
4330 #:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
4331 (native-inputs (list pkg-config))
4332 (inputs (list gtk+))
4333 (home-page "https://github.com/btzy/nativefiledialog-extended")
4334 (synopsis "Native file dialog library with C and C++ bindings")
4335 (description
4336 "This package provides a library that portably invokes native file open,
4337folder select and file save dialogs. It allows the specification of a default
4338file name and location, as well as filters with friendly names (such as
4339\"source files\" or \"image files\") where supported.")
4340 (license license:zlib)))
4341
4342(define-public sexp-cpp
4343 ;; XXX: Does not release anymore.
4344 (let ((commit "4d8096c223d2f469ca6e407e793d20980f6aba76")
4345 (revision "0"))
4346 (package
4347 (name "sexp-cpp")
4348 (version (git-version "0.1.0" revision commit))
4349 (source
4350 (origin
4351 (method git-fetch)
4352 (uri (git-reference
4353 (url "https://github.com/lispparser/sexp-cpp")
4354 (commit commit)))
4355 (file-name (git-file-name name version))
4356 (sha256
4357 (base32 "1c79mp0d0b52k7bk0xlh9xmczd60v3f5jv5b240mm8r9z7gyk1vz"))))
4358 (build-system cmake-build-system)
4359 (arguments
4360 (list
4361 #:configure-flags
4362 #~(list "-DBUILD_TESTS=ON")))
4363 (native-inputs (list googletest tinycmmc))
4364 (home-page "https://github.com/lispparser/sexp-cpp")
4365 (synopsis "S-Expression parser for C++")
4366 (description
4367 "This package provides a simple S-Expression parser for C++.")
4368 (license license:gpl3+))))
4369
4370(define-public string-view-lite
4371 (package
4372 (name "string-view-lite")
4373 (version "1.8.0")
4374 (source
4375 (origin
4376 (method git-fetch)
4377 (uri (git-reference
4378 (url "https://github.com/martinmoene/string-view-lite")
4379 (commit (string-append "v" version))))
4380 (file-name (git-file-name name version))
4381 (sha256
4382 (base32 "1mfp3lmqx7ac0545akxd2v05rrapa3byz8q4gb9rqy94pcqbfyc5"))))
4383 (build-system cmake-build-system)
4384 (home-page "https://github.com/martinmoene/string-view-lite")
4385 (synopsis "C++17 string-view for older C++")
4386 (description "This package provides a compatibility header-only library
4387for C++17 string-view.")
4388 (license license:boost1.0)))
4389
4390(define-public strutcpp
4391 ;; XXX: No releases.
4392 (let ((commit "108ac9bb4993d661187ac7add0863abc7ff2531f")
4393 (revision "0"))
4394 (package
4395 (name "strutcpp")
4396 (version (git-version "0.0.0" revision commit))
4397 (source
4398 (origin
4399 (method git-fetch)
4400 (uri (git-reference
4401 (url "https://github.com/Grumbel/strutcpp")
4402 (commit commit)))
4403 (file-name (git-file-name name version))
4404 (sha256
4405 (base32 "0m344qq3d57balzvc26fjx985nj2xwnfb1a7prkv3njj5lfcf127"))
4406 (patches (search-patches "strutcpp-fix-includes.patch"))))
4407 (build-system cmake-build-system)
4408 (arguments
4409 (list
4410 #:configure-flags
4411 #~(list "-DBUILD_TESTS=ON")))
4412 (native-inputs (list googletest tinycmmc))
4413 (home-page "https://github.com/Grumbel/strutcpp")
4414 (synopsis "Collection of string utilities for C++")
4415 (description "This package provides simple string utilities for C++.")
4416 (license license:gpl3+))))
4417
4418(define-public tfel
4419 (package
4420 (name "tfel")
4421 (version "4.2.2") ;Keep in sync with compatible version of mgis
4422 (source
4423 (origin
4424 (method git-fetch)
4425 (uri (git-reference
4426 (url "https://github.com/thelfer/tfel")
4427 (commit (string-append "TFEL-" version))))
4428 (file-name (git-file-name name version))
4429 (sha256
4430 (base32 "14br7n76qfh651hvmn1i0ma5lr5ayhvj4ay2182isx26m1j15cfz"))))
4431 (build-system cmake-build-system)
4432 (arguments
4433 (list
4434 #:configure-flags
4435 #~(list "-Denable-portable-build=ON")
4436 #:phases
4437 #~(modify-phases %standard-phases
4438 ;; Test targets are not build by default. By building these
4439 ;; additional targets the majority of tests (over 6000) can
4440 ;; be run.
4441 (add-after 'build 'build-test-targets
4442 (lambda* (#:key tests? parallel-build? #:allow-other-keys)
4443 (if tests?
4444 (invoke "make"
4445 "MFrontGenericBehaviours"
4446 "MFrontGenericBehaviours2"
4447 "MFrontGenericBehaviours3"
4448 "-j"
4449 (if parallel-build?
4450 (number->string (parallel-job-count)) "1"))
4451 (format #t "test suite not run~%"))))
4452 (replace 'check
4453 (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
4454 (if tests?
4455 (invoke "ctest"
4456 "-R"
4457 "generic"
4458 "-E"
4459 "brick"
4460 "-j"
4461 (if parallel-tests?
4462 (number->string (parallel-job-count)) "1"))
4463 (format #t "test suite not run~%")))))))
4464 (home-page "https://thelfer.github.io/tfel/web/index.html")
4465 (synopsis "TFEL library and MFront code generator")
4466 (description
4467 "MFront is a code generator which translates a set of closely
4468related domain specific languages into plain C++ on top of the TFEL library.")
4469 ;; TFEL/MFront is released under either the GNU GPL licence with linking
4470 ;; exception or the CECILL-A licence:
4471 (license (list license:gpl3+ license:cecill))))
4472
4473(define-public mgis
4474 (package
4475 (name "mgis")
4476 (version "2.2") ;Keep in sync with compatible version of tfel
4477 (source
4478 (origin
4479 (method git-fetch)
4480 (uri (git-reference
4481 (url "https://github.com/thelfer/MFrontGenericInterfaceSupport")
4482 (commit (string-append "MFrontGenericInterfaceSupport-" version))))
4483 (file-name (git-file-name name version))
4484 (sha256
4485 (base32 "00ij7gaqrzakvc3n6irq5z5b5nd08kik5i87prvnp9604ssa6h8k"))))
4486 (build-system cmake-build-system)
4487 (arguments
4488 (list
4489 #:configure-flags
4490 #~(list "-Denable-doxygen-doc=OFF" "-Denable-portable-build=ON")
4491 #:phases
4492 #~(modify-phases %standard-phases
4493 ;; Test targets are not build by default. By building these
4494 ;; additional targets some tests can be run.
4495 (add-after 'build 'build-test-targets
4496 (lambda* (#:key tests? parallel-build? #:allow-other-keys)
4497 (if tests?
4498 (invoke "make"
4499 "BehaviourTest"
4500 "MFrontGenericBehaviourInterfaceTest"
4501 "MFrontGenericBehaviourInterfaceTest2"
4502 "MFrontGenericBehaviourInterfaceTest3"
4503 "-j"
4504 (if parallel-build?
4505 (number->string (parallel-job-count)) "1"))
4506 (format #t "test suite not run~%"))))
4507 (replace 'check
4508 (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
4509 (if tests?
4510 (invoke "ctest" "-R" "MFrontGenericBehaviourInterfaceTest"
4511 "-j"
4512 (if parallel-tests?
4513 (number->string (parallel-job-count)) "1"))
4514 (format #t "test suite not run~%")))))))
4515 (inputs (list tfel))
4516 (home-page "https://thelfer.github.io/mgis/web/index.html")
4517 (synopsis
4518 "MFrontGenericInterfaceSupport provides tools to handle MFront behaviours")
4519 (description
4520 "Those tools are meant to be used by solver developers to e.g. load
4521MFront behaviours from external shared libraries and retrieve all relevant
4522meta data function.")
4523 ;; MFrontGenericInterfaceSupport is released under either the GNU LGPL license
4524 ;; or the CECILL-C license:
4525 (license (list license:lgpl3 license:cecill-c))))
4526
4527(define-public tsl-hopscotch-map
4528 (package
4529 (name "tsl-hopscotch-map")
4530 (version "2.3.0")
4531 (source (origin
4532 (method git-fetch)
4533 (uri (git-reference
4534 (url "https://github.com/Tessil/hopscotch-map")
4535 (commit (string-append "v" version))))
4536 (file-name (git-file-name name version))
4537 (sha256
4538 (base32
4539 "012pw37w000pdxdvps0wsqrw6597cm6i6kr5rpl303qmiwqicb2p"))))
4540 (build-system cmake-build-system)
4541 (arguments
4542 (list
4543 #:phases
4544 #~(modify-phases %standard-phases
4545 (add-after 'unpack 'patch-cmake-test
4546 (lambda _
4547 (let ((file (open-file "CMakeLists.txt" "a")))
4548 (display "\nenable_testing()\nadd_subdirectory(tests)" file)
4549 (close-port file))
4550 (substitute* "tests/CMakeLists.txt"
4551 (("set\\(Boost_USE_STATIC_LIBS.*") "")
4552 (("add_subdirectory\\(\\.\\..*")
4553 "add_test(tsl_hopscotch_map_tests tsl_hopscotch_map_tests)\n")))))))
4554 (native-inputs (list boost))
4555 (home-page "https://github.com/Tessil/hopscotch-map")
4556 (synopsis "Hash maps and hash sets using hopscotch hashing")
4557 (description "This package provides a C++ implementation of several hash
4558map and a hash set variants using open addressing and hopscotch hashing to
4559resolve collisions. It is intended to be fast and provides additional
4560features, such as heterogeneous lookups and different growth policies.")
4561 (license license:expat)))
4562
4563(define-public tsl-sparse-map
4564 (package
4565 (name "tsl-sparse-map")
4566 (version "0.6.2")
4567 (source (origin
4568 (method git-fetch)
4569 (uri (git-reference
4570 (url "https://github.com/Tessil/sparse-map")
4571 (commit (string-append "v" version))))
4572 (sha256
4573 (base32
4574 "0rb7w0hzsj4qbm0dff1niaf75aag9lj0xqhgb3vg5h9hfic62ic2"))
4575 (file-name (git-file-name name version))))
4576 (build-system cmake-build-system)
4577 (arguments
4578 (list
4579 #:phases
4580 #~(modify-phases %standard-phases
4581 (add-after 'unpack 'patch-cmake-test
4582 (lambda _
4583 (let ((file (open-file "CMakeLists.txt" "a")))
4584 (display "\nenable_testing()\nadd_subdirectory(tests)" file)
4585 (close-port file))
4586 (substitute* "tests/CMakeLists.txt"
4587 (("set\\(Boost_USE_STATIC_LIBS.*") "")
4588 (("add_subdirectory\\(\\.\\..*")
4589 "add_test(tsl_sparse_map_tests tsl_sparse_map_tests)\n")))))))
4590 (native-inputs (list boost))
4591 (home-page "https://github.com/Tessil/sparse-map")
4592 (synopsis "Sparse hash map")
4593 (description "This package provides a C++ implementation of a hash map and
4594a hash set with open addressing and sparse quadratic probing. It is intended
4595to be memory efficient and provides additional features, such as heterogeneous
4596lookups and different growth policies.")
4597 (license license:expat)))
4598
4599(define-public tsl-ordered-map
4600 (package
4601 (name "tsl-ordered-map")
4602 (version "1.1.0")
4603 (source (origin
4604 (method git-fetch)
4605 (uri (git-reference
4606 (url "https://github.com/Tessil/ordered-map")
4607 (commit (string-append "v" version))))
4608 (file-name (git-file-name name version))
4609 (sha256
4610 (base32
4611 "0bz5zgabalb7z0j9scng4zmi95hy7iasry5gz15x6y6dsdz0qf3j"))))
4612 (build-system cmake-build-system)
4613 (arguments
4614 (list
4615 #:phases
4616 #~(modify-phases %standard-phases
4617 (add-after 'unpack 'patch-cmake-test
4618 (lambda _
4619 (let ((file (open-file "CMakeLists.txt" "a")))
4620 (display "\nenable_testing()\nadd_subdirectory(tests)" file)
4621 (close-port file))
4622 (substitute* "tests/CMakeLists.txt"
4623 (("set\\(Boost_USE_STATIC_LIBS.*") "")
4624 (("add_subdirectory\\(\\.\\..*")
4625 "add_test(tsl_ordered_map_tests tsl_ordered_map_tests)\n")))))))
4626 (native-inputs (list boost))
4627 (home-page "https://github.com/Tessil/ordered-map")
4628 (synopsis "Order-preserving hash map and hash set")
4629 (description "This package provides a C++ implementation of a hash map and
4630a hash set which preserve the order of insertion. It is intended for
4631efficient ordered insertions and lookup, while sacrifing performance for
4632ordered erase operations.")
4633 (license license:expat)))
4634
4635(define-public tinygettext
4636 ;; XXX: Does not release anymore.
4637 (let ((commit "ef4164639004d7de5bf8ab28ed0e85ea521b7c5e")
4638 (revision "0"))
4639 (package
4640 (name "tinygettext")
4641 (version (git-version "0.2.0" revision commit))
4642 (source
4643 (origin
4644 (method git-fetch)
4645 (uri (git-reference
4646 (url "https://github.com/tinygettext/tinygettext")
4647 (commit commit)))
4648 (file-name (git-file-name name version))
4649 (sha256
4650 (base32 "0a8l92nba33f3j2hk6ckrn9javmy2xbnsfkks1z740y3bj4sxzw9"))))
4651 (build-system cmake-build-system)
4652 (arguments
4653 (list
4654 #:configure-flags
4655 #~(list "-DBUILD_TESTS=ON")
4656 #:phases
4657 #~(modify-phases %standard-phases
4658 (replace 'check
4659 (lambda _
4660 (substitute* "../source/test/test.sh"
4661 (("^\\.")
4662 (getcwd)))
4663 (with-directory-excursion "../source/test"
4664 (invoke "bash" "test.sh")))))))
4665 (native-inputs (list tinycmmc))
4666 (home-page "https://github.com/tinygettext/tinygettext")
4667 (synopsis "Simple gettext replacement")
4668 (description
4669 "This package provides a simple gettext replacement that works directly
4670on @code{.po} files and doesn't need @code{.mo} files pre-generated.")
4671 (license license:expat))))
4672
4673(define-public tinygettext-with-sdl2
4674 (package/inherit tinygettext
4675 (arguments
4676 (substitute-keyword-arguments (package-arguments tinygettext)
4677 ((#:configure-flags flags)
4678 #~(list "-DTINYGETTEXT_WITH_SDL=ON" "-DBUILD_TESTS=ON"))))
4679 (native-inputs (list pkg-config tinycmmc))
4680 (inputs (list sdl2))))
4681
4682(define-public tl-optional
4683 (package
4684 (name "tl-optional")
4685 (version "1.1.0")
4686 (source (origin
4687 (method git-fetch)
4688 (uri (git-reference
4689 (url "https://github.com/TartanLlama/optional")
4690 (commit (string-append "v" version))))
4691 (file-name (git-file-name name version))
4692 (sha256
4693 (base32
4694 "0qkjplmhilbi1iqxx3pz0grcx5355ymk6wwd4h4309mk156xgx2q"))))
4695 (build-system cmake-build-system)
4696 (arguments
4697 (list
4698 #:phases
4699 #~(modify-phases %standard-phases
4700 (add-after 'unpack 'patch-cmake-test
4701 (lambda _
4702 (substitute* "CMakeLists.txt"
4703 (("FetchContent_Declare.*") "")
4704 ((".*http.*catchorg/Catch2.*") "")
4705 (("FetchContent_MakeAvailable\\(Catch2\\)")
4706 "find_package(Catch2 REQUIRED)")))))))
4707 (native-inputs (list catch2))
4708 (home-page "https://github.com/TartanLlama/optional")
4709 (synopsis "Implementation of std::optional with extensions for C++11/14/17")
4710 (description "@code{tl::optional} provides a single-header implementation of
4711the std::optional for C++11/14/17, with support for monadic operations added in
4712C++23.")
4713 (license license:cc0)))
4714
4715(define-public type-safe
4716 (package
4717 (name "type-safe")
4718 (version "0.2.4")
4719 (source
4720 (origin
4721 (method git-fetch)
4722 (uri (git-reference
4723 (url "https://github.com/foonathan/type_safe")
4724 (commit (string-append "v" version))))
4725 (file-name (git-file-name name version))
4726 (sha256
4727 (base32 "0qb4g9x22m8w9d7n9793cbig5a06wlhzqwlr276yxvz5yyzsxjfg"))
4728 (modules '((guix build utils)))
4729 ;; Remove bundled debug_assert.
4730 ;; Keep external/external.cmake because it enables
4731 ;; TYPE_SAFE_HAS_IMPORTED_TARGETS, required for installing the CMake
4732 ;; config files.
4733 (snippet #~(delete-file-recursively "external/debug_assert"))))
4734 (build-system cmake-build-system)
4735 (arguments
4736 (list #:configure-flags
4737 #~(list "-DTYPE_SAFE_BUILD_TEST_EXAMPLE=ON"
4738 "-DTYPE_SAFE_BUILD_DOC=OFF") ; needs standardese
4739 #:phases
4740 #~(modify-phases %standard-phases
4741 (add-after 'unpack 'fix-dependencies
4742 (lambda _
4743 (substitute*
4744 (list "include/type_safe/detail/assert.hpp"
4745 "include/type_safe/detail/force_inline.hpp")
4746 (("#include <debug_assert.hpp>")
4747 (string-append "#include <"
4748 #$(this-package-input "debug-assert")
4749 "/include/debug_assert.hpp>")))
4750 (substitute* "test/CMakeLists.txt"
4751 (("^if\\(NOT EXISTS .*/catch\\.hpp\\)") "if(FALSE)")
4752 (("^(target_include_directories\\(type_safe_test) .*"
4753 all prefix)
4754 (string-append all prefix " PRIVATE \""
4755 #$(this-package-native-input "catch2")
4756 "/include/catch2\")\n")))))
4757 (add-after 'install 'fix-cmake-config
4758 (lambda _
4759 (substitute* (string-append
4760 #$output
4761 "/lib/cmake/type_safe/type_safe-config.cmake")
4762 (("^(find_dependency\\(debug_assert)\\)" _ prefix)
4763 (string-append prefix " PATHS \""
4764 #$(this-package-input "debug-assert")
4765 "/lib/cmake/debug_assert\")"))))))))
4766 (native-inputs (list catch2))
4767 (inputs (list debug-assert))
4768 (home-page "https://github.com/foonathan/type_safe")
4769 (synopsis "C++ abstractions for preventing bugs via the type system")
4770 (description "type_safe is a C++ header-only library which provides
4771abstractions for defining more appropriate types, thus allowing C++'s type
4772system to prevent more bugs.")
4773 (license license:expat)))
4774
4775(define-public cpp-ada-url-parser
4776 (package
4777 (name "cpp-ada-url-parser")
4778 (version "2.9.2")
4779 (source
4780 (origin
4781 (method git-fetch)
4782 (uri (git-reference
4783 (url "https://github.com/ada-url/ada")
4784 (commit (string-append "v" version))))
4785 (file-name (git-file-name name version))
4786 (sha256
4787 (base32 "0xvvjlia627ajl966gdxzy2b1j0jiimx7zx8ypmffwx0k6x72qam"))))
4788 (build-system cmake-build-system)
4789 (arguments
4790 (list
4791 #:configure-flags
4792 #~(list "-DCPM_LOCAL_PACKAGES_ONLY=ON")
4793 #:phases
4794 #~(modify-phases %standard-phases
4795 (add-after 'unpack 'patch-deps
4796 (lambda _
4797 (substitute* "CMakeLists.txt"
4798 (("cmake/CPM.cmake")
4799 (string-append #$(this-package-native-input
4800 "cpm-cmake")
4801 "/lib/cmake/CPM.cmake"))
4802 ;; We force CPM to find system packages rather than using git
4803 ;; to download them.
4804 (("Git_FOUND") "TRUE")
4805 (("(simdjson@)[0-9.]*" _ simdjson)
4806 (string-append simdjson
4807 #$(package-version (this-package-native-input
4808 "simdjson")))))
4809 (substitute* "tools/cli/CMakeLists.txt"
4810 (("(VERSION\\s)[0-9.]*" _ a)
4811 (string-append a
4812 #$(package-version (this-package-native-input
4813 "cxxopts")))))))
4814 (add-after 'patch-deps 'python-zipfile-disable-strict-timestamps
4815 (lambda _
4816 (substitute* "singleheader/amalgamate.py"
4817 (("zipfile.ZIP_DEFLATED")
4818 "zipfile.ZIP_DEFLATED, strict_timestamps=False")))))))
4819 (native-inputs (list cpm-cmake
4820 cxxopts
4821 fmt-10
4822 googletest
4823 python
4824 simdjson))
4825 (home-page "https://github.com/ada-url/ada")
4826 (synopsis "URL parser")
4827 (description
4828 "Ada is a fast and spec-compliant URL parser written in C++.
4829Specification for URL parser can be found from the WHATWG website.")
4830 (license license:gpl3+)))
4831
4832(define-public tclap
4833 (package
4834 (name "tclap")
4835 (version "1.4.0-rc2")
4836 (source
4837 (origin
4838 (method url-fetch)
4839 (uri (string-append "mirror://sourceforge/" name "/" name "-" version
4840 ".tar.bz2"))
4841 (sha256
4842 (base32 "1xy5q78ff7z22gnia320qlaf0mawv2m02rl6b7dawxy4mmdwwlna"))))
4843 (build-system cmake-build-system)
4844 (arguments
4845 (list
4846 #:phases #~(modify-phases %standard-phases
4847 (replace 'check
4848 (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
4849 (if tests?
4850 (invoke "ctest" "-j"
4851 (if parallel-tests?
4852 (number->string (parallel-job-count))
4853 "1"))
4854 (format #t "test suite not run~%")))))))
4855 (native-inputs (list python))
4856 (home-page "https://sourceforge.net/p/tclap/discussion/")
4857 (synopsis "Templatized Command Line Argument Parser")
4858 (description
4859 "This is a simple C++ library that facilitates parsing command line
4860arguments in a type independent manner.")
4861 (license license:expat)))
4862
4863(define-public aklomp-base64
4864 (package
4865 (name "aklomp-base64")
4866 (version "0.5.2")
4867 (source (origin
4868 (method git-fetch)
4869 (uri (git-reference
4870 (url "https://github.com/aklomp/base64.git")
4871 (commit (string-append "v" version))))
4872 (file-name (git-file-name name version))
4873 (sha256
4874 (base32
4875 "0xc541vhq44d9i1vf5hyrznqd1kyad9qbvsghcfr17pk1xyqv1kl"))))
4876 (build-system cmake-build-system)
4877 (arguments
4878 (list #:tests? #t
4879 #:phases
4880 #~(modify-phases %standard-phases
4881 (replace 'check
4882 (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
4883 (if tests?
4884 (invoke "ctest" "-VV" "--build-config" "Release" "--output-on-failure")
4885 (format #t "test suite not run~%")))))
4886
4887 #:configure-flags
4888 #~(append
4889 (list "-DBASE64_BUILD_TESTS=ON"
4890 "-DCMAKE_BUILD_TYPE=Release")
4891 (let ((system #$(or (%current-target-system)
4892 (%current-system))))
4893 (cond
4894 ;; ARM 64-bit (aarch64)
4895 ((string-prefix? "aarch64-" system)
4896 (list
4897 "-DCMAKE_C_FLAGS=-march=armv8-a"
4898 "-DNEON64_CFLAGS= "
4899 "-DBASE64_WITH_NEON64=ON"
4900 "-DBASE64_WITH_AVX2=OFF"
4901 "-DBASE64_WITH_SSSE3=OFF"
4902 "-DBASE64_WITH_SSE41=OFF"
4903 "-DBASE64_WITH_SSE42=OFF"
4904 "-DBASE64_WITH_AVX=OFF"
4905 "-DBASE64_WITH_AVX512=OFF"))
4906 ;; ARM 32-bit (armhf)
4907 ((string-prefix? "armhf-" system)
4908 (list
4909 "-DCMAKE_C_FLAGS=-march=armv7 -mfpu=neon"
4910 "-DNEON32_CFLAGS=-march=armv7 -mfpu=neon"
4911 "-DBASE64_WITH_NEON32=ON"
4912 "-DBASE64_WITH_AVX2=OFF"
4913 "-DBASE64_WITH_SSSE3=OFF"
4914 "-DBASE64_WITH_SSE41=OFF"
4915 "-DBASE64_WITH_SSE42=OFF"
4916 "-DBASE64_WITH_AVX=OFF"
4917 "-DBASE64_WITH_AVX512=OFF"))
4918 ;; x86_64 (with all extensions except AVX512).
4919 ((string-prefix? "x86_64-" system)
4920 (list
4921 "-DAVX2_CFLAGS=-mavx2"
4922 "-DSSSE3_CFLAGS=-mssse3"
4923 "-DSSE41_CFLAGS=-msse4.1"
4924 "-DSSE42_CFLAGS=-msse4.2"
4925 "-DAVX_CFLAGS=-mavx"
4926 "-DBASE64_WITH_AVX512=OFF"))
4927 ;; i686 (32-bit x86, limited extensions)
4928 ((string-prefix? "i686-" system)
4929 (list
4930 "-DSSE41_CFLAGS=-msse4.1"
4931 "-DSSE42_CFLAGS=-msse4.2"
4932 "-DBASE64_WITH_AVX=OFF"
4933 "-DBASE64_WITH_AVX2=OFF"
4934 "-DBASE64_WITH_AVX512=OFF"))
4935 (else
4936 (list
4937 "-DBASE64_WITH_AVX2=OFF"
4938 "-DBASE64_WITH_SSSE3=OFF"
4939 "-DBASE64_WITH_SSE41=OFF"
4940 "-DBASE64_WITH_SSE42=OFF"
4941 "-DBASE64_WITH_AVX=OFF"
4942 "-DBASE64_WITH_AVX512=OFF"
4943 "-DBASE64_WITH_NEON32=OFF"
4944 "-DBASE64_WITH_NEON64=OFF")))))))
4945 (synopsis "Fast base64 stream encoder/decoder")
4946 (description "This package provides a base64 stream encoder/decoder
4947written in C99.")
4948 (properties `((tunable? . #t)))
4949 (home-page "https://github.com/aklomp/base64")
4950 (license license:bsd-2)))
4951
4952(define-public unordered-dense
4953 (package
4954 (name "unordered-dense")
4955 (version "4.8.1")
4956 (source
4957 (origin
4958 (method git-fetch)
4959 (uri (git-reference
4960 (url "https://github.com/martinus/unordered_dense")
4961 (commit (string-append "v" version))))
4962 (file-name (git-file-name name version))
4963 (sha256
4964 (base32 "02a86p2abrjkjw6kxd2gcxhknn50mcb1shrch8fhg72n534yblr5"))))
4965 ;; This library uses CMake as build system to distribute the package, but
4966 ;; uses Meson to build and launch tests. Hence, the phase 'check is replaced
4967 ;; to mimic what is defined for meson-build-system.
4968 (build-system cmake-build-system)
4969 (arguments
4970 (list
4971 #:phases
4972 #~(modify-phases %standard-phases
4973 (replace 'check
4974 (lambda* (#:key tests? #:allow-other-keys)
4975 (when tests?
4976 (substitute* "../source/test/app/doctest.h"
4977 (("#include <doctest\\.h>")
4978 "#include <doctest/doctest.h>"))
4979 (setenv "FUZZ_CORPUS_BASE_DIR"
4980 (string-append (getcwd) "/../source/data/fuzz/"))
4981 (invoke "meson" "setup" "../source/")
4982 (invoke "ninja" "--verbose" "-j"
4983 (number->string (parallel-job-count)))
4984 (setenv "MESON_TESTTHREADS"
4985 (number->string (parallel-job-count)))
4986 (invoke "meson" "test")))))))
4987 (native-inputs (list meson pkg-config))
4988 (inputs (list doctest fmt boost))
4989 (home-page "https://github.com/martinus/unordered_dense")
4990 (synopsis "C++17 fast and densely stored hashmap and hashset library")
4991 (description
4992 "A fast & densely stored hashmap and hashset based on robin-hood backward
4993shift deletion for C++17 and later.
4994
4995The classes @code{ankerl::unordered_dense::map} and
4996@code{ankerl::unordered_dense::set} are (almost) drop-in replacements of
4997@code{std::unordered_map} and @code{std::unordered_set.} While they don't have
4998as strong iterator / reference stability guarantees, they are typically much
4999faster. Additionally, there are @code{ankerl::unordered_dense::segmented_map}
5000and @code{ankerl::unordered_dense::segmented_set} with lower peak memory usage,
5001and stable references (iterators are NOT stable) on insert.")
5002 (license license:expat)))
5003
5004(define-public zpp-serializer
5005 (package
5006 (name "zpp-serializer")
5007 (version "0.5")
5008 (source (origin
5009 (method git-fetch)
5010 (uri (git-reference
5011 (url "https://github.com/eyalz800/serializer")
5012 (commit (string-append "v" version))))
5013 (file-name (git-file-name name version))
5014 (sha256
5015 (base32
5016 "0cmk3xx9885zgg3g96ka6cdaibi10fbpf1bi7q8lqsli6z07x4zj"))))
5017 (build-system copy-build-system)
5018 (arguments
5019 (list
5020 #:install-plan #~'(("serializer.h" "include/zpp/"))))
5021 (home-page "https://github.com/eyalz800/serializer")
5022 (synopsis "Single header standard C++ serialization framework")
5023 (description "This package provides a single-header C++14 library for
5024saving and loading C++ objects using a binary format.")
5025 (license license:expat)))