projects/guix·blob python-team · refs

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