summary refs log tree commit diff
path: root/gnu/packages/python-xyz.scm
diff options
context:
space:
mode:
authorSören Tempel <soeren@soeren-tempel.net>2024-07-11 23:27:19 +0200
committerjgart <jgart@dismail.de>2024-07-13 09:59:23 -0500
commit0fc16f1b0efce66a62a071ed9e5731a44b5cd323 (patch)
tree27cec6ca28b9e835115e729470abe0a088a107d4 /gnu/packages/python-xyz.scm
parentc31c325a12566a4f2c274a4d23c3b0089f210b43 (diff)
downloadguix-0fc16f1b0efce66a62a071ed9e5731a44b5cd323.tar.gz
gnu: Add python-pyvex.
* gnu/packages/patches/python-pyvex-remove-angr-dependency.patch:
New patch.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/python-xyz.scm (python-pyvex): New variable.

Signed-off-by: jgart <jgart@dismail.de>
Diffstat (limited to 'gnu/packages/python-xyz.scm')
-rw-r--r--gnu/packages/python-xyz.scm37
1 files changed, 37 insertions, 0 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 6fbd34dbd5..3c1aa72900 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -200,6 +200,7 @@
   #:use-module (gnu packages docker)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages elf)
+  #:use-module (gnu packages emulators)
   #:use-module (gnu packages enchant)
   #:use-module (gnu packages file)
   #:use-module (gnu packages fonts)
@@ -33790,6 +33791,42 @@ instructions up to AVX-512 and SHA (including 3dnow!+, XOP, FMA3, FMA4, TBM
 and BMI2).")
       (license license:bsd-2))))
 
+(define-public python-pyvex
+  (package
+    (name "python-pyvex")
+    ;; Must be the same version as python-angr.
+    (version "9.2.46")
+    (source
+     (origin
+       (method url-fetch)
+       (patches (search-patches "python-pyvex-remove-angr-dependency.patch"))
+       (uri (pypi-uri "pyvex" version))
+       (sha256
+        (base32 "1v64rn7gxy6fg065bgsy38z6r494k5ri5r6sn4g08hjj32ihx1ka"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:phases #~(modify-phases %standard-phases
+                   (replace 'check
+                     (lambda* (#:key tests? #:allow-other-keys)
+                       (when tests?
+                         (with-directory-excursion "tests"
+                           (invoke "python" "-m" "unittest")))))
+
+                   (add-before 'build 'set-cc-native
+                     (lambda _
+                       (setenv "CC" #$(cc-for-target))
+                       (setenv "CC_NATIVE" "gcc"))))))
+    (propagated-inputs (list python-archinfo python-bitstring python-cffi))
+    (home-page "https://github.com/angr/pyvex")
+    (synopsis "Python interface to libVEX and VEX IR")
+    (description
+     "This package provides a Python interface the libVEX and VEX IR.
+VEX is the intermediate representation (also known as intermediate
+language) used by the Valgrind analysis tool.  As such, VEX is designed
+to enable all kinds of binary analysis tasks.")
+    (license license:bsd-2)))
+
 (define-public python-claripy
   (package
     (name "python-claripy")