nixpkgs/pkgs/development/tools/analysis/radare2/default.nix
Jörg Thalheim 81b1905c86
radare2: 5.2.0 -> 5.2.1
Also get rid of update script:
Since we no longer bundle capstone it just adds
a bunch of metadata.
Now we can easier auto-update radare2.
2021-04-22 09:10:17 +02:00

92 lines
1.8 KiB
Nix

{ 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.2.1";
src = fetchFromGitHub {
owner = "radare";
repo = "radare2";
rev = version;
sha256 = "0n3k190qjhdlj10fjqijx6ismz0g7fk28i83j0480cxdqgmmlbxc";
};
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;
};
}