Unverified Commit 65d8de75 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

Merge pull request #303590 from mmarx/fix-mattermost-desktop-notifications

electron: Add libnotify, pipewire, and several other runtime dependencies to RPATH; fixes desktop notifications and screenshare
parents 3773b498 2297fb98
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
{ lib, stdenv
, fetchurl
, gcc-unwrapped
, dpkg
, util-linux
, bash
@@ -57,8 +56,7 @@ stdenv.mkDerivation rec {

  postFixup = ''
    makeWrapper ${electron}/bin/electron $out/bin/${pname} \
      --add-flags $out/share/${pname}/resources/app.asar \
      --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ gcc-unwrapped.lib ]}"
      --add-flags $out/share/${pname}/resources/app.aasar
  '';

  meta = with lib; {
+10 −4
Original line number Diff line number Diff line
{ lib, stdenv, fetchurl, dpkg, makeWrapper, electron, libsecret
, desktop-file-utils , callPackage }:
{ lib
, stdenv
, fetchurl
, dpkg
, makeWrapper
, electron
, desktop-file-utils
, callPackage
}:

let

@@ -33,8 +40,7 @@ stdenv.mkDerivation rec {
    cp -R opt/Standard\ Notes/resources/app.asar $out/share/standardnotes/

    makeWrapper ${electron}/bin/electron $out/bin/standardnotes \
      --add-flags $out/share/standardnotes/app.asar \
      --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libsecret stdenv.cc.cc.lib ]}
      --add-flags $out/share/standardnotes/app.asar

    ${desktop-file-utils}/bin/desktop-file-install --dir $out/share/applications \
      --set-key Exec --set-value standardnotes usr/share/applications/standard-notes.desktop
+1 −2
Original line number Diff line number Diff line
@@ -60,8 +60,7 @@ in {
    makeWrapper ${electron_27}/bin/electron $out/bin/${pname} \
      --set "LOCAL_GIT_DIRECTORY" ${git} \
      --add-flags $out/share/${pname}/resources/app \
      --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \
      --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc.lib ]}"
      --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
  '';

  passthru.updateScript = nix-update-script { };
+0 −7
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@
, AppKit
, CoreServices
, desktopToDarwinBundle
, libnotify
, useKeytar ? true
}:

@@ -79,11 +78,6 @@ stdenv.mkDerivation (finalAttrs: builtins.removeAttrs pinData [ "hashes" ] // {
  '';

  installPhase =
    let
      libPath = lib.makeLibraryPath [
        libnotify
      ];
    in
  ''
    runHook preInstall

@@ -111,7 +105,6 @@ stdenv.mkDerivation (finalAttrs: builtins.removeAttrs pinData [ "hashes" ] // {
    # LD_PRELOAD workaround for sqlcipher not found: https://github.com/matrix-org/seshat/issues/102
    makeWrapper '${electron}/bin/electron' "$out/bin/${executableName}" \
      --set LD_PRELOAD ${sqlcipher}/lib/libsqlcipher.so \
      --set LD_LIBRARY_PATH "${libPath}" \
      --add-flags "$out/share/element/electron" \
      --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"

+0 −2
Original line number Diff line number Diff line
@@ -10,7 +10,6 @@
, libXtst
, zlib
, electron
, pipewire
}:

buildNpmPackage rec {
@@ -72,7 +71,6 @@ buildNpmPackage rec {

    makeWrapper ${lib.getExe electron} $out/bin/jitsi-meet-electron \
        --add-flags $out/share/jitsi-meet-electron/resources/app.asar \
        --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ pipewire ]} \
        --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \
        --inherit-argv0

Loading