all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#73867] [PATCH] gnu: Add clingo-lpx.
@ 2024-10-03  6:11 Liliana Marie Prikler
  2024-10-03  6:11 ` [bug#73866] [PATCH] gnu: Add clingcon Liliana Marie Prikler
  0 siblings, 1 reply; 2+ messages in thread
From: Liliana Marie Prikler @ 2024-10-03  6:11 UTC (permalink / raw)
  To: 73867

* gnu/packages/potassco.scm (clingo-lpx): New variable.
---
 gnu/packages/potassco.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/potassco.scm b/gnu/packages/potassco.scm
index 9f6b48f890..3465974fde 100644
--- a/gnu/packages/potassco.scm
+++ b/gnu/packages/potassco.scm
@@ -32,6 +32,7 @@ (define-module (gnu packages potassco)
   #:use-module (guix build-system emacs)
   #:use-module (guix build-system python)
   #:use-module (guix build-system pyproject)
+  #:use-module (gnu packages algebra)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages check)
   #:use-module (gnu packages cpp)
@@ -238,6 +239,42 @@ (define-public clingo-dl
 over difference logic.")
     (license license:expat)))
 
+(define-public clingo-lpx
+  (package
+    (name "clingo-lpx")
+    (version "1.3.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/potassco/clingo-lpx")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (modules '((guix build utils)))
+              (snippet
+               #~(begin
+                   (delete-file-recursively "third_party")))
+              (sha256
+               (base32
+                "1i184gy18k0mpqywbgziwl5wzkwwcdks81axndk4x6hjy878vhww"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list #:configure-flags #~(list "-DCLINGOLPX_BUILD_TESTS=on"
+                                     "-DPYCLINGOLPX_ENABLE=off")
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'patch-cmake
+                 (lambda _
+                   (substitute* "CMakeLists.txt"
+                     (("add_subdirectory\\(third_party\\)")
+                      "find_package(Catch2 3 REQUIRED)")))))))
+    (home-page "https://github.com/potassco/clingo-lpx")
+    (inputs (list clingo flint))
+    (native-inputs (list catch2-3))
+    (synopsis "Simplex solver")
+    (description "Clingo-LPX is an extension to Clingo that models constraints
+and goals over linear (in)equations.")
+    (license license:expat)))
+
 (define-public plasp
   (package
     (name "plasp")

base-commit: 061e0acd596262420facef7c2d1fc9cc4327d75a
-- 
2.46.0





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [bug#73866] [PATCH] gnu: Add clingcon.
  2024-10-03  6:11 [bug#73867] [PATCH] gnu: Add clingo-lpx Liliana Marie Prikler
@ 2024-10-03  6:11 ` Liliana Marie Prikler
  0 siblings, 0 replies; 2+ messages in thread
From: Liliana Marie Prikler @ 2024-10-03  6:11 UTC (permalink / raw)
  To: 73866

* gnu/packages/potassco.scm (clingcon): New variable.
---
 gnu/packages/potassco.scm | 41 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/potassco.scm b/gnu/packages/potassco.scm
index 3465974fde..ec990f1382 100644
--- a/gnu/packages/potassco.scm
+++ b/gnu/packages/potassco.scm
@@ -275,6 +275,47 @@ (define-public clingo-lpx
 and goals over linear (in)equations.")
     (license license:expat)))
 
+(define-public clingcon
+  (package
+    (name "clingcon")
+    (version "5.2.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/potassco/clingcon")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (modules '((guix build utils)))
+              (snippet
+               #~(begin
+                   (delete-file-recursively "third_party")))
+              (sha256
+               (base32
+                "0050qp5gpznigpm743br8yhjg62gl739xmzkfr70hlqm1xrj0sa7"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'patch-cmake
+                 (lambda _
+                   (substitute* "CMakeLists.txt"
+                     (("add_subdirectory\\(third_party\\)")
+                      "find_package(Catch2 3 REQUIRED)"))
+                   ;; We use libwide-integer as a header-only library, so there
+                   ;; is no library to link
+                   (substitute* "libclingcon/CMakeLists.txt"
+                     (("target_link_libraries\\(.* libwide-integer\\)" all)
+                      (string-append "#" all))))))))
+    (home-page "https://potassco.org/clingcon")
+    (inputs (list clingo wide-integer))
+    (native-inputs (list catch2-3))
+    (synopsis "Constraint answer set solver")
+    (description "Clingcon is an answer set solver for constraint logic
+It extends Clingo with constraint solving capacities for constraints over
+finite domain integer variables, using techniques from the area of SMT,
+like conflict-driven learning and theory propagation.")
+    (license license:expat)))
+
 (define-public plasp
   (package
     (name "plasp")
-- 
2.46.0





^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-10-18 18:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-03  6:11 [bug#73867] [PATCH] gnu: Add clingo-lpx Liliana Marie Prikler
2024-10-03  6:11 ` [bug#73866] [PATCH] gnu: Add clingcon Liliana Marie Prikler

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.