1{stdenv, fetchurl, pkgconfig, libusb, readline, libewf, perl, zlib, openssl,
2gtk ? null, vte ? null, gtkdialog ? null,
3python ? null,
4ruby ? null,
5lua ? null,
6useX11, rubyBindings, pythonBindings, luaBindings}:
7
8assert useX11 -> (gtk != null && vte != null && gtkdialog != null);
9assert rubyBindings -> ruby != null;
10assert pythonBindings -> python != null;
11
12let
13 optional = stdenv.lib.optional;
14in
15stdenv.mkDerivation rec {
16 version = "0.9.7";
17 name = "radare2-${version}";
18
19 src = fetchurl {
20 url = "http://radare.org/get/${name}.tar.xz";
21 sha256 = "01sdsnbvx1qzyradj03sg24rk2bi9x58m40r0aqj8skv92c87s7l";
22 };
23
24
25 buildInputs = [pkgconfig readline libusb libewf perl zlib openssl]
26 ++ optional useX11 [gtkdialog vte gtk]
27 ++ optional rubyBindings [ruby]
28 ++ optional pythonBindings [python]
29 ++ optional luaBindings [lua];
30
31 meta = {
32 description = "Free advanced command line hexadecimal editor";
33 homepage = http://radare.org/;
34 license = stdenv.lib.licenses.gpl2Plus;
35 maintainers = with stdenv.lib.maintainers; [raskin];
36 platforms = with stdenv.lib.platforms; linux;
37 inherit version;
38 };
39}