Add angr and dependent packages.

Julien LepillerWed Feb 22 23:57:57+0100 2017

84dd890

Add angr and dependent packages.

more/packages/binary.scm

1616
;;; You should have received a copy of the GNU General Public License
1717
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
1818
19-
(define-module (gnu packages binary)
19+
(define-module (more packages binary)
2020
  #:use-module ((guix licenses) #:prefix license:)
2121
  #:use-module (gnu packages)
2222
  #:use-module (guix packages)
2323
  #:use-module (guix download)
24+
  #:use-module (guix git-download)
2425
  #:use-module (guix utils)
2526
  #:use-module (guix build-system gnu)
26-
  #:use-module (guix build-system python))
27+
  #:use-module (guix build-system python)
28+
  #:use-module (gnu packages compression)
29+
  #:use-module (gnu packages glib)
30+
  #:use-module (gnu packages pkg-config)
31+
  #:use-module (gnu packages python)
32+
  #:use-module (more packages python)
33+
  #:use-module (more packages smt))
2734
2835
(define-public python-pyelftools
2936
  (package

101108
102109
(define-public python2-capstone
103110
  (package-with-python2 python-capstone))
111+
 
112+
(define-public python-pefile
113+
  (package
114+
    (name "python-pefile")
115+
    (version "2016.3.28")
116+
    (source
117+
      (origin
118+
        (method url-fetch)
119+
        (uri (pypi-uri "pefile" version))
120+
        (sha256
121+
         (base32
122+
          "0ysz17ci0nhc5gi6j9si0fg87lzc7vcz3ccbi6qgfgjwbc422h7j"))))
123+
    (build-system python-build-system)
124+
    (home-page "https://github.com/erocarrera/pefile")
125+
    (synopsis "Parse and work with Portable Executable (aka PE) files")
126+
    (description "Pefile is a multi-platform Python module to parse and work
127+
with Portable Executable (aka PE) files.  Most of the information contained in
128+
the PE headers is accessible as well as all sections' details and their data.
129+
The structures defined in the Windows header files will be accessible as
130+
attributes in the PE instance.  The naming of fields/attributes will try to
131+
adhere to the naming scheme in those headers.  Only shortcuts added for
132+
convenience will depart from that convention.")
133+
    (license license:expat)))
134+
135+
(define-public python2-pefile
136+
  (package-with-python2 python-pefile))
137+
138+
(define-public python-archinfo
139+
  (package
140+
    (name "python-archinfo")
141+
    (version "6.7.1.13")
142+
    (source (origin
143+
              (method url-fetch)
144+
              (uri (pypi-uri "archinfo" version))
145+
              (sha256
146+
               (base32
147+
                "0x896mk98r6g9h3rxpqq9ri0s6v9n937jx0fzn7i61zn61n7whzw"))))
148+
    (build-system python-build-system)
149+
    (home-page "https://github.com/angr/archinfo")
150+
    (synopsis "Collection of classes that contain architecture-specific information")
151+
    (description "Archinfo is a collection of classes that contain
152+
architecture-specific information.  It is useful for cross-architecture tools
153+
(such as pyvex).")
154+
    (license license:bsd-2)))
155+
156+
(define-public python2-archinfo
157+
  (package-with-python2 python-archinfo))
158+
159+
(define-public angr-vex
160+
  (package
161+
    (name "angr-vex")
162+
    (version "1")
163+
    (source (origin
164+
              (method git-fetch)
165+
              (uri (git-reference
166+
                    (url "https://github.com/angr/vex.git")
167+
                    (commit "058410ede7ee74231255f6ae77cae8476c8a3ef4")))
168+
              (sha256
169+
               (base32
170+
                "02wi1705pa0xbwfqx3jj6g7nnvzi8whgmnd29fp1i7n4qz20gcgb"))
171+
              (file-name (string-append name "-" version))))
172+
    (build-system gnu-build-system)
173+
    (arguments
174+
     `(#:make-flags
175+
       (list "CC=gcc")
176+
       #:tests? #f
177+
       #:phases
178+
       (modify-phases %standard-phases
179+
         (delete 'configure)
180+
         (replace 'install
181+
           (lambda* (#:key outputs #:allow-other-keys)
182+
             (let* ((out (assoc-ref outputs "out"))
183+
                   (lib (string-append out "/lib"))
184+
                   (include (string-append out "/include")))
185+
               (mkdir-p lib)
186+
               (mkdir-p include)
187+
               (copy-recursively "pub" include)
188+
               (copy-file "libvex.a" (string-append lib "/libvex.a"))))))))
189+
    (home-page "https://github.com/angr/vex")
190+
    (synopsis "Fork of libVEX for PyVEX")
191+
    (description "This is a mirror of libVEX (of the Valgrind project:
192+
valgrind.org) for use with PyVEX.")
193+
    (license license:gpl2+)))
194+
195+
(define-public python2-pyvex
196+
  (package
197+
    (name "python2-pyvex")
198+
    (version "6.7.1.13.post2")
199+
    (source (origin
200+
              (method url-fetch)
201+
              (uri (pypi-uri "pyvex" version))
202+
              (sha256
203+
               (base32
204+
                "1x9s88hgrw9xz8v9x9njjz0jq4fxkwyn479074bg4wbqjsp9n7qd"))))
205+
    (build-system python-build-system)
206+
    (inputs `(("angr-vex" ,angr-vex)))
207+
    (propagated-inputs
208+
     `(("archinfo" ,python2-archinfo)
209+
       ("pycparser" ,python2-pycparser)
210+
       ("cffi" ,python2-cffi)))
211+
    (arguments
212+
     `(#:python ,python-2
213+
       #:phases
214+
       (modify-phases %standard-phases
215+
         (add-before 'build 'fix-setup.py
216+
           (lambda* (#:key inputs #:allow-other-keys)
217+
             (substitute* "setup.py"
218+
               (("VEX_PATH = .*")
219+
                (string-append "VEX_PATH = '" (assoc-ref inputs "angr-vex") "'"))
220+
               ((".*self.execute\\(_build_vex.*")
221+
                "")
222+
               (("e\\['VEX_LIB_PATH'\\] = .*")
223+
                "e['VEX_LIB_PATH'] = os.path.join(VEX_PATH, 'lib')\n")
224+
               (("'pub'")
225+
                "'include'")))))))
226+
    (home-page "https://github.com/angr/pyvex")
227+
    (synopsis "PyVEX exposes VEX into Python")
228+
    (description "VEX is an intermediate representation that is useful to carry
229+
analyses on binary.  PyVEX exposes VEX into Python.")
230+
    (license license:bsd-2)))
231+
232+
(define-public unicorn
233+
  (package
234+
    (name "unicorn")
235+
    (version "1.0-rc3")
236+
    (source (origin
237+
              (method url-fetch)
238+
              (uri (string-append "https://github.com/unicorn-engine/unicorn/archive/"
239+
                                  version ".tar.gz"))
240+
              (file-name (string-append name "-" version ".tar.gz"))
241+
              (sha256
242+
               (base32
243+
                "18sf8vbmf08ss27qhiv7la492k39q0ci8kpjx836bv7rq3cbgb2q"))))
244+
    (build-system gnu-build-system)
245+
    (arguments
246+
     `(#:phases
247+
       (modify-phases %standard-phases
248+
         (delete 'configure))
249+
       #:tests? #f
250+
       #:make-flags
251+
       (list "CC=gcc"
252+
             (string-append "PREFIX=" (assoc-ref %outputs "out")))))
253+
    (native-inputs
254+
     `(("python" ,python-2)
255+
       ("pkg-config" ,pkg-config)))
256+
    (home-page "http://www.unicorn-engine.org/")
257+
    (synopsis "CPU emulator")
258+
    (description "Unicorn is a lightweight multi-platform, multi-architecture
259+
CPU emulator framework.")
260+
    (license (list license:gpl2 license:lgpl2.0))))
261+
262+
;; Not reproducible
263+
(define-public python-unicorn
264+
  (package
265+
    (inherit unicorn)
266+
    (name "python-unicorn")
267+
    (propagated-inputs
268+
     `(("unicorn" ,unicorn)))
269+
    (build-system python-build-system)
270+
    (arguments
271+
     `(#:tests? #f
272+
       #:phases (modify-phases %standard-phases
273+
                  (add-after 'unpack 'chdir-and-fix-setup-py
274+
                    (lambda _
275+
                      (chdir "bindings/python")
276+
                      (substitute* "setup.py" (("build_libraries\\(\\)\n") "\n"))
277+
                      (substitute* "unicorn/unicorn.py"
278+
                        (("'',")
279+
                         (string-append "'"
280+
                                        (assoc-ref %build-inputs "unicorn")
281+
                                        "/lib',")))
282+
                      #t)))))))
283+
284+
(define-public python2-unicorn
285+
  (package
286+
    (inherit (package-with-python2 python-unicorn))
287+
    (propagated-inputs
288+
     `(("unicorn" ,unicorn)
289+
       ("pyvex" ,python2-pyvex)))))
290+
291+
;; TODO: Requires dpkt-fix for testing
292+
(define-public python2-simuvex
293+
  (package
294+
    (name "python2-simuvex")
295+
    (version "6.7.1.31")
296+
    (source (origin
297+
              (method url-fetch)
298+
              (uri (pypi-uri "simuvex" version))
299+
              (sha256
300+
               (base32
301+
                "150jwf55pib7ndz7bjb4fxifqqgdxx7n1f5qa87mz6349qvi1xji"))))
302+
    (build-system python-build-system)
303+
    (native-inputs
304+
     `(("pkg-config" ,pkg-config)))
305+
    (propagated-inputs
306+
     `(("pyvex" ,python2-pyvex)
307+
       ("bintrees" ,python2-bintrees)
308+
       ("dpkt" ,python2-dpkt)
309+
       ("cooldict" ,python2-cooldict)
310+
       ("cachetools" ,python2-cachetools)
311+
       ("claripy" ,python2-claripy)
312+
       ("unicorn" ,python2-unicorn)
313+
       ("glib" ,glib)))
314+
    (inputs
315+
     `(("zlib" ,zlib)))
316+
    (arguments
317+
     `(#:python ,python-2))
318+
    (home-page "https://github.com/angr/cle")
319+
    (synopsis "Abstraction of process memory")
320+
    (description "CLE loads binaries and their associated libraries, resolves
321+
imports and provides an abstraction of process memory the same way as if it was
322+
loaded by the OS's loader.")
323+
    (license license:bsd-2)))
324+
325+
(define-public python-cle
326+
  (package
327+
    (name "python-cle")
328+
    (version "6.7.1.31")
329+
    (source (origin
330+
              (method url-fetch)
331+
              (uri (pypi-uri "cle" version))
332+
              (sha256
333+
               (base32
334+
                "0llk54f9p3b73f1pk19axlhw8yw80fdv07jkghqmqwd6xrnpnmmc"))))
335+
    (build-system python-build-system)
336+
    (propagated-inputs
337+
     `(("pyelftools" ,python-pyelftools)
338+
       ("cffi" ,python-cffi)
339+
       ("archinfo" ,python-archinfo)
340+
       ("pefile" ,python-pefile)))
341+
    (home-page "https://github.com/angr/cle")
342+
    (synopsis "Abstraction of process memory")
343+
    (description "CLE loads binaries and their associated libraries, resolves
344+
imports and provides an abstraction of process memory the same way as if it was
345+
loaded by the OS's loader.")
346+
    (license license:bsd-2)))
347+
348+
(define-public python2-cle
349+
  (package
350+
    (inherit (package-with-python2 python-cle))
351+
    (propagated-inputs
352+
     `(("pyelftools" ,python2-pyelftools)
353+
       ("cffi" ,python2-cffi)
354+
       ("pefile" ,python2-pefile)
355+
       ("pyvex" ,python2-pyvex)))))
356+
357+
(define-public python2-angr
358+
  (package
359+
    (name "python2-angr")
360+
    (version "6.7.1.31")
361+
    (source (origin
362+
              (method url-fetch)
363+
              (uri (pypi-uri "angr" version))
364+
              (sha256
365+
               (base32
366+
                "19msllsjwc869824sx1qah6vnb03z22s71fph215ykbbb2843p1k"))))
367+
    (build-system python-build-system)
368+
    (arguments
369+
     `(#:python ,python-2))
370+
    (propagated-inputs
371+
     `(("cle" ,python2-cle)
372+
       ("six" ,python2-six)
373+
       ("utils" ,python2-utils)
374+
       ("mulpyplexer" ,python2-mulpyplexer)
375+
       ("rpyc" ,python2-rpyc)
376+
       ("networkx" ,python2-networkx)
377+
       ("futures" ,python2-futures)
378+
       ("progressbar" ,python2-progressbar2)
379+
       ("simuvex" ,python2-simuvex)))
380+
    (home-page "https://github.com/angr/angr")
381+
    (synopsis "Angr is a python framework for analyzing binaries")
382+
    (description "angr is a python framework for analyzing binaries.  It
383+
focuses on both static and dynamic symbolic (\"concolic\") analysis, making it
384+
applicable to a variety of tasks.")
385+
    (license license:bsd-2)))

more/packages/python.scm unknown status 1

1+
;;; GNU Guix --- Functional package management for GNU
2+
;;; Copyright ?? 2017 Julien Lepiller <julien@lepiller.eu>
3+
;;;
4+
;;; This file is part of GNU Guix.
5+
;;;
6+
;;; GNU Guix is free software; you can redistribute it and/or modify it
7+
;;; under the terms of the GNU General Public License as published by
8+
;;; the Free Software Foundation; either version 3 of the License, or (at
9+
;;; your option) any later version.
10+
;;;
11+
;;; GNU Guix is distributed in the hope that it will be useful, but
12+
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13+
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14+
;;; GNU General Public License for more details.
15+
;;;
16+
;;; You should have received a copy of the GNU General Public License
17+
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
18+
19+
(define-module (more packages python)
20+
  #:use-module ((guix licenses) #:prefix license:)
21+
  #:use-module (gnu packages)
22+
  #:use-module (gnu packages python)
23+
  #:use-module (guix packages)
24+
  #:use-module (guix download)
25+
  #:use-module (guix git-download)
26+
  #:use-module (guix utils)
27+
  #:use-module (guix build-system gnu)
28+
  #:use-module (guix build-system cmake)
29+
  #:use-module (guix build-system python)
30+
  #:use-module (guix build-system trivial)
31+
  #:use-module (srfi srfi-1))
32+
33+
(define-public python-setuptools-scm
34+
  (package
35+
    (name "python-setuptools-scm")
36+
    (version "1.15.0")
37+
    (source (origin
38+
              (method url-fetch)
39+
              (uri (pypi-uri "setuptools_scm" version))
40+
              (sha256
41+
               (base32
42+
                "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
43+
    (build-system python-build-system)
44+
    (home-page "https://github.com/pypa/setuptools_scm/")
45+
    (synopsis "Manage Python package versions in SCM metadata")
46+
    (description
47+
     "Setuptools_scm handles managing your Python package versions in
48+
@dfn{software configuration management} (SCM) metadata instead of declaring
49+
them as the version argument or in a SCM managed file.")
50+
    (license license:expat)))
51+
52+
(define-public python2-setuptools-scm
53+
  (package-with-python2 python-setuptools-scm))
54+
55+
(define-public python-pytest-runner
56+
  (package
57+
    (name "python-pytest-runner")
58+
    (version "2.11")
59+
    (source
60+
     (origin
61+
       (method url-fetch)
62+
       (uri (pypi-uri "pytest-runner" version))
63+
       (sha256
64+
        (base32
65+
         "08rizp3zz8fdm2a5j97rcq3hddbhq5f6k0vr35amjj83zqpawk5x"))))
66+
    (build-system python-build-system)
67+
    (arguments
68+
     `(#:phases
69+
       (modify-phases %standard-phases
70+
         ;; The fancy way of setting the version with setuptools_scm does not
71+
         ;; seem to work here.
72+
         (add-after 'unpack 'set-version
73+
          (lambda _
74+
            (substitute* "docs/conf.py"
75+
              (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
76+
               (string-append "version = \"" ,version "\"")))
77+
            #t)))))
78+
    (native-inputs
79+
     `(("python-pytest" ,python-pytest)
80+
       ("python-setuptools-scm" ,python-setuptools-scm)))
81+
    (home-page "https://github.com/pytest-dev/pytest-runner")
82+
    (synopsis "Invoke py.test as a distutils command")
83+
    (description
84+
     "This package provides a @command{pytest-runner} command that
85+
@file{setup.py} files can use to run tests.")
86+
    (license license:expat)))
87+
88+
(define-public python2-pytest-runner
89+
  (package-with-python2 python-pytest-runner))
90+
91+
(define-public python-utils
92+
  (package
93+
    (name "python-utils")
94+
    (version "2.0.1")
95+
    (source (origin
96+
              (method url-fetch)
97+
              (uri (pypi-uri "python-utils" version))
98+
              (sha256
99+
               (base32
100+
                "1zvrc1rc06n89pycg969pcy30bff4sqzhff365sxh629ybnl8pwq"))))
101+
    (build-system python-build-system)
102+
    (native-inputs
103+
     `(("pytest-runner" ,python-pytest-runner)))
104+
    (home-page "https://github.com/WoLpH/python-utils")
105+
    (synopsis "Convenient utilities not included with the standard Python install")
106+
    (description
107+
      "Python Utils is a collection of small Python functions and classes which
108+
make common patterns shorter and easier.")
109+
    (license license:bsd-2)))
110+
111+
(define-public python2-utils
112+
  (package-with-python2 python-utils))
113+
114+
(define-public python-cooldict
115+
  (package
116+
    (name "python-cooldict")
117+
    (version "1.02")
118+
    (source (origin
119+
              (method url-fetch)
120+
              (uri (pypi-uri "cooldict" version))
121+
              (sha256
122+
               (base32
123+
                "084if0s504576nph0f6glmg3mmvijq7nbnf65hh22gwwdwrjss83"))))
124+
    (build-system python-build-system)
125+
    (home-page "https://github.com/zardus/cooldict")
126+
    (synopsis "Some useful dict-like structures")
127+
    (description "Some useful dict-like structures.")
128+
    (license license:bsd-2)))
129+
130+
(define-public python2-cooldict
131+
  (package-with-python2 python-cooldict))
132+
 
133+
(define-public python-cachetools
134+
  (package
135+
    (name "python-cachetools")
136+
    (version "2.0.0")
137+
    (source (origin
138+
              (method url-fetch)
139+
              (uri (pypi-uri "cachetools" version))
140+
              (sha256
141+
               (base32
142+
                "0a56ydsvsri1r19ny55g0x7jsgjl9n02vnxbhfz0vhhd4h174nki"))))
143+
    (build-system python-build-system)
144+
    (home-page "https://github.com/tkem/cachetools")
145+
    (synopsis "Memoizing collections and decorators including lru_cache")
146+
    (description "This module provides various memoizing collections and
147+
decorators, including variants of the Python 3 Standard Library @code{lru_cache}
148+
function decorator.")
149+
    (license license:expat)))
150+
151+
(define-public python2-cachetools
152+
  (package-with-python2 python-cachetools))
153+
154+
(define-public python-bintrees
155+
  (package
156+
    (name "python-bintrees")
157+
    (version "2.0.4")
158+
    (source (origin
159+
              (method url-fetch)
160+
              (uri (pypi-uri "bintrees" version))
161+
              (sha256
162+
               (base32
163+
                "1q71md58i33qpjhwgi9ph9hpgch1dy2i6n4qljyl0x410rhikfvc"))))
164+
    (build-system python-build-system)
165+
    (home-page "https://github.com/mozman/bintrees")
166+
    (synopsis "Provides Binary- RedBlack- and AVL-Trees written in Python and Cython/C")
167+
    (description "This package provides Binary- RedBlack- and AVL-Trees written
168+
in Python and Cython/C.
169+
170+
This Classes are much slower than the built-in dict class, but all
171+
iterators/generators yielding data in sorted key order. Trees can be uses as
172+
drop in replacement for dicts in most cases.")
173+
    (license license:expat)))
174+
175+
(define-public python2-bintrees
176+
  (package-with-python2 python-bintrees))
177+
 
178+
(define-public python2-dpkt
179+
  (package
180+
    (name "python2-dpkt")
181+
    (version "1.8.8")
182+
    (source (origin
183+
              (method url-fetch)
184+
              (uri (pypi-uri "dpkt" version))
185+
              (sha256
186+
               (base32
187+
                "004qsqzg3fwkh623l1y8j62ai166hr02y192s7n1hs166kjjb5fr"))
188+
            (modules '((guix build utils)))
189+
            (snippet
190+
             '(substitute* "setup.py"
191+
                (("os.system\\('py2dsc-deb ' + sdist_file\\)") "")))))
192+
    (build-system python-build-system)
193+
    (arguments
194+
     `(#:python ,python-2))
195+
    (home-page "https://github.com/kbandla/dpkt")
196+
    (synopsis "Fast, simple network packet creation / parsing")
197+
    (description "Fast, simple packet creation / parsing, with definitions for
198+
the basic TCP/IP protocols.")
199+
    (license license:bsd-3)))
200+
 
201+
(define-public python-rpyc
202+
  (package
203+
    (name "python-rpyc")
204+
    (version "3.3.0")
205+
    (source (origin
206+
              (method url-fetch)
207+
              (uri (pypi-uri "rpyc" version))
208+
              (sha256
209+
               (base32
210+
                "0jwbxxf5f8l05pwh7ilg380y4pqv3nxibaszbwpl9gzh2i9q9yj3"))))
211+
    (build-system python-build-system)
212+
    (home-page "https://github.com/tomerfiliba/rpyc")
213+
    (synopsis "Remote procedure call for Python")
214+
    (description "Remote Python Call is a transparent library for symmetrical
215+
remote procedure calls, clustering, and distributed-computing.  RPyC makes use
216+
of object-proxying, a technique that employs python's dynamic nature, to
217+
overcome the physical boundaries between processes and computers, so that
218+
remote objects can be manipulated as if they were local.")
219+
    (license license:expat)))
220+
221+
(define-public python2-rpyc
222+
  (package-with-python2 python-rpyc))
223+
224+
(define-public python-progressbar2
225+
  (package
226+
    (name "python-progressbar2")
227+
    (version "3.12.0")
228+
    (source (origin
229+
              (method url-fetch)
230+
              (uri (pypi-uri "progressbar2" version))
231+
              (sha256
232+
               (base32
233+
                "16r21cpjvv0spf4mymgpy7hx6977iy11k44n2w9kipwg4lhwh02k"))))
234+
    (build-system python-build-system)
235+
    (native-inputs
236+
     `(("pytest-runner" ,python-pytest-runner)))
237+
    (home-page "https://github.com/WoLpH/python-progressbar")
238+
    (synopsis "A text progress bar for python")
239+
    (description "A text progress bar is typically used to display the progress
240+
of a long running operation, providing a visual cue that processing is underway.
241+
242+
The ProgressBar class manages the current progress, and the format of the line
243+
is given by a number of widgets.  A widget is an object that may display
244+
differently depending on the state of the progress bar.")
245+
    (license license:bsd-2)))
246+
247+
(define-public python2-progressbar2
248+
  (package-with-python2 python-progressbar2))
249+
 
250+
(define-public python-mulpyplexer
251+
  (package
252+
    (name "python-mulpyplexer")
253+
    (version "0.07")
254+
    (source (origin
255+
              (method url-fetch)
256+
              (uri (pypi-uri "mulpyplexer" version))
257+
              (sha256
258+
               (base32
259+
                "1j5gm913adc8f0mn9y6a9wm9h78jb7ykr8i00yysfcy6ah2ilp9v"))))
260+
    (build-system python-build-system)
261+
    (home-page "https://github.com/zardus/mulpyplexer")
262+
    (synopsis "Multiplex interactions with lists of python objects")
263+
    (description "Mulpyplexer is a piece of code that can multiplex interactions with lists of python objects.")
264+
    (license license:bsd-2)))
265+
266+
(define-public python2-mulpyplexer
267+
  (package-with-python2 python-mulpyplexer))
268+
269+
;; Not reproducible.
270+
(define-public python-ana
271+
  (package
272+
    (name "python-ana")
273+
    (version "0")
274+
    (source (origin
275+
              (method git-fetch)
276+
              (uri (git-reference
277+
                    (url "https://github.com/zardus/ana.git")
278+
                    (commit "94928f773661eaa5a6c2dec40dad199c70daedab")))
279+
              (sha256
280+
               (base32
281+
                "0f2wdhs0xwpnk9lznxl96b2yzcz1641wbqrh1aid7q2pm60v6dhv"))
282+
              (file-name (string-append name "-" version))))
283+
    (build-system python-build-system)
284+
    (home-page "https://github.com/zardus/ana")
285+
    (synopsis "Provide easy distributed data storage for python objects")
286+
    (description "ANA is a project to provide easy distributed data storage for
287+
stuff.  It provides every object with a UUID and, when pickled, will first
288+
serialize the object's state to a central location and then \"pickle\" the
289+
object into just its UUID.  This is really handy when you have to distribute
290+
objects in some distributed system, and you'd rather not pickle the whole
291+
object every time you need to send it.")
292+
    (license license:bsd-2)))
293+
294+
;; Not reproducible.
295+
(define-public python2-ana
296+
  (package-with-python2 python-ana))

more/packages/smt.scm

1616
;;; You should have received a copy of the GNU General Public License
1717
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
1818
19-
(define-module (gnu packages smt)
19+
(define-module (more packages smt)
2020
  #:use-module (guix packages)
2121
  #:use-module (guix download)
2222
  #:use-module (guix build-system gnu)

5555
    (synopsis "SMT solver library")
5656
    (description "Z3 is a theorem prover from Microsoft Research.")
5757
    (license license:expat)))
58+
59+
;; Not reproducible and tests fail.
60+
(define-public python-z3-solver
61+
  (package
62+
    (inherit z3-solver)
63+
    (name "python-z3-solver")
64+
    (build-system python-build-system)
65+
    (propagated-inputs
66+
     `(("z3" ,z3-solver)))
67+
    (arguments
68+
     `(#:phases
69+
       (modify-phases %standard-phases
70+
         (add-before 'build 'prepare
71+
           (lambda* (#:key inputs #:allow-other-keys)
72+
             (system* "python" "scripts/mk_make.py")
73+
             (copy-file "build/python/z3/z3core.py" "src/api/python/z3/z3core.py")
74+
             (copy-file "build/python/z3/z3consts.py" "src/api/python/z3/z3consts.py")
75+
             (chdir "src/api/python")
76+
             (substitute* "z3/z3core.py"
77+
               (("_dirs = \\[")
78+
                (string-append "_dirs = ['" (assoc-ref inputs "z3")
79+
                                            "/lib', ")))
80+
             (substitute* "MANIFEST.in"
81+
               ((".*") ""))
82+
             (substitute* "setup.py"
83+
               (("self.execute\\(.*") "\n")
84+
               (("scripts=.*") "\n")))))))))
85+
86+
(define-public python2-z3-solver
87+
  (package-with-python2 python-z3-solver))
88+
 
89+
(define-public python-claripy
90+
  (package
91+
    (name "python-claripy")
92+
    (version "6.7.1.13.post2")
93+
    (source (origin
94+
              (method url-fetch)
95+
              (uri (pypi-uri "claripy" version))
96+
              (sha256
97+
               (base32
98+
                "0qcp6c7shyl4hs14yhnymcanr87i8hbp6af35avzphjq7jw33rrc"))))
99+
    (build-system python-build-system)
100+
    (propagated-inputs
101+
     `(("ana" ,python-ana)))
102+
    (home-page "https://github.com/angr/claripy")
103+
    (synopsis "Claripy is a abstracted constraint-solving wrapper")
104+
    (description "Claripy is a abstracted constraint-solving wrapper.")
105+
    (license license:bsd-2)))
106+
107+
(define-public python2-claripy
108+
  (package-with-python2 python-claripy))