2018-06-25 16:13:02 +01:00
|
|
|
{ stdenv, fetchFromGitHub
|
|
|
|
# nativeBuildInputs
|
2018-07-12 16:22:03 +01:00
|
|
|
, qmake, pkgconfig
|
2018-06-25 16:13:02 +01:00
|
|
|
# Qt
|
|
|
|
, qtbase, qtsvg, qtwebengine
|
|
|
|
# buildInputs
|
2018-08-21 23:37:15 +01:00
|
|
|
, r2-for-cutter
|
2019-09-05 12:20:09 +01:00
|
|
|
, python3
|
|
|
|
, wrapQtAppsHook }:
|
2017-12-05 01:33:51 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-07-11 12:14:24 +01:00
|
|
|
pname = "radare2-cutter";
|
2020-03-25 21:20:56 +00:00
|
|
|
version = "1.10.2";
|
2017-12-05 01:33:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "radareorg";
|
|
|
|
repo = "cutter";
|
|
|
|
rev = "v${version}";
|
2020-03-25 21:20:56 +00:00
|
|
|
sha256 = "1icv56gxpzdjqn37pk3g99vgpljdc77i6k0x601iw2885s7s01n6";
|
2017-12-05 01:33:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postUnpack = "export sourceRoot=$sourceRoot/src";
|
|
|
|
|
2018-07-10 23:09:36 +01:00
|
|
|
# Remove this "very helpful" helper file intended for discovering r2,
|
|
|
|
# as it's a doozy of harddcoded paths and unexpected behavior.
|
|
|
|
# Happily Nix has everything all set so we don't need it,
|
|
|
|
# other than as basis for the qmakeFlags set below.
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Cutter.pro \
|
|
|
|
--replace "include(lib_radare2.pri)" ""
|
|
|
|
'';
|
|
|
|
|
2018-07-12 16:22:03 +01:00
|
|
|
nativeBuildInputs = [ qmake pkgconfig ];
|
2019-09-05 12:20:09 +01:00
|
|
|
buildInputs = [ qtbase qtsvg qtwebengine r2-for-cutter python3 wrapQtAppsHook ];
|
2017-12-05 01:33:51 +00:00
|
|
|
|
2018-07-11 00:51:56 +01:00
|
|
|
qmakeFlags = [
|
|
|
|
"CONFIG+=link_pkgconfig"
|
|
|
|
"PKGCONFIG+=r_core"
|
|
|
|
# Leaving this enabled doesn't break build but generates errors
|
|
|
|
# at runtime (to console) about being unable to load needed bits.
|
|
|
|
# Disable until can be looked at.
|
|
|
|
"CUTTER_ENABLE_JUPYTER=false"
|
|
|
|
];
|
2018-07-10 23:09:36 +01:00
|
|
|
|
2017-12-05 01:33:51 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A Qt and C++ GUI for radare2 reverse engineering framework";
|
|
|
|
homepage = src.meta.homepage;
|
|
|
|
license = licenses.gpl3;
|
2018-09-04 23:08:39 +01:00
|
|
|
maintainers = with maintainers; [ mic92 dtzWill ];
|
2017-12-05 01:33:51 +00:00
|
|
|
};
|
|
|
|
}
|