projects/guix·blob audio-team · refs

5439 lines · 213.1 KiB

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