@@ -38,7 +38,7 @@
;;; Copyright © 2023 Liliana Marie Prikler <liliana.prikler@gmail.com>
;;; Copyright © 2023 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
-;;; Copyright © 2023 Paul A. Patience <paul@apatience.com>
+;;; Copyright © 2023-2024 Paul A. Patience <paul@apatience.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -3048,3 +3048,29 @@ (define-public tl-optional
the std::optional for C++11/14/17, with support for monadic operations added in
C++23.")
(license license:cc0)))
+
+(define-public debug-assert
+ ;; Newer version than last release, which was in 2018, is required for
+ ;; type_safe.
+ (let ((commit "d33781479baccf52a28e5c3c5a6da5ac59b09179")
+ (revision "0"))
+ (package
+ (name "debug-assert")
+ (version (git-version "1.3.3" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/foonathan/debug_assert")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0njbzx767pndpl8hq5falr4c8m0xsr6njh0943xf8xkcqq6splpz"))))
+ (build-system cmake-build-system)
+ (arguments (list #:tests? #f)) ; no tests
+ (home-page "https://github.com/foonathan/debug_assert")
+ (synopsis "Assertion macro for C++")
+ (description "debug_assert is a C++11 header-only library which provides the
+@code{DEBUG_ASSERT()} macro, which among other features can be selectively
+enabled in different parts of your code.")
+ (license license:zlib))))