>From fa5478ac8eccf51a62af574ef2be6316ba5c247b Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Fri, 11 Aug 2017 20:41:39 +0200 Subject: [PATCH 1/3] gnu: Add capstone. * gnu/packages/engineering.scm (capstone): New variable. --- gnu/packages/engineering.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 650ac2b89..8c6280c14 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -1013,3 +1013,38 @@ specified in high-level description language into ready-to-compile C code for the API of spice simulators. Based on transformations specified in XML language, ADMS transforms Verilog-AMS code into other target languages.") (license license:gpl3))) + +(define-public capstone + (package + (name "capstone") + (version "3.0.5-rc2") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/aquynh/capstone/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1cqms9r2p43aiwp5spd84zaccp16ih03r7sjhrv16nddahj0jz2q")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f + #:make-flags (list (string-append "PREFIX=" %output) + "CC=gcc") + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'fix-cstool-ldflags + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "cstool/Makefile" + (("LDFLAGS =") + (string-append "LDFLAGS = -Wl,-rpath=" (assoc-ref outputs "out") + "/lib")))))))) + (home-page "http://www.capstone-engine.org") + (synopsis "Lightweight multi-platform, multi-architecture disassembly framework") + (description + "Capstone is a lightweight multi-platform, multi-architecture disassembly +framework. Capstone can disassemble machine code for many supported architectures +such as x86, x86_64, arm, arm64, mips, ppc, sparc, sysz and xcore. It provides +bindings for Python, Java, OCaml and more.") + (license license:bsd-3))) -- 2.14.1