diff mbox series

[bug#63065,03/18] gnu: Add function2.

Message ID zS8cOdw49oBhjoMbhbeBvy8HF2hzUQ4rx_ZhoVZaJkyTXoHWsjAF5iGvC_eDx16wrVn2DxHs0KzeEkxdMhXjZHCRkMvsdej9DMHOkBGqMWQ=@proton.me
State New
Headers show
Series : gnu: Add yabridgectl. | expand

Commit Message

Sughosha April 25, 2023, 9:27 a.m. UTC
* gnu/packages/cpp.scm (function2): New variable.
---
 gnu/packages/cpp.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 699d0cacb1..44d99b0724 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -2006,6 +2006,36 @@  (define-public bitsery
     (home-page "https://github.com/fraillt/bitsery")
     (license license:expat)))
 
+(define-public function2
+  (package
+    (name "function2")
+    (version "4.2.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/Naios/function2")
+                    (commit version)))
+              (sha256
+               (base32
+                "1n5cgx3ab5ywad3hb350r6lg6h0sj5qph6r5cvdxmfk638pp3rlb"))))
+    (build-system cmake-build-system)
+    ;; TODO: Patch or substitute to detect system gtest.
+    (arguments
+     (list #:tests? #f ;No SOURCES given to target: gtest
+           #:configure-flags #~(list "-DBUILD_TESTING=OFF")))
+    ;; (native-inputs (list googletest))
+    (synopsis "Improved implementations of std::function")
+    (description "This package provides the following implementations of
+std::function:
+@itemize
+@item copyable fu2::function
+@item move-only fu2::unique_function (capable of holding move only types)
+@item non-owning fu2::function_view (capable of referencing callables in a non
+owning way)
+@end itemize")
+    (home-page "https://naios.github.io/function2/")
+    (license license:boost1.0)))
+
 (define-public cpp-mustache
   (package
     (name "cpp-mustache")