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:
commit
52cbbffc2d
2 changed files with 26 additions and 6 deletions
|
@ -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
|
||||
|
|
13
pkgs/development/python-modules/debugpy/hardcode-lldb.patch
Normal file
13
pkgs/development/python-modules/debugpy/hardcode-lldb.patch
Normal 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),
|
Loading…
Add table
Add a link
Reference in a new issue