fixed python packages

Julien LepillerWed Mar 08 14:08:12+0100 2017

8074b73

fixed python packages

more/packages/binary.scm

4848
               (base32
4949
                "1iw47b20brg0ah86s9a2dn1f70qfmdv20p04q131vmnwa9g066f4"))))
5050
    (build-system python-build-system)
51+
    (native-inputs
52+
     `(("utils" ,python-utils)))
53+
    (arguments
54+
     `(#:tests? #f))
5155
    (home-page "https://github.com/eliben/pyelftools")
5256
    (synopsis "Parsing and analyzing ELF files and DWARF debugging information")
5357
    (description

5559
    (license license:public-domain)))
5660
5761
(define-public python2-pyelftools
58-
  (package-with-python2 python-pyelftools))
62+
  (package
63+
    (inherit (package-with-python2 python-pyelftools))
64+
    (arguments
65+
     `(#:tests? #t
66+
       #:python ,python-2))))
67+
    
5968
6069
(define-public capstone
6170
  (package

124133
         (base32
125134
          "0ysz17ci0nhc5gi6j9si0fg87lzc7vcz3ccbi6qgfgjwbc422h7j"))))
126135
    (build-system python-build-system)
136+
    (arguments
137+
     `(#:tests? #f)); no test
127138
    (home-page "https://github.com/erocarrera/pefile")
128139
    (synopsis "Parse and work with Portable Executable (aka PE) files")
129140
    (description "Pefile is a multi-platform Python module to parse and work

138149
(define-public python2-pefile
139150
  (package-with-python2 python-pefile))
140151
141-
(define-public python-archinfo
152+
(define-public python2-archinfo
142153
  (package
143-
    (name "python-archinfo")
154+
    (name "python2-archinfo")
144155
    (version "6.7.1.13")
145156
    (source (origin
146157
              (method url-fetch)

149160
               (base32
150161
                "0x896mk98r6g9h3rxpqq9ri0s6v9n937jx0fzn7i61zn61n7whzw"))))
151162
    (build-system python-build-system)
163+
    (arguments
164+
     `(#:python ,python-2))
152165
    (home-page "https://github.com/angr/archinfo")
153166
    (synopsis "Collection of classes that contain architecture-specific information")
154167
    (description "Archinfo is a collection of classes that contain

156169
(such as pyvex).")
157170
    (license license:bsd-2)))
158171
159-
(define-public python2-archinfo
160-
  (package-with-python2 python-archinfo))
161-
162172
(define-public angr-vex
163173
  (package
164174
    (name "angr-vex")

198208
(define-public python2-pyvex
199209
  (package
200210
    (name "python2-pyvex")
201-
    (version "6.7.1.13.post2")
211+
    (version "6.7.1.31")
202212
    (source (origin
203213
              (method url-fetch)
204214
              (uri (pypi-uri "pyvex" version))
205215
              (sha256
206216
               (base32
207-
                "1x9s88hgrw9xz8v9x9njjz0jq4fxkwyn479074bg4wbqjsp9n7qd"))))
217+
                "0wwz1jqrjbkg8j7mr3wrgw84aaph7h9v2r7j4q035rn7b38n5x54"))))
208218
    (build-system python-build-system)
209219
    (inputs `(("angr-vex" ,angr-vex)))
210220
    (propagated-inputs

291301
     `(("unicorn" ,unicorn)
292302
       ("pyvex" ,python2-pyvex)))))
293303
294-
;; TODO: Requires dpkt-fix for testing
295304
(define-public python2-simuvex
296305
  (package
297306
    (name "python2-simuvex")

301310
              (uri (pypi-uri "simuvex" version))
302311
              (sha256
303312
               (base32
304-
                "150jwf55pib7ndz7bjb4fxifqqgdxx7n1f5qa87mz6349qvi1xji"))))
313+
                "150jwf55pib7ndz7bjb4fxifqqgdxx7n1f5qa87mz6349qvi1xji"))
314+
              (modules '((guix build utils)))
315+
              (snippet
316+
               '(substitute* "setup.py"
317+
                  (("dpkt-fix") "dpkt")))))
305318
    (build-system python-build-system)
306319
    (native-inputs
307-
     `(("pkg-config" ,pkg-config)))
320+
     `(("pkg-config" ,pkg-config)
321+
       ("enum34" ,python2-enum34)))
308322
    (propagated-inputs
309323
     `(("pyvex" ,python2-pyvex)
310324
       ("bintrees" ,python2-bintrees)

325339
loaded by the OS's loader.")
326340
    (license license:bsd-2)))
327341
328-
(define-public python-cle
342+
(define-public python2-cle
329343
  (package
330-
    (name "python-cle")
344+
    (name "python2-cle")
331345
    (version "6.7.1.31")
332346
    (source (origin
333347
              (method url-fetch)
334348
              (uri (pypi-uri "cle" version))
335349
              (sha256
336350
               (base32
337-
                "0llk54f9p3b73f1pk19axlhw8yw80fdv07jkghqmqwd6xrnpnmmc"))))
351+
                "0llk54f9p3b73f1pk19axlhw8yw80fdv07jkghqmqwd6xrnpnmmc"))
352+
              (modules '((guix build utils)))
353+
              (snippet
354+
               '(substitute* "setup.py"
355+
                  ((", \"idalink\"") ""))))); Idalink is not acceptable
338356
    (build-system python-build-system)
339357
    (propagated-inputs
340-
     `(("pyelftools" ,python-pyelftools)
341-
       ("cffi" ,python-cffi)
342-
       ("archinfo" ,python-archinfo)
343-
       ("pefile" ,python-pefile)))
358+
     `(("pyelftools" ,python2-pyelftools)
359+
       ("cffi" ,python2-cffi)
360+
       ("archinfo" ,python2-archinfo)
361+
       ("future" ,python2-future)
362+
       ("pyvex" ,python2-pyvex)
363+
       ("pefile" ,python2-pefile)))
364+
    (arguments
365+
     `(#:python ,python-2))
344366
    (home-page "https://github.com/angr/cle")
345367
    (synopsis "Abstraction of process memory")
346368
    (description "CLE loads binaries and their associated libraries, resolves

348370
loaded by the OS's loader.")
349371
    (license license:bsd-2)))
350372
351-
(define-public python2-cle
352-
  (package
353-
    (inherit (package-with-python2 python-cle))
354-
    (propagated-inputs
355-
     `(("pyelftools" ,python2-pyelftools)
356-
       ("cffi" ,python2-cffi)
357-
       ("pefile" ,python2-pefile)
358-
       ("pyvex" ,python2-pyvex)))))
359-
360373
(define-public python2-angr
361374
  (package
362375
    (name "python2-angr")

377390
       ("utils" ,python2-utils)
378391
       ("mulpyplexer" ,python2-mulpyplexer)
379392
       ("rpyc" ,python2-rpyc)
393+
       ("enum34" ,python2-enum34)
380394
       ("networkx" ,python2-networkx)
381395
       ("futures" ,python2-futures)
382396
       ("progressbar" ,python2-progressbar2)

more/packages/ocaml.scm

2020
  #:use-module (guix packages)
2121
  #:use-module (guix download)
2222
  #:use-module (guix utils)
23+
  #:use-module (guix build-system gnu)
2324
  #:use-module (guix build-system ocaml)
2425
  #:use-module ((guix licenses) #:prefix license:)
2526
  #:use-module (gnu packages)
2627
  #:use-module (gnu packages base)
28+
  #:use-module (gnu packages emacs)
2729
  #:use-module (gnu packages llvm)
2830
  #:use-module (gnu packages multiprecision)
2931
  #:use-module (gnu packages ocaml)
30-
  #:use-module (gnu packages protobuf))
32+
  #:use-module (gnu packages perl)
33+
  #:use-module (gnu packages protobuf)
34+
  #:use-module (gnu packages texinfo))
3135
3236
;; Janestreet packages are found in a similar way and all need the same patch.
3337
(define (janestreet-origin name version hash)

12481252
12491253
It integrates with the tuareg mode in Emacs.")
12501254
    (license license:bsd-3)))
1255+
1256+
(define-public proof-general2
1257+
  (package
1258+
    (name "proof-general2")
1259+
    (version "4.4")
1260+
    (source (origin
1261+
              (method url-fetch)
1262+
              (uri (string-append
1263+
                    "https://github.com/ProofGeneral/PG/archive/v"
1264+
                    version ".tar.gz"))
1265+
              (file-name (string-append name "-" version ".tar.gz"))
1266+
              (sha256
1267+
               (base32
1268+
                "0zif2fv6mm4pv75nh10q3p37n293495rvx470bx7ma382zc3d8hv"))))
1269+
    (build-system gnu-build-system)
1270+
    (native-inputs
1271+
     `(("which" ,which)
1272+
       ("emacs" ,emacs-minimal)
1273+
       ("texinfo" ,texinfo)))
1274+
    (inputs
1275+
     `(("host-emacs" ,emacs)
1276+
       ("perl" ,perl)
1277+
       ("coq" ,coq)))
1278+
    (arguments
1279+
     `(#:tests? #f  ; no check target
1280+
       #:make-flags (list (string-append "PREFIX=" %output)
1281+
                          (string-append "DEST_PREFIX=" %output)
1282+
                          "-j1")
1283+
       #:modules ((guix build gnu-build-system)
1284+
                  (guix build utils)
1285+
                  (guix build emacs-utils))
1286+
       #:imported-modules (,@%gnu-build-system-modules
1287+
                           (guix build emacs-utils))
1288+
       #:phases
1289+
       (modify-phases %standard-phases
1290+
         (delete 'configure)
1291+
         (add-after 'unpack 'disable-byte-compile-error-on-warn
1292+
                    (lambda _
1293+
                      (substitute* "Makefile"
1294+
                        (("\\(setq byte-compile-error-on-warn t\\)")
1295+
                         "(setq byte-compile-error-on-warn nil)"))
1296+
                      #t))
1297+
         (add-after 'unpack 'patch-hardcoded-paths
1298+
                    (lambda* (#:key inputs outputs #:allow-other-keys)
1299+
                      (let ((out   (assoc-ref outputs "out"))
1300+
                            (coq   (assoc-ref inputs "coq"))
1301+
                            (emacs (assoc-ref inputs "host-emacs")))
1302+
                        (define (coq-prog name)
1303+
                          (string-append coq "/bin/" name))
1304+
                        (substitute* "pgshell/pgshell.el"
1305+
                          (("/bin/sh") (which "sh")))
1306+
                        ;(emacs-substitute-variables "coq/coq.el"
1307+
                        ;  ("coq-prog-name"           (coq-prog "coqtop"))
1308+
                        ;  ("coq-compiler"            (coq-prog "coqc"))
1309+
                        ;  ("coq-dependency-analyzer" (coq-prog "coqdep")))
1310+
                        (substitute* "Makefile"
1311+
                          (("/sbin/install-info") "install-info"))
1312+
                        (substitute* "bin/proofgeneral"
1313+
                          (("^PGHOMEDEFAULT=.*" all)
1314+
                           (string-append all
1315+
                                          "PGHOME=$PGHOMEDEFAULT\n"
1316+
                                          "EMACS=" emacs "/bin/emacs")))
1317+
                        #t))))))
1318+
         ;(add-after 'unpack 'clean
1319+
         ;           (lambda _
1320+
         ;             ;; Delete the pre-compiled elc files for Emacs 23.
1321+
         ;             (zero? (system* "make" "clean"))))
1322+
         ;(add-after 'install 'install-doc
1323+
         ;           (lambda* (#:key make-flags #:allow-other-keys)
1324+
         ;             ;; XXX FIXME avoid building/installing pdf files,
1325+
         ;             ;; due to unresolved errors building them.
1326+
         ;             (substitute* "Makefile"
1327+
         ;               ((" [^ ]*\\.pdf") ""))
1328+
         ;             (zero? (apply system* "make" "install-doc"
1329+
         ;                           make-flags)))))))
1330+
    (home-page "http://proofgeneral.inf.ed.ac.uk/")
1331+
    (synopsis "Generic front-end for proof assistants based on Emacs")
1332+
    (description
1333+
     "Proof General is a major mode to turn Emacs into an interactive proof
1334+
assistant to write formal mathematical proofs using a variety of theorem
1335+
provers.")
1336+
    (license license:gpl2+)))

more/packages/python.scm

100100
                "1zvrc1rc06n89pycg969pcy30bff4sqzhff365sxh629ybnl8pwq"))))
101101
    (build-system python-build-system)
102102
    (native-inputs
103-
     `(("pytest-runner" ,python-pytest-runner)))
103+
     `(("pytest-runner" ,python-pytest-runner)
104+
       ("pytest" ,python-pytest)
105+
       ("six" ,python-six)))
104106
    (home-page "https://github.com/WoLpH/python-utils")
105107
    (synopsis "Convenient utilities not included with the standard Python install")
106108
    (description

122124
               (base32
123125
                "084if0s504576nph0f6glmg3mmvijq7nbnf65hh22gwwdwrjss83"))))
124126
    (build-system python-build-system)
127+
    (native-inputs
128+
     `(("ana" ,python-ana)))
125129
    (home-page "https://github.com/zardus/cooldict")
126130
    (synopsis "Some useful dict-like structures")
127131
    (description "Some useful dict-like structures.")

185189
              (sha256
186190
               (base32
187191
                "004qsqzg3fwkh623l1y8j62ai166hr02y192s7n1hs166kjjb5fr"))
188-
            (modules '((guix build utils)))
189-
            (snippet
190-
             '(substitute* "setup.py"
191-
                (("os.system\\('py2dsc-deb ' + sdist_file\\)") "")))))
192+
              (modules '((guix build utils)))
193+
              (snippet
194+
               '(substitute* "setup.py"
195+
                  (("os.system\\('py2dsc-deb ' + sdist_file\\)") "")))))
192196
    (build-system python-build-system)
193197
    (arguments
194198
     `(#:python ,python-2))

197201
    (description "Fast, simple packet creation / parsing, with definitions for
198202
the basic TCP/IP protocols.")
199203
    (license license:bsd-3)))
200-
 
201-
(define-public python-rpyc
204+
205+
(define-public python2-rpyc
202206
  (package
203-
    (name "python-rpyc")
207+
    (name "python2-rpyc")
204208
    (version "3.3.0")
205209
    (source (origin
206210
              (method url-fetch)

209213
               (base32
210214
                "0jwbxxf5f8l05pwh7ilg380y4pqv3nxibaszbwpl9gzh2i9q9yj3"))))
211215
    (build-system python-build-system)
216+
    (native-inputs
217+
     `(("nose" ,python2-nose)))
218+
    (propagated-inputs
219+
     `(("plumbum" ,python2-plumbum)
220+
       ("progressbar" ,python2-progressbar)))
221+
    (arguments
222+
     `(#:python ,python-2))
212223
    (home-page "https://github.com/tomerfiliba/rpyc")
213224
    (synopsis "Remote procedure call for Python")
214225
    (description "Remote Python Call is a transparent library for symmetrical

218229
remote objects can be manipulated as if they were local.")
219230
    (license license:expat)))
220231
221-
(define-public python2-rpyc
222-
  (package-with-python2 python-rpyc))
232+
(define-public python2-progressbar
233+
  (package
234+
    (name "python2-progressbar")
235+
    (version "2.3")
236+
    (source (origin
237+
              (method url-fetch)
238+
              (uri (pypi-uri "progressbar" version))
239+
              (sha256
240+
               (base32
241+
                "0m0j93yfvbd8pw8cz2vdb9hyk9d0zkkd509k69jrw545jxr8mlxj"))))
242+
    (build-system python-build-system)
243+
    (arguments
244+
     `(#:python ,python-2))
245+
    (home-page "https://github.com/niltonvolpato/python-progressbar")
246+
    (synopsis "Text progress bar library for Python")
247+
    (description
248+
      "A text progress bar is typically used to display the progress of a long
249+
running operation, providing a visual cue that processing is underway.
250+
251+
The ProgressBar class manages the current progress, and the format of the line
252+
is given by a number of widgets. A widget is an object that may display
253+
differently depending on the state of the progress bar. There are three types
254+
of widgets:
255+
256+
@enumerate
257+
@item a string, which always shows itself
258+
@item a ProgressBarWidget, which may return a different value every time its
259+
update method is called
260+
@item a ProgressBarWidgetHFill, which is like ProgressBarWidget, except it
261+
expands to fill the remaining width of the line.
262+
@end enumerate
263+
264+
The progressbar module is very easy to use, yet very powerful. It will also
265+
automatically enable features like auto-resizing when the system supports it.")
266+
    (license (list license:lgpl2.1+ license:bsd-3))))
223267
224268
(define-public python-progressbar2
225269
  (package

233277
                "16r21cpjvv0spf4mymgpy7hx6977iy11k44n2w9kipwg4lhwh02k"))))
234278
    (build-system python-build-system)
235279
    (native-inputs
236-
     `(("pytest-runner" ,python-pytest-runner)))
280+
     `(("pytest-runner" ,python-pytest-runner)
281+
       ("pytest" ,python-pytest)))
282+
    (propagated-inputs
283+
     `(("six" ,python-six)
284+
       ("utils" ,python-utils)))
237285
    (home-page "https://github.com/WoLpH/python-progressbar")
238286
    (synopsis "A text progress bar for python")
239287
    (description "A text progress bar is typically used to display the progress

266314
(define-public python2-mulpyplexer
267315
  (package-with-python2 python-mulpyplexer))
268316
269-
;; Not reproducible.
270317
(define-public python-ana
271318
  (package
272319
    (name "python-ana")

281328
                "0f2wdhs0xwpnk9lznxl96b2yzcz1641wbqrh1aid7q2pm60v6dhv"))
282329
              (file-name (string-append name "-" version))))
283330
    (build-system python-build-system)
331+
    (native-inputs
332+
     `(("nose" ,python-nose)))
333+
    (arguments
334+
     `(#:phases
335+
       (modify-phases %standard-phases
336+
         (add-before 'build 'fix-python3-import
337+
           (lambda _
338+
             (substitute* "ana/datalayer.py"
339+
               (("import cPickle as pickle") "import pickle")))))))
284340
    (home-page "https://github.com/zardus/ana")
285341
    (synopsis "Provide easy distributed data storage for python objects")
286342
    (description "ANA is a project to provide easy distributed data storage for

291347
object every time you need to send it.")
292348
    (license license:bsd-2)))
293349
294-
;; Not reproducible.
295350
(define-public python2-ana
296-
  (package-with-python2 python-ana))
351+
  (package
352+
    (inherit (package-with-python2 python-ana))
353+
    (arguments
354+
     `(#:python ,python-2))))
297355
298356
(define-public python-webassets
299357
  (package

605663
606664
(define-public python2-mysqlclient
607665
  (package-with-python2 python-mysqlclient))
666+
667+
(define-public python-plumbum
668+
  (package
669+
    (name "python-plumbum")
670+
    (version "1.6.3")
671+
    (source
672+
     (origin
673+
       (method url-fetch)
674+
       (uri (pypi-uri "plumbum" version))
675+
       (sha256
676+
        (base32 "083kikr1f7qzpp5jllss97dy8d6249v7ia3wg9i0a6wz8l4ffj82"))))
677+
    (build-system python-build-system)
678+
    (native-inputs
679+
     `(("pytest" ,python-pytest)))
680+
    (home-page "https://plumbum.readthedocs.io/en/latest")
681+
    (synopsis "Shell script-like programs in Python")
682+
    (description
683+
      "Plumbum (Latin for lead, which was used to create pipes back in the day)
684+
is a small yet feature-rich library for shell script-like programs in Python.
685+
The motto of the library is ???Never write shell scripts again???, and thus it
686+
attempts to mimic the shell syntax (???shell combinators???) where it makes sense,
687+
while keeping it all Pythonic and cross-platform.")
688+
    (license license:expat)))
689+
690+
(define-public python2-plumbum
691+
  (package-with-python2 python-plumbum))

more/packages/smt.scm

5757
    (description "Z3 is a theorem prover from Microsoft Research.")
5858
    (license license:expat)))
