in order to have vulkan enabled in chromium I need to provide the path to the vulkan loader via the LD_LIBRARY_PATH variable. Therefore I call chromium like this:
How can I make this persistent such that when I start chromium it can find the vulkan loader? I don’t want to have chromium start like this from the command line.
Is there a way to define an overlay/override to modify the chromium command? Or should I export the LD_LIBRARY_PATH env. variable?
This will mean you need to rebuild the chromium package though Might be better to create a separate derivation that just depends on the chromium one, and is just a little shell script that sets the library path. Perhaps:
Hey @TLATER
thank you for that great answer! I learned a lot from it. Your last solution works for me if I replace prev.makeLibraryPath with lib.makeLibraryPath. Because of that wrapper script though in KDE chromium doesn’t appear as an application anymore but as a script. Also somehow chromium isn’t the default browser anymore. But that is okay.
I also tried the other two of your solutions but they didn’t have any effect. I build my system with flakes and nixpkgs-input: nixos-unstable. So I should have already had chromium including that commit that you referenced with the libvulkan.so.1 in the libExecPath. This does not work for me. I see in chromium still the log message that the library couldn’t be found.
Anyway thanks to you answer I made progress!