[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/15: gnu: Add fast-float.
From: |
guix-commits |
Subject: |
01/15: gnu: Add fast-float. |
Date: |
Sat, 15 Oct 2022 06:06:30 -0400 (EDT) |
lilyp pushed a commit to branch master
in repository guix.
commit afd853977a4872748960cd9a74e608509c856c45
Author: David Elsing <david.elsing@posteo.net>
AuthorDate: Thu Oct 13 21:04:10 2022 +0000
gnu: Add fast-float.
* gnu/packages/cpp.scm (fast-float-test-files, fast-float): New variables.
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
---
gnu/packages/cpp.scm | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 805413cc61..e8c3b29312 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -29,6 +29,7 @@
;;; Copyright © 2022 muradm <mail@muradm.net>
;;; Copyright © 2022 Attila Lendvai <attila@lendvai.name>
;;; Copyright © 2022 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2022 David Elsing <david.elsing@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1954,3 +1955,56 @@ std::wstring, etc).")
"This package provides architecture-specific implementations of the
CRC32C algorithm, which is specified in RFC 3720, section 12.1.")
(license license:bsd-3)))
+
+(define fast-float-test-files
+ (let ((commit "97a0b2e638feb479387554cf253e346500541e7e"))
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url (string-append "https://github.com/fastfloat"
+ "/supplemental_test_files.git"))
+ (commit "97a0b2e638feb479387554cf253e346500541e7e")))
+ (file-name (string-append "fast-float-test-files-"
+ (string-take commit 8)))
+ (sha256
+ (base32
+ "0dxbiyzyh7i847i89ablfzypfc3ckhm7f74w98jsh73v1mppmxlf")))))
+
+(define-public fast-float
+ (package
+ (name "fast-float")
+ (version "3.5.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/fastfloat/fast_float")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0z3rxxd0pwvw70dbnv63rm67biw829vdqf50y16isxm6g3sbrz8g"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:configure-flags #~(list "-DFASTFLOAT_TEST=ON"
+ "-DSYSTEM_DOCTEST=ON")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-cmake-tests
+ (lambda* (#:key inputs native-inputs #:allow-other-keys)
+ (substitute* "tests/CMakeLists.txt"
+ (("FetchContent_GetProperties\\(supplemental_test_files.*")
+ "")
+ (("if\\(NOT supplemental_test_files_POPULATED.*")
+ (string-append
+ "set(supplemental_test_files_BINARY_DIR "
+ (search-input-directory (or native-inputs inputs)
+ "data")
+ ")\nif(0)\n"))))))))
+ (native-inputs (list doctest fast-float-test-files))
+ (home-page "https://github.com/fastfloat/fast_float")
+ (synopsis "Floating point number parser for C++")
+ (description "@code{fast_float} is a header-only C++ library for parsing
+floating point numbers from strings. It implements the C++ from_chars
+functions for the float and double types.")
+ (license (list license:asl2.0 license:expat)))) ; dual licensed
- branch master updated (d923cf1dea -> 18f95f9335), guix-commits, 2022/10/15
- 01/15: gnu: Add fast-float.,
guix-commits <=
- 02/15: gnu: Add pocketfft-cpp., guix-commits, 2022/10/15
- 04/15: gnu: Add cbehave., guix-commits, 2022/10/15
- 07/15: gnu: Add sajson-for-gemmi., guix-commits, 2022/10/15
- 09/15: gnu: Add freesasa., guix-commits, 2022/10/15
- 05/15: gnu: Add tinydir., guix-commits, 2022/10/15
- 11/15: gnu: Add coordgenlibs., guix-commits, 2022/10/15
- 12/15: gnu: Add yaehmop., guix-commits, 2022/10/15
- 15/15: gnu: Add rdkit., guix-commits, 2022/10/15
- 03/15: gnu: Add sajson., guix-commits, 2022/10/15
- 08/15: gnu: Add gemmi., guix-commits, 2022/10/15