summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2021-09-25 13:16:42 +0200
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2021-10-24 20:25:02 +0200
commit2dfc574b13908d016895b48a7eab8cf1e1b35abf (patch)
treef46d3adfc14b0848b6fc392a52f53ce9a97d16d6 /gnu
parent92d3f2673e62c6cf5c16e05cb28a1be338bf2161 (diff)
gnu: Add clasp.
* gnu/packages/maths.scm (clasp): New variable.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/maths.scm43
1 files changed, 43 insertions, 0 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index fa94679ae3..2f2c43cb0a 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -2243,6 +2243,49 @@ Furthermore, it comes with the tool @command{lpconvert} that converts either
between aspif and smodels format or to a human-readable text format.")
(license license:expat))))
+(define-public clasp
+ (package
+ (name "clasp")
+ (version "3.3.6")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/potassco/clasp")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0rahqiq530jckvx717858h1q5p8znp1kb6sjm95p8blkr4n3pvmj"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:configure-flags '("-DCLASP_BUILD_TESTS=on"
+ "-DCLASP_INSTALL_LIB=on"
+ "-DCLASP_USE_LOCAL_LIB_POTASSCO=off"
+ "-DBUILD_SHARED_LIBS=on")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-cmake
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ ;; Use lowercase to be consistent with libpotassco
+ (("\"cmake/Clasp\"") "\"cmake/clasp\"")
+ (("ClaspConfig\\.cmake") "clasp-config.cmake")
+ (("ClaspConfigVersion\\.cmake")
+ "clasp-config-version.cmake"))
+ (substitute* "cmake/ClaspConfig.cmake.in"
+ (("find_package\\(Potassco") "find_package(potassco"))
+ (rename-file "cmake/ClaspConfig.cmake.in"
+ "cmake/clasp-config.cmake.in"))))))
+ (inputs
+ `(("libpotassco" ,libpotassco)))
+ (home-page "https://potassco.org/")
+ (synopsis "Answer set solver")
+ (description "clasp is an answer set solver for (extended) normal and
+disjunctive logic programs. The primary algorithm of clasp relies on
+conflict-driven nogood learning, a technique that proved very successful for
+satisfiability checking (SAT).")
+ (license license:expat)))
+
(define-public ceres
(package
(name "ceres-solver")