summaryrefslogtreecommitdiffstats
path: root/pkgs/development/python-modules/debugpy/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/debugpy/default.nix')
-rw-r--r--pkgs/development/python-modules/debugpy/default.nix19
1 files changed, 13 insertions, 6 deletions
diff --git a/pkgs/development/python-modules/debugpy/default.nix b/pkgs/development/python-modules/debugpy/default.nix
index c45d6621398f..4035cc52328e 100644
--- a/pkgs/development/python-modules/debugpy/default.nix
+++ b/pkgs/development/python-modules/debugpy/default.nix
@@ -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