aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2024-07-19 14:38:38 +0200
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2024-07-27 11:25:23 +0200
commitd3e2b68e380d4e7c514f9f1cdaec60b3013e9c08 (patch)
treebb3c741a46798c973cf8ff0de2e886834a27ff1b
parentc6ff1d6ff761af0bd9bac5403fd834f04a14a192 (diff)
downloadguix-d3e2b68e380d4e7c514f9f1cdaec60b3013e9c08.tar.gz
guix-d3e2b68e380d4e7c514f9f1cdaec60b3013e9c08.zip
gnu: Add python-asprin.
* gnu/packages/potassco.scm (python-asprin): New variable.
-rw-r--r--gnu/packages/potassco.scm37
1 files changed, 37 insertions, 0 deletions
diff --git a/gnu/packages/potassco.scm b/gnu/packages/potassco.scm
index 5432fc10c3..fe56d1e8b8 100644
--- a/gnu/packages/potassco.scm
+++ b/gnu/packages/potassco.scm
@@ -430,6 +430,43 @@ Python code.")))
as a theory to clingo from Python code. It also supports running clingo-dl
directly from the python command line.")))
+(define-public python-asprin
+ (let ((revision "1")
+ (commit "bc5a0cf7d9ba346cf91cba66282b5946dbf1331c"))
+ (package
+ (name "python-asprin")
+ (version (git-version "3.1.1" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/potassco/asprin")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0rf8yjdlpkvzp9917fvhfrrzag47vvfm7j2k5g44w1ggqyrz8fps"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-source
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "asprin/src/solver/metasp/reify.py"
+ (("\"clingo\"")
+ (string-append "\""
+ (search-input-file inputs "bin/clingo")
+ "\""))))))))
+ (inputs (list clingo))
+ (propagated-inputs (list python-clingo))
+ (home-page "https://potassco.org/")
+ (synopsis "Optimization in Answer Set Programming")
+ (description "@command{asprin} is a general framework for optimization in
+@acronym{ASP, Answer Set Programming}, that allows for computing optimal
+stable models of logic programs by means of preferences. Some preference types
+are already predefined, but more can be added as logic programs.")
+ (license license:expat))))
+
(define-public python-clorm
(package
(name "python-clorm")