Add capstone-git
more/packages/binary.scm
| 124 | 124 | ||
| 125 | 125 | (define-public python2-capstone | |
| 126 | 126 | (package-with-python2 python-capstone)) | |
| 127 | + | ||
| 128 | + | (define-public capstone-git | |
| 129 | + | (package | |
| 130 | + | (inherit capstone) | |
| 131 | + | (version "3.0.5-rc2") | |
| 132 | + | (name "capstone-git") | |
| 133 | + | (source (origin | |
| 134 | + | (method git-fetch) | |
| 135 | + | (uri (git-reference (url "https://github.com/aquynh/capstone.git") | |
| 136 | + | (commit "b6c4c3f5c79684b02d0672b50b4db494f6ce60f9"))) | |
| 137 | + | (file-name (string-append name "-" version)) | |
| 138 | + | (sha256 | |
| 139 | + | (base32 | |
| 140 | + | "0kqdfp0flx5czzwr490pzn9mzsxcw8qpcfz4y7bpf2cklsr4mh25")))) | |
| 141 | + | (arguments | |
| 142 | + | `(#:tests? #f | |
| 143 | + | #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) | |
| 144 | + | "CC=gcc") | |
| 145 | + | #:phases | |
| 146 | + | (modify-phases %standard-phases | |
| 147 | + | (delete 'configure) | |
| 148 | + | (add-before 'build 'fix-cstool | |
| 149 | + | (lambda* (#:key outputs #:allow-other-keys) | |
| 150 | + | (substitute* "cstool/Makefile" | |
| 151 | + | (("LDFLAGS =") | |
| 152 | + | (string-append "LDFLAGS = -Wl,-rpath=" (assoc-ref outputs "out") "/lib")))))))))) | |
| 153 | + | ||
| 154 | + | (define-public python-capstone-git | |
| 155 | + | (package | |
| 156 | + | (inherit capstone-git) | |
| 157 | + | (name "python-capstone-git") | |
| 158 | + | (propagated-inputs | |
| 159 | + | `(("capstone" ,capstone-git))) | |
| 160 | + | (build-system python-build-system) | |
| 161 | + | (arguments | |
| 162 | + | `(#:tests? #f | |
| 163 | + | #:phases | |
| 164 | + | (modify-phases %standard-phases | |
| 165 | + | (add-after 'unpack 'chdir-and-fix-setup-py | |
| 166 | + | (lambda _ | |
| 167 | + | (chdir "bindings/python") | |
| 168 | + | (substitute* "setup.py" ((" *build_libraries.*") "\n")) | |
| 169 | + | (substitute* "capstone/__init__.py" | |
| 170 | + | (("pkg_resources.resource_filename.*") | |
| 171 | + | (string-append "\"" (assoc-ref %build-inputs "capstone") "/lib\",\n"))) | |
| 172 | + | #t))))))) | |
| 173 | + | ||
| 174 | + | (define-public python2-capstone-git | |
| 175 | + | (package-with-python2 python-capstone-git)) | |
| 176 | + | ||
| 127 | 177 | ||
| 128 | 178 | (define-public python-pefile | |
| 129 | 179 | (package |