3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/analysis/radare2/cutter.nix

54 lines
1.5 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub
# nativeBuildInputs
, qmake, pkgconfig
# Qt
, qtbase, qtsvg, qtwebengine
# buildInputs
, r2-for-cutter
, python3
, wrapQtAppsHook }:
stdenv.mkDerivation rec {
2019-07-11 12:14:24 +01:00
pname = "radare2-cutter";
2020-08-01 09:56:54 +01:00
version = "1.11.0";
src = fetchFromGitHub {
owner = "radareorg";
repo = "cutter";
rev = "v${version}";
2020-08-01 09:56:54 +01:00
sha256 = "1xvdap7hpkjz6rg0ngnql1p18p93b8w9gv130g818nwcjsh9i2y5";
};
postUnpack = "export sourceRoot=$sourceRoot/src";
# 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)" ""
'';
nativeBuildInputs = [ qmake pkgconfig ];
buildInputs = [ qtbase qtsvg qtwebengine r2-for-cutter python3 wrapQtAppsHook ];
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"
];
enableParallelBuilding = true;
meta = with stdenv.lib; {
description = "A Qt and C++ GUI for radare2 reverse engineering framework";
homepage = src.meta.homepage;
license = licenses.gpl3;
maintainers = with maintainers; [ mic92 dtzWill ];
};
}