My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/development/tools/analysis/radare2/default.nix

91 lines
1.8 KiB

{ lib
, stdenv
, fetchFromGitHub
, buildPackages
, pkg-config
, libusb-compat-0_1
, readline
, libewf
, perl
, zlib
, openssl
, libuv
, file
, libzip
, xxHash
, gtk2
, vte
, gtkdialog
, python3
, ruby
, lua
, capstone
, useX11 ? false
, rubyBindings ? false
, pythonBindings ? false
, luaBindings ? false
}:
stdenv.mkDerivation rec {
pname = "radare2";
version = "5.3.0";
src = fetchFromGitHub {
owner = "radare";
repo = "radare2";
rev = version;
sha256 = "sha256-xndnRVlqTB/NH1ROo7xkftLP7DufsJu4CCA9MCOEeng=";
};
postInstall = ''
install -D -m755 $src/binr/r2pm/r2pm $out/bin/r2pm
'';
WITHOUT_PULL = "1";
makeFlags = [
"GITTAP=${version}"
"RANLIB=${stdenv.cc.bintools.bintools}/bin/${stdenv.cc.bintools.targetPrefix}ranlib"
];
configureFlags = [
"--with-sysmagic"
"--with-syszip"
"--with-sysxxhash"
"--with-syscapstone"
"--with-openssl"
];
enableParallelBuilding = true;
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ pkg-config ];
buildInputs = [
capstone
file
readline
libusb-compat-0_1
libewf
perl
zlib
openssl
libuv
] ++ lib.optional useX11 [ gtkdialog vte gtk2 ]
++ lib.optional rubyBindings [ ruby ]
++ lib.optional pythonBindings [ python3 ]
++ lib.optional luaBindings [ lua ];
propagatedBuildInputs = [
# radare2 exposes r_lib which depends on these libraries
file # for its list of magic numbers (`libmagic`)
libzip
xxHash
];
meta = {
description = "unix-like reverse engineering framework and commandline tools";
homepage = "http://radare.org/";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ raskin makefu mic92 ];
platforms = with lib.platforms; linux;
inherit version;
};
}