diff --git a/pkgs/development/tools/analysis/radare2/cutter.nix b/pkgs/development/tools/analysis/radare2/cutter.nix index d4c554f8ff63..d4a102ac097b 100644 --- a/pkgs/development/tools/analysis/radare2/cutter.nix +++ b/pkgs/development/tools/analysis/radare2/cutter.nix @@ -30,18 +30,28 @@ mkDerivation rec { --replace "include(lib_radare2.pri)" "" ''; - nativeBuildInputs = [ qmake pkgconfig ]; - buildInputs = [ qtbase qtsvg qtwebengine r2-for-cutter python3 wrapQtAppsHook ]; + nativeBuildInputs = [ qmake pkgconfig python3 wrapQtAppsHook ]; + propagatedBuildInputs = [ python3.pkgs.pyside2 ]; + buildInputs = [ qtbase qtsvg qtwebengine r2-for-cutter python3 ]; - qmakeFlags = [ + qmakeFlags = with python3.pkgs; [ "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" + # Enable support for Python plugins + "CUTTER_ENABLE_PYTHON=true" + "CUTTER_ENABLE_PYTHON_BINDINGS=true" + "SHIBOKEN_EXTRA_OPTIONS+=-I${r2-for-cutter}/include/libr" ]; + preBuild = '' + export NIX_LDFLAGS="$NIX_LDFLAGS $(pkg-config --libs python3-embed)" + qtWrapperArgs+=(--prefix PYTHONPATH : "$PYTHONPATH") + ''; + enableParallelBuilding = true; meta = with lib; {