electron: add libnotify to the RPATH

Electron loads libnotify dynamically via dlopen(3), which fails if it
is not in the RPATH. This, in turn, breaks desktop notifications in,
e.g., mattermost-desktop.
This commit is contained in:
Maximilian Marx 2024-04-15 11:17:07 +02:00
parent cfd6b5fc90
commit 461a23c756
No known key found for this signature in database
GPG Key ID: D981CA0FF602751D

View File

@ -190,6 +190,18 @@ in (chromium.override { upstream-info = info.chromium; }).mkDerivation (base: {
runHook postInstall
'';
postFixup =
let
libPath = lib.makeLibraryPath [
libnotify
];
in
base.postFixup + ''
patchelf \
--add-rpath "${libPath}" \
$out/libexec/electron/electron
'';
requiredSystemFeatures = [ "big-parallel" ];
passthru = {