LD_LIBRARY_PATH
is not set globally on nixos for a reason. Runtime dependency resolution is not how nixos is designed to work.
Installing libraries into environment.systemPackages
also does not do anything useful.
The “nix way” to handle this kind of problem is to package the software you want to use with nix, resolving those dependencies at “build time” (even if you don’t actually compile the project, you can still use autoPatchelfHook
and such to do this resolution at that point).
If that doesn’t work, the catch-all solution is to package the software with buildFHSUserEnv
.