5959
60-
;; Not reproducible and tests fail.
61-
(define-public python-z3-solver
60+
(define-public python2-z3-solver
6261
  (package
6362
    (inherit z3-solver)
64-
    (name "python-z3-solver")
63+
    (name "python2-z3-solver")
6564
    (build-system python-build-system)
6665
    (propagated-inputs
6766
     `(("z3" ,z3-solver)))
6867
    (arguments
69-
     `(#:phases
68+
     `(#:python ,python-2
69+
       #:phases
7070
       (modify-phases %standard-phases
7171
         (add-before 'build 'prepare
7272
           (lambda* (#:key inputs #:allow-other-keys)

8484
               (("self.execute\\(.*") "\n")
8585
               (("scripts=.*") "\n")))))))))
8686
87-
(define-public python2-z3-solver
88-
  (package-with-python2 python-z3-solver))
89-
 
90-
(define-public python-claripy
87+
(define-public python2-claripy
9188
  (package
92-
    (name "python-claripy")
89+
    (name "python2-claripy")
9390
    (version "6.7.1.31")
9491
    (source (origin
9592
              (method url-fetch)
9693
              (uri (pypi-uri "claripy" version))
9794
              (sha256
9895
               (base32
99-
                "0jpnqggx40kfj9cc48aylxsaqy61isl2yb3agib8nqh9v4j1rwqa"))))
96+
                "0jpnqggx40kfj9cc48aylxsaqy61isl2yb3agib8nqh9v4j1rwqa"))
97+
              (modules '((guix build utils)))
98+
              (snippet
99+
               `(substitute* "setup.py"
100+
                  (("angr-only-z3-custom==9002") "z3-solver")))))
100101
    (build-system python-build-system)
101102
    (propagated-inputs
102-
     `(("ana" ,python-ana)
103-
       ("z3" ,python-z3-solver)))
103+
     `(("ana" ,python2-ana)
104+
       ("z3" ,python2-z3-solver)))
105+
    (arguments
106+
     `(#:python ,python-2))
104107
    (home-page "https://github.com/angr/claripy")
105108
    (synopsis "Claripy is a abstracted constraint-solving wrapper")
106109
    (description "Claripy is a abstracted constraint-solving wrapper.")
107110
    (license license:bsd-2)))
108-
109-
(define-public python2-claripy
110-
  (package-with-python2 python-claripy))