summary refs log tree commit diff
path: root/gnu/packages/maths.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2022-08-27 17:10:55 +0200
committerMarius Bakke <marius@gnu.org>2022-08-27 17:10:55 +0200
commitad384816fe260be98bc53701d9d761197ef162fc (patch)
treeff06eb12983b7cbd972c3153404bb3952e2f28c0 /gnu/packages/maths.scm
parentd08411ffd0a36a6b67a238be69d32c9f74101389 (diff)
parentfb3d90b8f31c4b1e2e3d427544c6610f3fe1ce55 (diff)
downloadguix-ad384816fe260be98bc53701d9d761197ef162fc.tar.gz
Merge branch 'staging' into core-updates
Diffstat (limited to 'gnu/packages/maths.scm')
-rw-r--r--gnu/packages/maths.scm64
1 files changed, 64 insertions, 0 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 47d19eaadf..5f03f4aa2c 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1824,6 +1824,12 @@ the resulting text.")
     (arguments `(#:tests? #f ; Tests require googletest *sources*
                  #:phases
                  (modify-phases %standard-phases
+                   (add-after 'install 'delete-formulas-log
+                     ;; Contains date and timing information which is unreproducible,
+                     ;; and should not be needed when using the package
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let ((out (assoc-ref outputs "out")))
+                         (delete-file (string-append out "/share/doc/itpp/html/_formulas.log")))))
                    (add-after 'unpack 'set-man-page-date
                      (lambda _
                        (substitute* "itpp-config.1.cmake.in"
@@ -7312,6 +7318,64 @@ researchers and developers alike to get started on SAT.")
        "http://minisat.se/MiniSat.html")
       (license license:expat))))
 
+(define-public kissat
+  (package
+    (name "kissat")
+    (version "3.0.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/arminbiere/kissat")
+             (commit (string-append "rel-" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "04x4w760srbdi4zci0s747qxk717x5d2x59ixraxh5104s9nyn8b"))))
+    (build-system gnu-build-system)
+    (inputs (list xz gzip lzip bzip2 p7zip))
+    (arguments
+     (list
+      #:test-target "test"
+      #:configure-flags #~(list "-shared")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-source
+            (lambda* (#:key inputs #:allow-other-keys)
+              (substitute* "src/file.c"
+                (("(bzip2|gzip|lzma|xz) -c" all cmd)
+                 (string-append (search-input-file inputs
+                                                   (string-append "bin/" cmd))
+                                " -c"))
+                (("7z ([ax])" all mode)
+                 (string-append (search-input-file inputs "bin/7z")
+                                " " mode))
+                ;; Since we hard-coded the paths, we no longer need to find
+                ;; them.
+                (("bool found = kissat_find_executable \\(name\\);")
+                 "bool found = true;"))
+              (substitute* "test/testmain.c"
+                ;; SIGINT is ignored inside invoke.
+                (("^SIGNAL\\(SIGINT\\)") ""))))
+          (replace 'configure
+            (lambda* (#:key configure-flags #:allow-other-keys)
+              ;; The configure script does not support standard GNU options.
+              (apply invoke "./configure" configure-flags)))
+          (replace 'install
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              (let ((out (assoc-ref outputs "out")))
+                (install-file "build/kissat" (string-append out "/bin"))
+                (install-file "build/libkissat.so" (string-append out "/lib"))
+                (install-file "src/kissat.h"
+                              (string-append out "/include"))))))))
+    (home-page "https://github.com/arminbiere/kissat")
+    (synopsis "Bare-metal SAT solver")
+    (description
+     "Kissat is a bare-metal SAT-solver written in C.  It is a port of CaDiCaL
+back to C with improved data structures, better scheduling of inprocessing and
+optimized algorithms and implementation.")
+    (license license:expat)))
+
 (define-public libqalculate
   (package
     (name "libqalculate")