Unverified Commit fde10e05 authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

gnome-keyring: allow xdg-autostart in other environments than GNOME (#436128)

parents 280b3f45 ae5fd028
Loading
Loading
Loading
Loading
+18 −8
Original line number Diff line number Diff line
@@ -90,8 +90,18 @@ stdenv.mkDerivation rec {
    runHook preCheck
  '';

  postFixup =
    # disable OnlyShowIn to allow xdg-autostart in any DE
    # https://wiki.archlinux.org/title/GNOME/Keyring#Using_gnome-keyring-daemon_outside_desktop_environments_(KDE,_GNOME,_XFCE,_...)
    ''
      for f in "$out"/etc/xdg/autostart/*.desktop; do
        [ -e "$f" ] || continue
        substituteInPlace "$f" \
          --replace-fail "OnlyShowIn=" "#OnlyShowIn="
      done
    ''
    # Use wrapped gnome-keyring-daemon with cap_ipc_lock=ep
  postFixup = lib.optionalString useWrappedDaemon ''
    + lib.optionalString useWrappedDaemon ''
      files=($out/etc/xdg/autostart/* $out/share/dbus-1/services/*)

      for file in ''${files[*]}; do