From 859c46c933a7705bc5daaab73ebf0861bc206f6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Hedin=20Br=C3=B8nner?= Date: Sun, 9 Feb 2020 01:39:46 +0100 Subject: [PATCH] gnome3.gnome-flashback: 3.34.2 -> 3.36.0 * Removed the use of gnome-screensaver (https://gitlab.gnome.org/GNOME/gnome-flashback/issues/18) * Flashback's menu-related environment variables are now set in the gnome3.nix module instead of gnome-panel to resolve dependency conflict. --- .../services/x11/desktop-managers/gnome3.nix | 9 +-- .../gnome-3/misc/gnome-flashback/default.nix | 65 ++++++++++++++++++- .../gnome-3/misc/gnome-panel/default.nix | 5 +- 3 files changed, 69 insertions(+), 10 deletions(-) diff --git a/nixos/modules/services/x11/desktop-managers/gnome3.nix b/nixos/modules/services/x11/desktop-managers/gnome3.nix index 5756cf14ed94..c053533621af 100644 --- a/nixos/modules/services/x11/desktop-managers/gnome3.nix +++ b/nixos/modules/services/x11/desktop-managers/gnome3.nix @@ -180,7 +180,7 @@ in wmCommand = "${pkgs.gnome3.metacity}/bin/metacity"; } ++ cfg.flashback.customSessions); - security.pam.services.gnome-screensaver = { + security.pam.services.gnome-flashback = { enableGnomeKeyring = true; }; @@ -191,9 +191,10 @@ in inherit (wm) wmName; }) cfg.flashback.customSessions); - services.dbus.packages = [ - pkgs.gnome3.gnome-screensaver - ]; + # gnome-panel needs these for menu applet + environment.sessionVariables.XDG_DATA_DIRS = [ "${pkgs.gnome3.gnome-flashback}/share" ]; + # TODO: switch to sessionVariables (resolve conflict) + environment.variables.XDG_CONFIG_DIRS = [ "${pkgs.gnome3.gnome-flashback}/etc/xdg" ]; }) (mkIf serviceCfg.core-os-services.enable { diff --git a/pkgs/desktops/gnome-3/misc/gnome-flashback/default.nix b/pkgs/desktops/gnome-3/misc/gnome-flashback/default.nix index c1791ee5bbdc..3d8196f12f41 100644 --- a/pkgs/desktops/gnome-3/misc/gnome-flashback/default.nix +++ b/pkgs/desktops/gnome-3/misc/gnome-flashback/default.nix @@ -1,6 +1,7 @@ { stdenv , autoreconfHook , fetchurl +, fetchpatch , gettext , glib , gnome-bluetooth @@ -17,7 +18,10 @@ , libxml2 , pkgconfig , polkit +, gdm +, systemd , upower +, pam , wrapGAppsHook , writeTextFile , writeShellScriptBin @@ -27,16 +31,64 @@ let pname = "gnome-flashback"; - version = "3.34.2"; - requiredComponents = wmName: "RequiredComponents=${wmName};gnome-flashback;gnome-panel;org.gnome.SettingsDaemon.A11ySettings;org.gnome.SettingsDaemon.Color;org.gnome.SettingsDaemon.Datetime;org.gnome.SettingsDaemon.Housekeeping;org.gnome.SettingsDaemon.Keyboard;org.gnome.SettingsDaemon.MediaKeys;org.gnome.SettingsDaemon.Power;org.gnome.SettingsDaemon.PrintNotifications;org.gnome.SettingsDaemon.Rfkill;org.gnome.SettingsDaemon.ScreensaverProxy;org.gnome.SettingsDaemon.Sharing;org.gnome.SettingsDaemon.Smartcard;org.gnome.SettingsDaemon.Sound;org.gnome.SettingsDaemon.Wacom;org.gnome.SettingsDaemon.XSettings;"; + version = "3.36.0"; + + # From data/sessions/Makefile.am + requiredComponentsCommon = [ + "gnome-flashback" + "gnome-panel" + ]; + requiredComponentsGsd = [ + "org.gnome.SettingsDaemon.A11ySettings" + "org.gnome.SettingsDaemon.Color" + "org.gnome.SettingsDaemon.Datetime" + "org.gnome.SettingsDaemon.Housekeeping" + "org.gnome.SettingsDaemon.Keyboard" + "org.gnome.SettingsDaemon.MediaKeys" + "org.gnome.SettingsDaemon.Power" + "org.gnome.SettingsDaemon.PrintNotifications" + "org.gnome.SettingsDaemon.Rfkill" + "org.gnome.SettingsDaemon.ScreensaverProxy" + "org.gnome.SettingsDaemon.Sharing" + "org.gnome.SettingsDaemon.Smartcard" + "org.gnome.SettingsDaemon.Sound" + "org.gnome.SettingsDaemon.UsbProtection" + "org.gnome.SettingsDaemon.Wacom" + "org.gnome.SettingsDaemon.XSettings" + ]; + requiredComponents = wmName: "RequiredComponents=${stdenv.lib.concatStringsSep ";" ([wmName] ++ requiredComponentsCommon ++ requiredComponentsGsd)};"; gnome-flashback = stdenv.mkDerivation rec { name = "${pname}-${version}"; src = fetchurl { url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz"; - sha256 = "1726xcm2q94nfvb055d3m61m20s0xy3xl1fc3ds3k3rcrn457riv"; + sha256 = "qwlTFs4wn6PpB7uZkpvnmECsSTa62OQMpgiIXoZoMRk="; }; + patches = [ + # Fix locking screen from log out dialogue + # https://gitlab.gnome.org/GNOME/gnome-flashback/issues/43 + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gnome-flashback/-/commit/7b151e0a947e4b49e1cee80097c1f8946ba46af9.patch"; + sha256 = "pJcJb6EGlInlWpLbbBajWydBtbiWK3AMHzsFQ26bmwA="; + }) + + # Hide GNOME Shell Extensions manager from menu + # https://gitlab.gnome.org/GNOME/gnome-flashback/issues/42 + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gnome-flashback/-/commit/75f95379779c24d42d1e72cdcd4c16a9c6db7657.patch"; + sha256 = "cwKZSQTFi0f/T1Ld6vJceQFHBsikOhkp//J1IY5aMKA="; + }) + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gnome-flashback/-/commit/12cacf25b1190d9c9bba42f085e54895de7a076e.patch"; + sha256 = "mx37kLs3x/e9RJCGN6z8/7b5Tz6yzxeN/14NFi8IWfA="; + }) + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gnome-flashback/-/commit/7954376f32348028a3bdba0ea182b0000c4fcb0a.patch"; + sha256 = "ZEQcg9OoIOIMh/yUYQ9R1Ky8DElteaDQrSdwFtA4Yno="; + }) + ]; + # make .desktop Execs absolute postPatch = '' patch -p0 <