fix(nix): export LD_LIBRARY_PATH for libappindicator in devShell
The package's `postInstall` wraps the installed `qbz` binary with `LD_LIBRARY_PATH` so it can `dlopen(libayatana-appindicator3.so.1)` at runtime. Inside `nix develop`, users run `target/debug/qbz` directly without that wrapper, so the tray init panics at startup. Add a `shellHook` that mirrors `postInstall`'s library path. Same root cause as the previous LIBCLANG_PATH fix: `inputsFrom` makes dependencies available at build time but does not set runtime/env vars the way the installed wrapper does. Refs #312. cc
This commit is contained in:
1 file changed
+14
@@ -106,6 +106,20 @@
|
||||
rustfmt
|
||||
clippy
|
||||
];
|
||||
|
||||
# The package's `postInstall` wraps the installed binary with
|
||||
# LD_LIBRARY_PATH so libappindicator is dlopen-able at runtime.
|
||||
# Inside `nix develop` we run `target/debug/qbz` directly, with
|
||||
# no wrapper, so we replicate that here — otherwise the tray
|
||||
# init panics with "Failed to load ayatana-appindicator3 or
|
||||
# appindicator3 dynamic library" (issue #312).
|
||||
shellHook = ''
|
||||
export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath [
|
||||
pkgs.libappindicator
|
||||
pkgs.libappindicator-gtk3
|
||||
pkgs.libayatana-appindicator
|
||||
]}''${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
|
||||
'';
|
||||
};
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user