diff mbox series

[bug#59799,v2,2/2] gnu: Add scasp.

Message ID fdac1ff8cd92f5109ae5fab674ee7057c912d745.camel@gmail.com
State New
Headers show
Series None | expand

Commit Message

Liliana Marie Prikler Dec. 3, 2022, 9:18 a.m. UTC
* gnu/packages/maths.scm (scasp): New variable.
---
 gnu/packages/maths.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

Comments

Liliana Marie Prikler March 12, 2023, 8:15 a.m. UTC | #1
Am Samstag, dem 03.12.2022 um 10:18 +0100 schrieb Liliana Marie
Prikler:
> * gnu/packages/maths.scm (scasp): New variable.
> ---
Pushed, but I'm leaving this open to get CI gears turning and actually
report errors.
Liliana Marie Prikler March 12, 2023, 1:09 p.m. UTC | #2
Am Sonntag, dem 12.03.2023 um 09:15 +0100 schrieb Liliana Marie
Prikler:
> Am Samstag, dem 03.12.2022 um 10:18 +0100 schrieb Liliana Marie
> Prikler:
> > * gnu/packages/maths.scm (scasp): New variable.
> > ---
> Pushed, but I'm leaving this open to get CI gears turning and
> actually report errors.
CI hath spoken: swi-prolog fails for i686, but so it does on staging
where it's still on an older version.  The other builds seem to
succeed.

Cheers
diff mbox series

Patch

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index a7497f1d2f..238352f278 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -89,6 +89,7 @@  (define-module (gnu packages maths)
   #:use-module ((guix build utils) #:select (alist-replace))
   #:use-module (guix build-system ant)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system meson)
@@ -153,6 +154,7 @@  (define-module (gnu packages maths)
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages popt)
   #:use-module (gnu packages perl)
+  #:use-module (gnu packages prolog)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
@@ -2804,6 +2806,41 @@  (define-public python-telingo
 logic programs based on clingo.")
     (license license:expat)))
 
+(define-public scasp
+  (let ((commit "89a427aa04ec6346425a40111c99b310901ffe51")
+        (revision "1"))
+    (package
+      (name "scasp")
+      (version (git-version "0.21.11.26" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/SWI-Prolog/sCASP")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "1ijqv9xr3imrdmz6nq7zqwsmmaxn638icig19m8900m7mjfpizs4"))))
+      (build-system copy-build-system)
+      (arguments
+       (list
+        #:install-plan #~`(("scasp" "bin/")
+                           ("prolog" "lib/swipl/library"))
+        #:modules `((guix build copy-build-system)
+                    ((guix build gnu-build-system) #:prefix gnu:)
+                    (guix build utils)
+                    (ice-9 regex))
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-before 'install 'build (assoc-ref gnu:%standard-phases 'build))
+            (add-after 'build 'check (assoc-ref gnu:%standard-phases 'check)))))
+      (native-inputs (list swi-prolog))
+      (home-page "https://github.com/SWI-Prolog/sCASP")
+      (synopsis "Interpreter for ASP programs with constraints")
+      (description "@code{s(CASP)} is a top-down interpreter for ASP programs
+with constraints.")
+      (license license:asl2.0))))
+
 (define-public ceres
   (package
     (name "ceres-solver")