summaryrefslogtreecommitdiff
path: root/gnu/packages/cpp.scm
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2025-05-28 14:04:57 +0200
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2025-06-06 22:39:02 +0200
commitb32a47f26c8ea6b7cb7ade944f0251cb59b87178 (patch)
tree959bb66609fdc07d824ebcc7066fc5573c271fae /gnu/packages/cpp.scm
parenteb5ae31d17a7924202ba78621c6e696e7f3d5c81 (diff)
gnu: Add scn.
* gnu/packages/patches/scn-fast-float-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it here. * gnu/packages/cpp.scm (scn): New variable.
Diffstat (limited to 'gnu/packages/cpp.scm')
-rw-r--r--gnu/packages/cpp.scm28
1 files changed, 28 insertions, 0 deletions
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 39596bd54f..461070c520 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -1719,6 +1719,34 @@ code and retrieving their output.")
(home-page "https://github.com/DaanDeMeyer/reproc")
(license license:expat)))
+(define-public scn
+ (package
+ (name "scn")
+ (version "4.0.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/eliaskosunen/scnlib")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (patches (search-patches "scn-fast-float-compat.patch"))
+ (sha256
+ (base32 "0lnb9r004y75n4s4pd3k58cdcjpcylhdgr5phwja713g3dd40im8"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list #:configure-flags #~(list "-DSCN_USE_EXTERNAL_GTEST=yes"
+ "-DSCN_USE_EXTERNAL_BENCHMARK=yes"
+ "-DSCN_USE_EXTERNAL_FAST_FLOAT=yes"
+ "-DBUILD_SHARED_LIBS=yes")))
+ (propagated-inputs (list fast-float))
+ (native-inputs (list googletest googlebenchmark))
+ (home-page "https://scnlib.dev/")
+ (synopsis "Type-safe text parsing library")
+ (description "@code{scn} is a text parsing library for C++. It can
+be used as a safe alternative to @code{scanf} or as a fast alternative to
+@code{IOStreams}, analogous to @code{fmt}.")
+ (license license:asl2.0)))
+
(define-public sobjectizer
(package
(name "sobjectizer")