From: Liliana Marie Prikler <liliana.prikler@gmail.com>
To: 57181@debbugs.gnu.org
Cc: mail@maxheisinger.at
Subject: [bug#57181] [PATCH v2 2/4] gnu: Add lingeling.
Date: Sat, 15 Oct 2022 16:45:44 +0200 [thread overview]
Message-ID: <435c49a1276da39ff1b2a2a6f125f09f2d492ae2.camel@gmail.com> (raw)
In-Reply-To: <923508243.78855.1660404889221@ox93.mailbox.org>
* gnu/packages/maths.scm (lingeling): New variable.
---
gnu/packages/maths.scm | 82 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 82 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 1e9d7b8be8..5c8a0fe2ef 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -7429,6 +7429,88 @@ (define-public aiger
(license (list license:expat
license:bsd-3)))) ; blif2aig
+(define-public lingeling
+ (let ((commit "72d2b13eea5fbd95557a3d0d199cd98dfbdc76ee")
+ (revision "1"))
+ (package
+ (name "lingeling")
+ (version (git-version "sc2022" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/arminbiere/lingeling")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "16s30x8s2cw6icchwm65zj56ph4qwz6i07g3hwkknvajisvjq85c"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:test-target "test"
+ #:modules `((ice-9 match)
+ ,@%gnu-build-system-modules)
+ #:configure-flags #~(list "--aiger=.")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'unpack-aiger
+ (lambda* (#:key inputs #:allow-other-keys)
+ (invoke #$(ar-for-target) "x"
+ (search-input-file inputs "lib/libaiger.a")
+ "aiger.o")
+ (copy-file
+ (search-input-file inputs "include/aiger/aiger.h")
+ "aiger.h")))
+ (add-after 'unpack 'hard-code-commit
+ (lambda _
+ (substitute* "mkconfig.sh"
+ (("`\\./getgitid`") #$commit))))
+ (add-after 'unpack 'patch-source
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* (list "treengeling.c" "lgldimacs.c")
+ (("\"(gunzip|xz|bzcat|7z)" all cmd)
+ (string-append
+ "\""
+ (search-input-file inputs (string-append "bin/" cmd)))))))
+ (replace 'configure
+ (lambda* (#:key configure-flags #:allow-other-keys)
+ (apply invoke "./configure.sh" configure-flags)))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((bin (string-append (assoc-ref outputs "out")
+ "/bin")))
+ (mkdir-p bin)
+ (for-each
+ (lambda (file)
+ (install-file file bin))
+ '("blimc" "ilingeling" "lglddtrace" "lglmbt"
+ "lgluntrace" "lingeling" "plingeling"
+ "treengeling")))))
+ (add-after 'install 'wrap-path
+ (lambda* (#:key outputs #:allow-other-keys)
+ (with-directory-excursion (string-append
+ (assoc-ref outputs "out")
+ "/bin")
+ (for-each
+ (lambda (file)
+ (wrap-program
+ file
+ '("PATH" suffix
+ #$(map (lambda (input)
+ (file-append (this-package-input input) "/bin"))
+ '("gzip" "bzip2" "xz" "p7zip")))))
+ ;; These programs use sprintf on buffers with magic
+ ;; values to construct commands (yes, eww), so we
+ ;; can't easily substitute* them.
+ '("lglddtrace" "lgluntrace" "lingeling" "plingeling"))))))))
+ (inputs (list `(,aiger "static") gzip bzip2 xz p7zip))
+ (home-page "http://fmv.jku.at/lingeling")
+ (synopsis "SAT solver")
+ (description "This package provides a range of SAT solvers, including
+the sequential @command{lingeling} and its parallel variants
+@command{plingeling} and @command{treengeling}. A bounded model checker is
+also included.")
+ (license license:expat))))
+
(define-public libqalculate
(package
(name "libqalculate")
--
2.38.0
next prev parent reply other threads:[~2022-10-15 14:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-13 15:34 [bug#57181] [PATCH] gnu: maths: Add newer SAT solvers cryptominisat5 and kissat Maximilian Heisinger
2022-10-15 14:45 ` [bug#57181] [PATCH v2 1/4] gnu: Add aiger Liliana Marie Prikler
2022-10-15 14:45 ` Liliana Marie Prikler [this message]
2022-10-15 14:46 ` [bug#57181] [PATCH v2 3/4] gnu: Add louvain-community Liliana Marie Prikler
2022-10-15 14:47 ` [bug#57181] [PATCH v2 4/4] gnu: Add cryptominisat Liliana Marie Prikler
2022-11-26 13:15 ` bug#57181: " Liliana Marie Prikler
2022-11-27 17:48 ` [bug#57181] " Maximilian Heisinger
[not found] <db92dd9dd2a11a9c6dd576e898491a96ab43dba3.camel@maxheisinger.at>
2022-08-13 20:05 ` [bug#57181] [PATCH] gnu: maths: Add newer SAT solvers cryptominisat5 and kissat Liliana Marie Prikler
[not found] ` <1840023126.104586.1660505267957@ox93.mailbox.org>
2022-08-14 22:07 ` Liliana Marie Prikler
2022-08-15 10:50 ` Maximilian Heisinger
2022-08-15 13:27 ` Liliana Marie Prikler
2022-08-17 6:26 ` mail
2022-08-17 20:16 ` Liliana Marie Prikler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=435c49a1276da39ff1b2a2a6f125f09f2d492ae2.camel@gmail.com \
--to=liliana.prikler@gmail.com \
--cc=57181@debbugs.gnu.org \
--cc=mail@maxheisinger.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).