0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

Merge pull request #216750 from elohmeier/debugpy-lldb

python3Packages.debugpy: aarch64-darwin support
This commit is contained in:
Weijia Wang 2023-03-06 16:55:52 +02:00 committed by GitHub
commit 52cbbffc2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 6 deletions

View file

@ -13,6 +13,7 @@
, pytest-xdist
, pytestCheckHook
, requests
, llvmPackages
}:
buildPythonPackage rec {
@ -30,12 +31,6 @@ buildPythonPackage rec {
};
patches = [
# Hard code GDB path (used to attach to process)
(substituteAll {
src = ./hardcode-gdb.patch;
inherit gdb;
})
# Use nixpkgs version instead of versioneer
(substituteAll {
src = ./hardcode-version.patch;
@ -51,6 +46,18 @@ buildPythonPackage rec {
# To avoid this issue, debugpy should be installed using python.withPackages:
# python.withPackages (ps: with ps; [ debugpy ])
./fix-test-pythonpath.patch
] ++ lib.optionals stdenv.isLinux [
# Hard code GDB path (used to attach to process)
(substituteAll {
src = ./hardcode-gdb.patch;
inherit gdb;
})
] ++ lib.optionals stdenv.isDarwin [
# Hard code LLDB path (used to attach to process)
(substituteAll {
src = ./hardcode-lldb.patch;
inherit (llvmPackages) lldb;
})
];
# Remove pre-compiled "attach" libraries and recompile for host platform

View file

@ -0,0 +1,13 @@
diff --git a/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py b/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py
index ed43e370..b28ab453 100644
--- a/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py
+++ b/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py
@@ -494,7 +494,7 @@ def run_python_code_mac(pid, python_code, connect_debugger_tracing=False, show_d
is_debug = 0
# Note that the space in the beginning of each line in the multi-line is important!
cmd = [
- 'lldb',
+ '@lldb@/bin/lldb',
'--no-lldbinit', # Do not automatically parse any '.lldbinit' files.
# '--attach-pid',
# str(pid),