diff options
author | Fis Trivial <ybbs.daans@hotmail.com> | 2018-05-28 08:10:26 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-05-28 13:48:52 +0200 |
commit | 385357c0d7ebdb7102133095de1667f43ad00116 (patch) | |
tree | de4e65fb3f330bce9f65f8ef561027076a8d1a3e /gnu/packages/cpp.scm | |
parent | ad8a4d6dc8de0576640ff78b4f3e4307ec9fa25c (diff) | |
download | guix-385357c0d7ebdb7102133095de1667f43ad00116.tar.gz |
gnu: Add fifo-map.
* gnu/packages/cpp.scm (fifo-map): New variable. * gnu/packages/patches/fifo-map-fix-flags-for-gcc.patch: New file. * gnu/packages/patches/fifo-map-remove-catch.hpp.patch: New file. * gnu/local.mk: Add new patch files. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/cpp.scm')
-rw-r--r-- | gnu/packages/cpp.scm | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 80ffc1ea2c..2caf6af4d3 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -151,3 +151,47 @@ the same arithmetic operators as for single values. It also provides accelerated implementation of common mathematical functions operating on batches.") (license license:bsd-3))) + +(define-public fifo-map + (let* ((commit "0dfbf5dacbb15a32c43f912a7e66a54aae39d0f9") + (revision "0") + (version (git-version "1.1.1" revision commit))) + (package + (name "fifo-map") + (version version) + (home-page "https://github.com/nlohmann/fifo_map") + (source (origin + (method git-fetch) + (uri (git-reference + (url home-page) + (commit commit))) + (sha256 + (base32 + "0pi77b75kp0l7z454ihcd14nzpi3nc5m4nyjbsgy5f9bw3676196")) + (patches (search-patches "fifo-map-remove-catch.hpp.patch" + "fifo-map-fix-flags-for-gcc.patch")) + (file-name (git-file-name name version)) + (modules '((guix build utils))) + (snippet '(delete-file-recursively "./test/thirdparty")))) + (native-inputs + `(("catch2" ,catch-framework2))) + (build-system cmake-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda _ + (invoke "./unit"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (inc (string-append out "/include/fifo_map"))) + (with-directory-excursion + (string-append "../" ,name "-" ,version "-checkout") + (install-file "src/fifo_map.hpp" inc) + #t))))))) + (synopsis "FIFO-ordered associative container for C++") + (description "Fifo_map is a C++ header only library for associative +container which uses the order in which keys were inserted to the container +as ordering relation.") + (license license:expat)))) |