Skip to content

Commit 87aa6db

Browse files
committed
Make Python plugins work
1 parent 8a71da9 commit 87aa6db

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

package.nix

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
libxkbcommon,
1313
wayland-scanner,
1414
kdePackages,
15+
python3,
1516

1617
binaryNinjaEdition ? "personal",
1718
}:
@@ -27,9 +28,11 @@ in
2728
stdenv.mkDerivation {
2829
pname = "binary-ninja";
2930
inherit (sources) version;
31+
src = source;
3032
nativeBuildInputs = [
3133
makeWrapper
3234
autoPatchelfHook
35+
python3.pkgs.wrapPython
3336
kdePackages.wrapQtAppsHook
3437
];
3538
buildInputs = [
@@ -47,7 +50,7 @@ stdenv.mkDerivation {
4750
dbus
4851
wayland-scanner.out
4952
];
50-
src = source;
53+
pythonDeps = [ python3.pkgs.pip ];
5154
buildPhase = ":";
5255
installPhase = ''
5356
runHook preInstall
@@ -56,7 +59,10 @@ stdenv.mkDerivation {
5659
mkdir -p $out/opt
5760
cp -r * $out/opt
5861
chmod +x $out/opt/binaryninja
62+
buildPythonPath "$pythonDeps"
5963
makeWrapper $out/opt/binaryninja $out/bin/binaryninja \
64+
--prefix LD_LIBRARY_PATH : "${python3}/lib" \
65+
--prefix PYTHONPATH : "$program_PYTHONPATH" \
6066
"''${qtWrapperArgs[@]}"
6167
6268
runHook postInstall

0 commit comments

Comments
 (0)