jetbrains.clion: patch lldb instead of replacing
Using LLDB to debug rust programs failed due to a missing executable. See https://github.com/NixOS/nixpkgs/pull/186976#issuecomment-1252194831
This commit is contained in:
parent
8a57b26b00
commit
de8743c273
@ -5,6 +5,9 @@
|
||||
, maven
|
||||
, autoPatchelfHook
|
||||
, libdbusmenu
|
||||
, patchelf
|
||||
, openssl
|
||||
, expat
|
||||
, vmopts ? null
|
||||
}:
|
||||
|
||||
@ -41,12 +44,14 @@ let
|
||||
}).overrideAttrs (attrs: {
|
||||
nativeBuildInputs = (attrs.nativeBuildInputs or []) ++ optionals (stdenv.isLinux) [
|
||||
autoPatchelfHook
|
||||
patchelf
|
||||
];
|
||||
buildInputs = (attrs.buildInputs or []) ++ optionals (stdenv.isLinux) [
|
||||
python3
|
||||
stdenv.cc.cc
|
||||
libdbusmenu
|
||||
lldb
|
||||
openssl.out
|
||||
expat
|
||||
];
|
||||
dontAutoPatchelf = true;
|
||||
postFixup = (attrs.postFixup or "") + optionalString (stdenv.isLinux) ''
|
||||
@ -58,9 +63,11 @@ let
|
||||
# bundled gdb does not find libcrypto 10
|
||||
rm -rf bin/gdb/linux
|
||||
ln -s ${gdb} bin/gdb/linux
|
||||
# bundled lldb does not find libssl
|
||||
rm -rf bin/lldb/linux
|
||||
ln -s ${lldb} bin/lldb/linux
|
||||
|
||||
ls -d $PWD/bin/lldb/linux/lib/python3.8/lib-dynload/* |
|
||||
xargs patchelf \
|
||||
--replace-needed libssl.so.10 libssl.so \
|
||||
--replace-needed libcrypto.so.10 libcrypto.so
|
||||
|
||||
autoPatchelf $PWD/bin
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user