From caa2352f39b318172fc1596dca44397e7c0995e5 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Wed, 25 Mar 2026 02:13:54 +0000 Subject: gnu: Add tinyformat. * gnu/packages/cpp.scm (tinyformat): New variable. Change-Id: Ief1692ba4be1d999d07a4468e982855366cc1062 --- gnu/packages/cpp.scm | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) (limited to 'gnu') diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index f9de2e49fdb..e554ba75fe7 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -28,7 +28,7 @@ ;;; Copyright © 2022-2024 Efraim Flashner ;;; Copyright © 2022 muradm ;;; Copyright © 2022 Attila Lendvai -;;; Copyright © 2022 Arun Isaac +;;; Copyright © 2022, 2026 Arun Isaac ;;; Copyright © 2022-2025 David Elsing ;;; Copyright © 2022-2024 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2022-2024, 2026 Maxim Cournoyer @@ -937,6 +937,44 @@ inspired by the @url{https://github.com/gruns/icecream, Python library} of the same name.") (license license:expat))) +(define-public tinyformat + (package + (name "tinyformat") + (version "2.3.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/c42f/tinyformat") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0j8bxrg7i4rn98iqpfh03krshgcbwh8hq8nm0p3sfdqpira3vi3y")))) + (build-system cmake-build-system) + (arguments + (list #:phases + #~(modify-phases %standard-phases + (replace 'install + (lambda _ + (install-file "../source/tinyformat.h" + (string-append #$output "/include"))))))) + (home-page "https://github.com/c42f/tinyformat") + (synopsis "Minimal, type-safe printf replacement library for C++") + (description "@code{tinyformat} is a type-safe @code{printf} replacement +library in a single C++ header file. Design goals include: + +@itemize +@item Type-safety and extensibility for user defined types +@item C99 @code{printf} compatibility, to the extent possible using +@code{std::ostream} +@item POSIX extension for positional arguments +@item Simplicity and minimalism; a single header file to include and +distribute with your projects +@item Augment rather than replace the standard stream formatting mechanism +@item C++98 support, with optional C++11 niceties +@end itemize") + (license license:boost1.0))) + (define-public google-highway (package (name "google-highway") -- cgit v1.2.3