summaryrefslogtreecommitdiff
path: root/modules/tanelorn/packages/engineering.scm
diff options
context:
space:
mode:
Diffstat (limited to 'modules/tanelorn/packages/engineering.scm')
-rw-r--r--modules/tanelorn/packages/engineering.scm91
1 files changed, 90 insertions, 1 deletions
diff --git a/modules/tanelorn/packages/engineering.scm b/modules/tanelorn/packages/engineering.scm
index cab0c0d..32ff9ca 100644
--- a/modules/tanelorn/packages/engineering.scm
+++ b/modules/tanelorn/packages/engineering.scm
@@ -5,7 +5,17 @@
#:use-module (guix build-system meson)
#:use-module (guix git-download)
#:use-module (guix gexp)
- #:use-module (guix packages))
+ #:use-module (guix packages)
+ #:use-module (tanelorn packages)
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages digest)
+ #:use-module (gnu packages engineering)
+ #:use-module (gnu packages javascript)
+ #:use-module (gnu packages libevent)
+ #:use-module (gnu packages multiprecision)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages python)
+ #:use-module (gnu packages tls))
(define-public sdb
(package
@@ -40,3 +50,82 @@
(description "SDB is a simple key/value database based on djb's cdb disk
storage that supports JSON and array introspection.")
(license license:expat)))
+
+(define-public radare2-6.0.7
+ (package
+ (name "radare2")
+ (version "6.0.7")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/radareorg/radare2")
+ (commit version)))
+ (sha256
+ (base32
+ "1nkqa8mkmvmbc3812gf5ayfmzyf0krjgc1695rpkphw3fsl76rgx"))
+ (file-name (git-file-name name version))
+ (patches
+ (tanelorn-patches "radare2-fix-meson-build-to-use-sys-sdb.patch"
+ "radare2-fix-meson-build-to-use-sys-qjs.patch"))))
+ (build-system meson-build-system)
+ (arguments
+ (list
+ #:configure-flags
+ #~(list "-Duse_sys_capstone=true"
+ "-Duse_sys_magic=true"
+ "-Duse_sys_zip=true"
+ "-Duse_sys_zlib=true"
+ "-Duse_sys_lz4=true"
+ "-Duse_sys_xxhash=true"
+ "-Duse_sys_openssl=true")
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; CHECK LATER: This patches an incorrect relative include.
+ (add-before 'build 'fix-relative-include
+ (lambda* _
+ (substitute* "../source/libr/arch/p/java/plugin.c"
+ (("include \".." all)
+ (string-append all "/..")))))
+ ;; These tests require sample binaries from an external repository.
+ (add-before 'check 'skip-tests
+ (lambda* _
+ (substitute* '("../source/test/unit/test_bin.c"
+ "../source/test/unit/test_dwarf.c"
+ "../source/test/unit/test_dwarf_info.c"
+ "../source/test/unit/test_dwarf_integration.c"
+ "../source/test/unit/test_pdb.c"
+ "../source/test/unit/test_r2pipe.c")
+ (("(^| )main *\\(.*" all)
+ (string-append all " exit (77);\n"))))))))
+ (inputs
+ (list capstone
+ gmp
+ libuv
+ libzip
+ lz4
+ openssl
+ python
+ quickjs-ng
+ sdb
+ zip
+ zlib))
+ (native-inputs
+ (list pkg-config))
+ (propagated-inputs
+ (list xxhash))
+ (home-page "https://radare.org/")
+ (synopsis "Reverse engineering framework")
+ (description
+ "Radare2 is a complete framework for reverse-engineering, debugging, and
+analyzing binaries. It is composed of a set of small utilities that can be
+used together or independently from the command line.
+
+Radare2 is built around a scriptable disassembler and hexadecimal editor that
+support a variety of executable formats for different processors and operating
+systems, through multiple back ends for local and remote files and disk
+images.
+
+It can also compare (@dfn{diff}) binaries with graphs and extract information
+like relocation symbols. It is able to deal with malformed binaries, making
+it suitable for security research and analysis.")
+ (license license:lgpl3)))