summary refs log tree commit diff
path: root/gnu/packages/engineering.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2023-01-07 14:49:25 +0100
committerMarius Bakke <marius@gnu.org>2023-01-07 21:04:27 +0100
commitaa861a3980ede130080ed492c62b097ee6f2caf7 (patch)
tree6cd6cd46184257d8979c8902bf553f8e1568fa0c /gnu/packages/engineering.scm
parentb9a886bbb3180ded9fa5e51070d9a138b83344b1 (diff)
downloadguix-aa861a3980ede130080ed492c62b097ee6f2caf7.tar.gz
gnu: python-capstone: Fix tests.
* gnu/packages/engineering.scm (python-capstone)[arguments]: Override check
phase.  While here, remove label usage in chdir-and-fix-setup-py phase.
Diffstat (limited to 'gnu/packages/engineering.scm')
-rw-r--r--gnu/packages/engineering.scm11
1 files changed, 8 insertions, 3 deletions
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index a92530d019..99ae61973d 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1629,7 +1629,7 @@ bindings for Python, Java, OCaml and more.")
      `(#:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'chdir-and-fix-setup-py
-           (lambda _
+           (lambda* (#:key inputs #:allow-other-keys)
              (chdir "bindings/python")
              ;; Do not build the library again, because we already have it.
              (substitute* "setup.py" ((".*   build_libraries.*") ""))
@@ -1637,8 +1637,13 @@ bindings for Python, Java, OCaml and more.")
              ;; library.
              (substitute* "capstone/__init__.py"
                (("pkg_resources.resource_filename.*")
-                (string-append "'" (assoc-ref %build-inputs "capstone") "/lib',\n")))
-             #t)))))))
+                (string-append "'" (dirname (search-input-file
+                                             inputs "lib/libcapstone.so"))
+                               "',\n")))))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "make" "check")))))))))
 
 
 (define-public python-esptool-3.0