projects/guix·blob librewolf-updates · refs

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