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-08-24 05:40:35 +01:00
|
|
|
version = "1.11.1";
|
2017-12-05 01:33:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "radareorg";
|
|
|
|
repo = "cutter";
|
|
|
|
rev = "v${version}";
|
2020-08-24 05:40:35 +01:00
|
|
|
sha256 = "0kscl0yf5qxacqnz3pp47r94yiwnc4rwirnr2x580z10fwhsivki";
|
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
|
|
|
};
|
|
|
|
}
|