[PATCH] Added capstone 4.

  • Done
  • quality assurance status badge
Details
3 participants
  • Gerd Heber
  • Liliana Marie Prikler
  • Nicolas Goaziou
Owner
unassigned
Submitted by
Gerd Heber
Severity
normal
G
G
Gerd Heber wrote on 21 Feb 2021 23:35
(address . guix-patches@gnu.org)(name . Gerd Heber)(address . gheber@hdfgroup.org)
20210221223521.6116-1-gheber@hdfgroup.org
---
gnu/packages/engineering.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 034dabc3f9..4987377840 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1495,6 +1495,31 @@ 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)))
+(define-public capstone
+ (package
+ (name "capstone")
+ (version "4.0.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/aquynh/capstone"
+ "/archive/" version ".tar.gz"))
+ (sha256
+ (base32
+ "0sjjbqps48az4map0kmai7j7dak3gy0xcq0sgx8fg09g0acdg0bw"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:build-type "Release"
+ #:tests? #t))
+ (home-page "https://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)))
+
;; FIXME: This package has a timestamp embedded in
;; lib/python3.5/site-packages/capstone/__pycache__/__iti__.cpython-35.pyc
(define-public python-capstone
--
2.30.1
N
N
Nicolas Goaziou wrote on 23 Feb 2021 14:09
(name . Gerd Heber)(address . gerd.heber@gmail.com)
87y2ffx75w.fsf@nicolasgoaziou.fr
Hello,

Gerd Heber <gerd.heber@gmail.com> writes:

Toggle quote (3 lines)
> gnu/packages/engineering.scm | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)

Thank you for your patch! Some comments follow.

First, there is already a capstone package in Guix, at version 3.5. Is
there a particular reason for not updating it instead of creating a new
variable?

Toggle quote (3 lines)
> + (uri (string-append "https://github.com/aquynh/capstone"
> + "/archive/" version ".tar.gz"))

This URI is unstable. We prefer using tagged commits instead. See for
example already defined capstone package.

Toggle quote (2 lines)
> + #:tests? #t))

This is the default, so it can be omitted.

Toggle quote (3 lines)
> + (home-page "https://www.capstone-engine.org")
> + (synopsis "Lightweight multi-platform, multi-architecture disassembly framework")

Nitpick: I would remove multi-platform, since it makes little sense from
Guix POV.

Toggle quote (3 lines)
> + (description
> + "Capstone is a lightweight multi-platform, multi-architecture disassembly

Ditto.

Toggle quote (2 lines)
> +framework. Capstone can disassemble machine code for many supported

You need to add two spaces after full stops.

Toggle quote (3 lines)
> +architectures such as x86, x86_64, arm, arm64, mips, ppc, sparc, sysz and
> +xcore. It provides bindings for Python, Java, OCaml and more.")

Also, could you provide a proper commit message, for example

gnu: capstone: Update to 4.0.2.

* gnu/packages/engineering.scm (capstone): Update to 4.0.2.

Could you send an updated patch?

Regards,
--
Nicolas Goaziou
L
L
Liliana Marie Prikler wrote on 18 Mar 2023 10:32
09ffb5a9166bc3ea2c65b4db50aa664b0c0f5fe1.camel@gmail.com
Am Dienstag, dem 23.02.2021 um 14:09 +0100 schrieb Nicolas Goaziou:
Toggle quote (7 lines)
> Also, could you provide a proper commit message, for example
>
>     gnu: capstone: Update to 4.0.2.
>
>     * gnu/packages/engineering.scm (capstone): Update to 4.0.2.
>
> Could you send an updated patch?
Given that capstone 4.0.2 currently exists in Guix, I suppose that is
no longer necessary.

Cheers
Closed
?