Closed meteficha closed 7 years ago
Thanks for the report.
I'm not familiar with NixOS, but are you sure that there is no any other - more standard - symlink for libnotify? If not, I don't see any obstacles in adding extra check in /nix/store/2ankjgnfbwjwkxlwrkc9d28ys46aqfaa-libnotify-0.7.6/lib/libnotify.so.4
.
Here is function that needs to be changed.
That hash on the filepath changes every time libnotify
or its dependencies change in any way. Hardcoding this path wouldn't solve the problem.
Right.. I wonder how other apps on NixOS know where libs are located...
Maybe you could hardcode /nix/store/*/lib/libnotify.so.4
? Or does NixOS keep different versions of libs?
There is workaround:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/run/current-system/sw/lib thunderbird
l'm sure there is more idiomatic way to make libnotify visible.
I fixed it by overriding the Firefox derivation so that libnotify will be added to LD_LIBRARY_PATH
in the Firefox wrapper. This is basically @wedens's fix, but making use of the existing Nix infrastructure.
I'm not sure if it makes sense to include this in Nixpkgs, since it is only needed when using GNotifier.
Another approach could be to package GNotifier for Nix as @meteficha suggests, but that's probably not the best way to go for browser add-ons (as opposed to plugins, which are packaged).
Oops, meant to include this link: https://github.com/martijnvermaat/dotfiles/commit/faffd5c
It seems this has since been fixed: NixOS/nixpkgs#18712
At least now for me it works without above mentioned workarounds.
For example, my
libnotify.so.4
is currently at/nix/store/2ankjgnfbwjwkxlwrkc9d28ys46aqfaa-libnotify-0.7.6/lib/libnotify.so.4
. I did a hack and linked it to/usr/local/lib/libnotify.so.4
, but it's a really bad hack as the link will break in the future.I'm not sure if there's anything that can be done here, though. Perhaps the only solution is adding a GNotifier package to NixOS (?).