diff options
author | Will Dietz <w@wdtz.org> | 2018-08-21 17:37:15 -0500 |
---|---|---|
committer | Will Dietz <w@wdtz.org> | 2018-08-21 18:22:38 -0500 |
commit | 29573133569af11328ad9fd67c78f9a120605eca (patch) | |
tree | ca24effe29b409ce53666a8b7b9982b7503dbdfa /pkgs/development/tools/analysis/radare2/cutter.nix | |
parent | ec7af525bae2816cc26785aced3034706f7e81e1 (diff) |
r2, r2-cutter: refactor and bump cutter to 1.7
Diffstat (limited to 'pkgs/development/tools/analysis/radare2/cutter.nix')
-rw-r--r-- | pkgs/development/tools/analysis/radare2/cutter.nix | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/pkgs/development/tools/analysis/radare2/cutter.nix b/pkgs/development/tools/analysis/radare2/cutter.nix new file mode 100644 index 000000000000..4269661a4ff3 --- /dev/null +++ b/pkgs/development/tools/analysis/radare2/cutter.nix @@ -0,0 +1,54 @@ +{ stdenv, fetchFromGitHub +# nativeBuildInputs +, qmake, pkgconfig +# Qt +, qtbase, qtsvg, qtwebengine +# buildInputs +, r2-for-cutter +, python3 }: + +let + version = "1.7"; +in +stdenv.mkDerivation rec { + name = "radare2-cutter-${version}"; + + src = fetchFromGitHub { + owner = "radareorg"; + repo = "cutter"; + rev = "v${version}"; + sha256 = "0z9wzxd5hw0ivakrg3xiv4zx1rjj032hlmizq0pxj22xjrj1gg9n"; + }; + + 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 ]; + + 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; [ dtzWill ]; + }; +} |