heaptrack: enable rustc-demangle
Rust is switching to their own symbol mangling convention (V0) which requires dynamically loading the rustc-demangle library in heaptrack. https://blog.rust-lang.org/2025/11/20/switching-to-v0-mangling-on-nightly/
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
sparsehash,
|
||||
zstd,
|
||||
kdePackages,
|
||||
rustc-demangle,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
@@ -38,6 +39,7 @@ stdenv.mkDerivation {
|
||||
libunwind
|
||||
sparsehash
|
||||
zstd
|
||||
rustc-demangle
|
||||
]
|
||||
++ (with kdePackages; [
|
||||
qtbase
|
||||
@@ -53,6 +55,11 @@ stdenv.mkDerivation {
|
||||
elfutils
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/interpret/demangler.cpp \
|
||||
--replace-fail "librustc_demangle.so" "${rustc-demangle}/lib/librustc_demangle.so"
|
||||
'';
|
||||
|
||||
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
makeWrapper \
|
||||
$out/Applications/KDE/heaptrack_gui.app/Contents/MacOS/heaptrack_gui \
|
||||
|
||||
Reference in New Issue
Block a user