git.iko.soy/typeable/nixpkgs
on master help sign in
radare2-cutter: Support Python plugins

Signed-off-by: Pamplemousse <xav.maso@gmail.com>

commitf9716740ce434d758e2c2a717ff7464670bed87d authorPamplemousse <xav.maso@gmail.com> dateFri 23 Oct 2020, 16:13 (6 years ago) parent056a35a
1 file changed+13−3
pkgs/development/tools/analysis/radare2/cutter.nix+13−3
pkgs/development/tools/analysis/radare2/cutter.nix+13−3
@@ -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; {