Subject: [bug#78246] [PATCH 3/3] gnu: Add bitwuzla.

From: [email-masked]
Date: Sun, 4 May 2025 19:40:28 +0200

From: Sören Tempel <[email-masked]>

* gnu/packages/maths.scm (bitwuzla): New variable.
---
 gnu/packages/maths.scm | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 572912ca82..09ce6bcb7c 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -8274,6 +8274,44 @@ (define-public symfpu
       (home-page "https://github.com/martin-cs/symfpu")
       (license license:gpl3))))
 
+(define-public bitwuzla
+  (package
+    (name "bitwuzla")
+    (version "0.7.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/bitwuzla/bitwuzla")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1fpd1kgb5xdbcjiqbbc6j0b8g2ly9bp9m3la78fiayl4qlmsvh2b"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:configure-flags '("-Dtesting=enabled" "-Ddefault_library=shared"
+                           "-Dkissat=true")
+       #:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'make-git-optional
+                    (lambda _
+                      (substitute* "src/meson.build"
+                        (("run_command\\('git',")
+                         "run_command('sh', '-c', 'git',")))))))
+    (native-inputs (list pkg-config
+                         googletest
+                         python
+                         gmp
+                         cadical
+                         symfpu
+                         kissat))
+    (synopsis "SMT solver optimized for the theory of bit-vectors")
+    (description
+     "@acronym{SMT, Satisfiability Modulo Theories} solver for the
+theories of fixed-size bit-vectors, floating-point arithmetic, arrays,
+uninterpreted functions and their combinations.")
+    (home-page "https://bitwuzla.github.io/")
+    (license license:expat)))
+
 (define-public z3
   (package
     (name "z3")