guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/03: gnu: Add radare2.


From: julien lepiller
Subject: 03/03: gnu: Add radare2.
Date: Sat, 26 Aug 2017 07:03:14 -0400 (EDT)

roptat pushed a commit to branch master
in repository guix.

commit 446695775d6d8d15546c5d0fc535e9f5c83a7b7e
Author: Julien Lepiller <address@hidden>
Date:   Fri Aug 11 20:54:40 2017 +0200

    gnu: Add radare2.
    
    * gnu/packages/engineering.scm (radare2): New variable.
---
 gnu/packages/engineering.scm | 55 ++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 53 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index b4ccc44..008a96b 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -23,6 +23,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages engineering)
+  #:use-module (srfi srfi-1)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix gexp)
@@ -60,6 +61,7 @@
   #:use-module (gnu packages linux)               ;FIXME: for pcb
   #:use-module (gnu packages m4)
   #:use-module (gnu packages maths)
+  #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
@@ -71,8 +73,7 @@
   #:use-module (gnu packages tls)
   #:use-module (gnu packages tex)
   #:use-module (gnu packages wxwidgets)
-  #:use-module (gnu packages xorg)
-  #:use-module (srfi srfi-1))
+  #:use-module (gnu packages xorg))
 
 (define-public librecad
   (package
@@ -1078,3 +1079,53 @@ bindings for Python, Java, OCaml and more.")
 
 (define-public python2-capstone
   (package-with-python2 python-capstone))
+
+(define-public radare2
+  (package
+    (name "radare2")
+    (version "1.6.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://radare.mikelloc.com/get/"; version "/"
+                                  name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "16ggsk40zz6hyvclvqj1r4bh4hb78jf0d6ppry1jk4r0j30wm7cm"))
+              (modules '((guix build utils)))
+              (snippet
+                '(begin
+                  (substitute* "libr/asm/p/Makefile"
+                    (("LDFLAGS\\+=") "LDFLAGS+=-Wl,-rpath=$(LIBDIR) "))
+                  (substitute* "libr/parse/p/Makefile"
+                    (("LDFLAGS\\+=") "LDFLAGS+=-Wl,-rpath=$(LIBDIR) "))
+                  (substitute* "libr/bin/p/Makefile"
+                    (("LDFLAGS\\+=") "LDFLAGS+=-Wl,-rpath=$(LIBDIR) "))))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:tests? #f; tests require git and network access
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'mklibdir
+           (lambda* (#:key inputs #:allow-other-keys)
+             (mkdir-p (string-append (assoc-ref %outputs "out") "/lib"))
+             #t)))
+       #:configure-flags
+       (list "--with-sysmagic" "--with-syszip" "--with-openssl"
+             "--without-nonpic" "--with-rpath" "--with-syscapstone")
+       #:make-flags
+       (list "CC=gcc")))
+    (inputs
+     `(("openssl" ,openssl)
+       ("zip" ,zip)
+       ("gmp" ,gmp)
+       ("capstone" ,capstone)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (home-page "https://radare.org/";)
+    (synopsis "Portable reversing framework")
+    (description
+      "Radare project started as a forensics tool, a scriptable commandline
+hexadecimal editor able to open disk files, but later support for analyzing
+binaries, disassembling code, debugging programs, attaching to remote gdb
+servers, ...")
+    (license license:lgpl3)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]