@@ -30,18 +30,28 @@ 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
4757 meta = with lib; {