Unverified Commit 461a23c7 authored by Maximilian Marx's avatar Maximilian Marx
Browse files

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.
parent cfd6b5fc
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -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 = {