aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/potassco.scm
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2024-06-29 08:53:54 +0200
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2024-07-07 08:04:47 +0200
commit3ed077e92cebe4286eeecf372722690eb5c9a8aa (patch)
treee40b319d6d6c47c0f5e1c1e275e766dcb7bb403c /gnu/packages/potassco.scm
parent8546ca946e617c32ef3bb60947e368f7d038090c (diff)
downloadguix-3ed077e92cebe4286eeecf372722690eb5c9a8aa.tar.gz
guix-3ed077e92cebe4286eeecf372722690eb5c9a8aa.zip
gnu: clasp: Prevent ID clashes in dependent packages.
Clasp uses an interesting CRTP pattern to insert statically (i.e. compile-time) generated numeric IDs into global fields. However, these templates are instantiated once per shared library---thus, whenever a library is linked, new IDs are generated, and the original intent (safely type-casting objects across libraries) is lost. To help the linker out, we make sure that these IDs are only instantiated in clasp and not when building other libraries. * gnu/packages/patches/clasp-hide-event-ids.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it here. * gnu/packages/clasp.scm (source)[patches]: Add it here. (clingo)[#:phases]: Drop ‘skip-failing-tests’. (python-clorm)[#:phases]<fix-breaking-tests>: Adjust accordingly. (python-clintest): Drop arguments.
Diffstat (limited to 'gnu/packages/potassco.scm')
-rw-r--r--gnu/packages/potassco.scm31
1 files changed, 3 insertions, 28 deletions
diff --git a/gnu/packages/potassco.scm b/gnu/packages/potassco.scm
index b7cfca2eec..5432fc10c3 100644
--- a/gnu/packages/potassco.scm
+++ b/gnu/packages/potassco.scm
@@ -112,6 +112,7 @@ between aspif and smodels format or to a human-readable text format.")
(url "https://github.com/potassco/clasp")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
+ (patches (search-patches "clasp-hide-event-ids.patch"))
(sha256
(base32
"0qap7rar8a5mkqz28n2hnvr4cfv5x0rh4zs3wdp919dw4d034chr"))))
@@ -200,22 +201,7 @@ satisfiability checking (SAT).")
(substitute* "cmake/ClingoConfig.cmake.in"
(("find_package\\(Clasp") "find_package(clasp"))
(rename-file "cmake/ClingoConfig.cmake.in"
- "cmake/clingo-config.cmake.in")))
- (add-after 'unpack 'skip-failing-tests
- (lambda _
- (with-directory-excursion "libclingo/tests"
- (substitute* "CMakeLists.txt"
- (("COMMAND test_clingo" all)
- (string-append all
- " -f "
- "\"${CMAKE_CURRENT_SOURCE_DIR}/good.txt\"")))
- (call-with-output-file "good.txt"
- (lambda (port)
- (for-each (lambda (test) (format port "~s~%" test))
- '("parse-ast-v2" "add-ast-v2" "build-ast-v2"
- "unpool-ast-v2" "parse_term"
- "propagator" "propgator-sequence-mining"
- "symbol" "visitor"))))))))))
+ "cmake/clingo-config.cmake.in"))))))
(inputs (list catch2-3 clasp libpotassco))
(native-inputs (list bison re2c
mpark-variant
@@ -465,10 +451,7 @@ directly from the python command line.")))
(lambda _
;; noclingo tests rely on this being set
(setenv "CLORM_NOCLINGO" "1")
- (delete-file "tests/test_mypy_query.py")
- (substitute* "tests/test_clingo.py"
- (("self\\.assertTrue\\(os_called\\)" all)
- (string-append "# " all))))))))
+ (delete-file "tests/test_mypy_query.py"))))))
(propagated-inputs (list python-clingo))
(native-inputs (list python-typing-extensions))
(home-page "https://potassco.org")
@@ -627,14 +610,6 @@ which allows user interfaces to be specified entirely as a logic program.")
(base32
"0xzbby9ram55h87ykm652kgm45b8rlhbjc8gjkz308h1jnjllmmy"))))
(build-system pyproject-build-system)
- (arguments
- (list #:phases
- #~(modify-phases %standard-phases
- (add-after 'unpack 'delete-failing-tests
- (lambda _
- ;; XXX: Clingo statistics are broken in dependencies already.
- (for-each delete-file '("tests/test_solver.py"
- "tests/test_test.py")))))))
(inputs (list python-clingo))
(native-inputs (list python-pytest))
(home-page "https://potassco.org/clintest/")