guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/15: gnu: Add wide-integer.


From: guix-commits
Subject: 01/15: gnu: Add wide-integer.
Date: Sat, 2 Mar 2024 02:06:45 -0500 (EST)

lilyp pushed a commit to branch master
in repository guix.

commit d1ecd3c67cddb31ab8bbe3a20529d7dc825157fc
Author: Liliana Marie Prikler <liliana.prikler@gmail.com>
AuthorDate: Sat Feb 24 07:56:54 2024 +0100

    gnu: Add wide-integer.
    
    * gnu/packages/cpp.scm (wide-integer): New variable.
---
 gnu/packages/cpp.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index a4b2b9351c..3b65ce9f4a 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -2704,6 +2704,37 @@ addition and subtraction for all combinations of signed 
and unsigned 32-bit and
 64-bit integers.")
     (license license:expat)))
 
+(define-public wide-integer
+  (let ((commit "22b8428746248e682d5276f8e8b7fb52af73ea47")
+        (revision "1314"))              ; commit count
+   (package
+    (name "wide-integer")
+    (version (git-version "0" revision commit))
+    (source (origin
+             (method git-fetch)
+             (uri (git-reference
+                   (url "https://github.com/ckormanyos/wide-integer";)
+                   (commit commit)))
+             (file-name (git-file-name name version))
+             (sha256
+              (base32 "0bhjnbdcphv5kddddh8kpwjpjix23m12vmfsz0r6wjc5d27md33z"))
+             (modules '((guix build utils)))
+             (snippet #~(substitute* "CMakeLists.txt"
+                          (("WideIntegerTargets") "wide-integer-targets")
+                          (("WideIntegerConfig") "wide-integer-config")
+                          (("WideInteger") "wide-integer")))))
+    (build-system cmake-build-system)
+    (native-inputs (list boost))
+    (home-page "https://github.com/ckormanyos/wide-integer";)
+    (synopsis "C++ template for arbitrary-precision integers")
+    (description "This package implements a generic template for extended
+width signed and unsigned integral types.  Up to 63 limbs of any built-in
+integer type are supported, and can be used to build powers of two like
+int128_t, uint256_t, but also somewhat esoteric types such as int24_t,
+uint80_t, or uint1536_t.  The provided types can be used in much the same
+way as basic integer types.")
+    (license license:boost1.0))))
+
 (define-public wdl
   ;; No tag is available.
   (let ((commit "da86a62d11e46e4ecd8b16f9775cb5188340a0e2")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]