git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #101571 from Pamplemousse/cutter
commit589d025f73e1559a53e6cb9626ea9a8f9697c7c7 authorJörg Thalheim <Mic92@users.noreply.github.com> dateThu 19 Nov 2020, 11:14 (6 years ago) parenta610ed1f971674
2 files changed+17−7
pkgs/development/tools/analysis/radare2/cutter.nix+16−6 pkgs/top-level/all-packages.nix+1−1
pkgs/development/tools/analysis/radare2/cutter.nix+16−6
@@ -1,4 +1,4 @@
1−{ stdenv, fetchFromGitHub
1+{ fetchFromGitHub, lib, mkDerivation
22# nativeBuildInputs
33, qmake, pkgconfig
44# Qt
@@ -8,7 +8,7 @@
88, python3
99, wrapQtAppsHook }:
1010
11−stdenv.mkDerivation rec {
11+mkDerivation rec {
1212 pname = "radare2-cutter";
1313 version = "1.12.0";
1414
@@ -30,21 +30,31 @@ stdenv.mkDerivation rec {
3030 --replace "include(lib_radare2.pri)" ""
3131 '';
3232
33− nativeBuildInputs = [ qmake pkgconfig ];
34− buildInputs = [ qtbase qtsvg qtwebengine r2-for-cutter python3 wrapQtAppsHook ];
33+ nativeBuildInputs = [ qmake pkgconfig python3 wrapQtAppsHook ];
34+ propagatedBuildInputs = [ python3.pkgs.pyside2 ];
35+ buildInputs = [ qtbase qtsvg qtwebengine r2-for-cutter python3 ];
3536
36− qmakeFlags = [
37+ qmakeFlags = with python3.pkgs; [
3738 "CONFIG+=link_pkgconfig"
3839 "PKGCONFIG+=r_core"
3940 # Leaving this enabled doesn't break build but generates errors
4041 # at runtime (to console) about being unable to load needed bits.
4142 # Disable until can be looked at.
4243 "CUTTER_ENABLE_JUPYTER=false"
44+ # Enable support for Python plugins
45+ "CUTTER_ENABLE_PYTHON=true"
46+ "CUTTER_ENABLE_PYTHON_BINDINGS=true"
47+ "SHIBOKEN_EXTRA_OPTIONS+=-I${r2-for-cutter}/include/libr"
4348 ];
4449
50+ preBuild = ''
51+ export NIX_LDFLAGS="$NIX_LDFLAGS $(pkg-config --libs python3-embed)"
52+ qtWrapperArgs+=(--prefix PYTHONPATH : "$PYTHONPATH")
53+ '';
54+
4555 enableParallelBuilding = true;
4656
47− meta = with stdenv.lib; {
57+ meta = with lib; {
4858 description = "A Qt and C++ GUI for radare2 reverse engineering framework";
4959 homepage = src.meta.homepage;
5060 license = licenses.gpl3;
pkgs/top-level/all-packages.nix+1−1
@@ -11739,7 +11739,7 @@ julia_15 = callPackage ../development/compilers/julia/1.5.nix {
1173911739 lua = lua5;
1174011740 } // (config.radare or {}))) radare2 r2-for-cutter;
1174111741
11742− radare2-cutter = libsForQt514.callPackage ../development/tools/analysis/radare2/cutter.nix { };
11742+ radare2-cutter = libsForQt515.callPackage ../development/tools/analysis/radare2/cutter.nix { };
1174311743
1174411744 ragel = ragelStable;
1174511745