summaryrefslogtreecommitdiffstats
path: root/pkgs/desktops/pantheon
diff options
context:
space:
mode:
authorworldofpeace <worldofpeace@protonmail.ch>2019-12-07 20:04:58 -0500
committerworldofpeace <worldofpeace@protonmail.ch>2020-04-06 02:48:07 -0400
commita1ced50fa01ba7edbab4742d12e24f1dca465c56 (patch)
tree873dd9ccac80f298b8cfdb49e6b03c4d8b63da71 /pkgs/desktops/pantheon
parent548d7eaa8b2b78f4811488ba462bfbde8f7e6136 (diff)
pantheon.elementary-settings-daemon: 3.30.2 -> 3.34.1
Diffstat (limited to 'pkgs/desktops/pantheon')
-rw-r--r--pkgs/desktops/pantheon/default.nix4
-rw-r--r--pkgs/desktops/pantheon/services/elementary-settings-daemon/default.nix150
-rw-r--r--pkgs/desktops/pantheon/services/elementary-settings-daemon/elementary-dpms.patch84
-rw-r--r--pkgs/desktops/pantheon/services/elementary-settings-daemon/fix-paths.patch11
-rw-r--r--pkgs/desktops/pantheon/services/elementary-settings-daemon/global-backlight-helper.patch30
5 files changed, 174 insertions, 105 deletions
diff --git a/pkgs/desktops/pantheon/default.nix b/pkgs/desktops/pantheon/default.nix
index 8e8e5fc6318c..2bcbbf40d948 100644
--- a/pkgs/desktops/pantheon/default.nix
+++ b/pkgs/desktops/pantheon/default.nix
@@ -110,7 +110,9 @@ lib.makeScope pkgs.newScope (self: with self; {
# We're using ubuntu and elementary's patchset due to reasons
# explained here -> https://github.com/elementary/greeter/issues/92#issuecomment-376215614
# Take note of "I am holding off on "fixing" this bug for as long as possible."
- elementary-settings-daemon = callPackage ./services/elementary-settings-daemon { };
+ elementary-settings-daemon = callPackage ./services/elementary-settings-daemon {
+ inherit (gnome3) gnome-desktop;
+ };
pantheon-agent-geoclue2 = callPackage ./services/pantheon-agent-geoclue2 { };
diff --git a/pkgs/desktops/pantheon/services/elementary-settings-daemon/default.nix b/pkgs/desktops/pantheon/services/elementary-settings-daemon/default.nix
index 582793ff5906..e5aa31ca0fb3 100644
--- a/pkgs/desktops/pantheon/services/elementary-settings-daemon/default.nix
+++ b/pkgs/desktops/pantheon/services/elementary-settings-daemon/default.nix
@@ -1,135 +1,105 @@
-{ accountsservice
-, alsaLib
-, colord
-, docbook_xsl
-, fetchgit
+{ stdenv
+, substituteAll
, fetchurl
-, geoclue2
-, geocode-glib
-, gettext
-, glib
+, fetchgit
+, meson
+, ninja
+, pkgconfig
, gnome3
-, gsettings-desktop-schemas
+, perl
+, gettext
, gtk3
+, glib
+, libnotify
+, libgnomekbd
, lcms2
+, libpulseaudio
+, alsaLib
, libcanberra-gtk3
-, libgnomekbd
-, libgudev
+, upower
+, colord
, libgweather
-, libnotify
-, libpulseaudio
+, polkit
+, gsettings-desktop-schemas
+, geoclue2
+, systemd
+, libgudev
, libwacom
-, libxml2
, libxslt
-, meson
-, mousetweaks
+, libxml2
+, modemmanager
, networkmanager
-, ninja
-, nss
-, pantheon
-, perl
-, pkgconfig
-, polkit
+, gnome-desktop
+, geocode-glib
+, docbook_xsl
+, accountsservice
+, wrapGAppsHook
, python3
-, stdenv
-, substituteAll
-, systemd
, tzdata
-, upower
-, libXtst
-, wrapGAppsHook
+, nss
+, gcr
+, pantheon
}:
stdenv.mkDerivation rec {
pname = "elementary-settings-daemon";
- version = "3.30.2";
+ version = "3.34.1";
repoName = "gnome-settings-daemon";
- src = fetchurl {
- url = "mirror://gnome/sources/${repoName}/${stdenv.lib.versions.majorMinor version}/${repoName}-${version}.tar.xz";
- sha256 = "0c663csa3gnsr6wm0xfll6aani45snkdj7zjwjfzcwfh8w4a3z12";
- };
-
- # Source for ubuntu's patchset
- src2 = fetchgit {
+ src = fetchgit {
url = "https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/${repoName}";
- rev = "refs/tags/ubuntu/${version}-1ubuntu1";
- sha256 = "02awkhw6jqm7yh812mw0nsdmsljfi8ksz8mvd2qpns5pcv002g2c";
+ rev = "refs/tags/ubuntu/${version}-1ubuntu2";
+ sha256 = "0w0dsbzif7v0gk61rs9g20ldlimbdwb5yvlfdc568yyx5z643jbv";
};
# We've omitted the 53_sync_input_sources_to_accountsservice patch because it breaks the build.
# See: https://gist.github.com/worldofpeace/2f152a20b7c47895bb93239fce1c9f52
#
# Also omit ubuntu_calculator_snap.patch as that's obviously not useful here.
- patches = let patchPath = "${src2}/debian/patches"; in [
+ patches = let patchPath = "${src}/debian/patches"; in [
(substituteAll {
src = ./fix-paths.patch;
- inherit tzdata mousetweaks;
+ inherit tzdata;
})
./global-backlight-helper.patch
"${patchPath}/45_suppress-printer-may-not-be-connected-notification.patch"
+ #"${patchPath}/53_sync_input_sources_to_accountsservice.patch"
"${patchPath}/64_restore_terminal_keyboard_shortcut_schema.patch"
"${patchPath}/correct_logout_action.patch"
"${patchPath}/ubuntu-lid-close-suspend.patch"
- "${patchPath}/revert-wacom-migration.patch"
"${patchPath}/revert-gsettings-removals.patch"
"${patchPath}/revert-mediakeys-dbus-interface-drop.patch"
- "${patchPath}/ubuntu_ibus_configs.patch"
- (fetchurl {
- url = "https://github.com/elementary/os-patches/raw/6975d1c254cb6ab913b8e2396877203aea8eaa65/debian/patches/elementary-dpms.patch";
- sha256 = "0kh508ppiv4nvkg30gmw85cljlfq1bvkzhvf1iaxw0snb0mwgsxi";
- })
+ #"${patchPath}/ubuntu_ibus_configs.patch"
+ # https://github.com/elementary/os-patches/blob/6975d1c254cb6ab913b8e2396877203aea8eaa65/debian/patches/elementary-dpms.patch
+ ./elementary-dpms.patch
];
- postPatch = ''
- for f in gnome-settings-daemon/codegen.py plugins/power/gsd-power-constants-update.pl meson_post_install.py; do
- chmod +x $f
- patchShebangs $f
- done
- '';
-
- postFixup = ''
- for autostart in $(grep -rl "OnlyShowIn=GNOME;" $out/etc/xdg/autostart)
- do
- echo "Patching OnlyShowIn to Pantheon in: $autostart"
- sed -i "s,OnlyShowIn=GNOME;,OnlyShowIn=Pantheon;," $autostart
- done
-
- # This breaks lightlocker https://github.com/elementary/session-settings/commit/b0e7a2867608c3a3916f9e4e21a68264a20e44f8
- # TODO: shouldn't be neeed for the 5.1 greeter (awaiting release)
- rm $out/etc/xdg/autostart/org.gnome.SettingsDaemon.ScreensaverProxy.desktop
-
- # So the polkit policy can reference /run/current-system/sw/bin/elementary-settings-daemon/gsd-backlight-helper
- mkdir -p $out/bin/elementary-settings-daemon
- ln -s $out/libexec/gsd-backlight-helper $out/bin/elementary-settings-daemon/gsd-backlight-helper
- '';
-
nativeBuildInputs = [
- docbook_xsl
- gettext
- libxml2
- libxslt
meson
ninja
- perl
pkgconfig
- python3
+ perl
+ gettext
+ libxml2
+ libxslt
+ docbook_xsl
wrapGAppsHook
+ python3
];
buildInputs = [
accountsservice
alsaLib
colord
+ gcr
geoclue2
geocode-glib
glib
- gnome3.gnome-desktop
+ gnome-desktop
gsettings-desktop-schemas
gtk3
lcms2
- libXtst
libcanberra-gtk3
libgnomekbd # for org.gnome.libgnomekbd.keyboard schema
libgudev
@@ -137,6 +107,7 @@ stdenv.mkDerivation rec {
libnotify
libpulseaudio
libwacom
+ modemmanager
networkmanager
nss
polkit
@@ -152,6 +123,29 @@ stdenv.mkDerivation rec {
# we're using plain
NIX_CFLAGS_COMPILE = "-DG_DISABLE_CAST_CHECKS";
+ postPatch = ''
+ for f in gnome-settings-daemon/codegen.py plugins/power/gsd-power-constants-update.pl meson_post_install.py; do
+ chmod +x $f
+ patchShebangs $f
+ done
+ '';
+
+ postFixup = ''
+ for autostart in $(grep -rl "OnlyShowIn=GNOME;" $out/etc/xdg/autostart)
+ do
+ echo "Patching OnlyShowIn to Pantheon in: $autostart"
+ sed -i "s,OnlyShowIn=GNOME;,OnlyShowIn=Pantheon;," $autostart
+ done
+
+ # This breaks lightlocker https://github.com/elementary/session-settings/commit/b0e7a2867608c3a3916f9e4e21a68264a20e44f8
+ # TODO: shouldn't be neeed for the 5.1 greeter (awaiting release)
+ rm $out/etc/xdg/autostart/org.gnome.SettingsDaemon.ScreensaverProxy.desktop
+
+ # So the polkit policy can reference /run/current-system/sw/bin/elementary-settings-daemon/gsd-backlight-helper
+ mkdir -p $out/bin/elementary-settings-daemon
+ ln -s $out/libexec/gsd-backlight-helper $out/bin/elementary-settings-daemon/gsd-backlight-helper
+ '';
+
passthru = {
updateScript = gnome3.updateScript {
packageName = repoName;
diff --git a/pkgs/desktops/pantheon/services/elementary-settings-daemon/elementary-dpms.patch b/pkgs/desktops/pantheon/services/elementary-settings-daemon/elementary-dpms.patch
new file mode 100644
index 000000000000..14d056ceca27
--- /dev/null
+++ b/pkgs/desktops/pantheon/services/elementary-settings-daemon/elementary-dpms.patch
@@ -0,0 +1,84 @@
+diff --git a/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in b/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in
+index ec805d8a..cf0d6793 100644
+--- a/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in
++++ b/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in
+@@ -11,6 +11,11 @@
+ <summary>Activation of this plugin</summary>
+ <description>Whether this plugin would be activated by unity-settings-daemon or not</description>
+ </key>
++ <key name="manage-dpms-defaults" type="b">
++ <default>false</default>
++ <summary>Reset X DPMS values</summary>
++ <description>Whether DPMS values will be adjusted by gnome-settings-daemon</description>
++ </key>
+ <key name="idle-brightness" type="i">
+ <default>30</default>
+ <summary>The brightness of the screen when idle</summary>
+diff --git a/plugins/power/gpm-common.c b/plugins/power/gpm-common.c
+index a7ca87fb..a56a7cdc 100644
+--- a/plugins/power/gpm-common.c
++++ b/plugins/power/gpm-common.c
+@@ -280,6 +280,18 @@ disable_builtin_screensaver (gpointer unused)
+ return TRUE;
+ }
+
++gboolean
++manage_dpms (void)
++{
++ GSettings *settings;
++ gboolean manage_dpms_defaults;
++
++ settings = g_settings_new ("org.gnome.settings-daemon.plugins.power");
++ manage_dpms_defaults = g_settings_get_boolean (settings, "manage-dpms-defaults");
++ g_object_unref (settings);
++ return manage_dpms_defaults;
++}
++
+ guint
+ gsd_power_enable_screensaver_watchdog (void)
+ {
+@@ -290,7 +302,7 @@ gsd_power_enable_screensaver_watchdog (void)
+ * way. The defaults are now applied in Fedora 20 from
+ * being "0" by default to being "600" by default */
+ gdk_x11_display_error_trap_push (gdk_display_get_default ());
+- if (DPMSQueryExtension(GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &dummy, &dummy))
++ if (manage_dpms () && DPMSQueryExtension(GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &dummy, &dummy))
+ DPMSSetTimeouts (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), 0, 0, 0);
+ gdk_x11_display_error_trap_pop_ignored (gdk_display_get_default ());
+ id = g_timeout_add_seconds (XSCREENSAVER_WATCHDOG_TIMEOUT,
+diff --git a/plugins/power/gpm-common.h b/plugins/power/gpm-common.h
+index 88a8e00e..af106479 100644
+--- a/plugins/power/gpm-common.h
++++ b/plugins/power/gpm-common.h
+@@ -34,6 +34,7 @@ gchar *gpm_get_timestring (guint time);
+ gboolean gsd_power_is_hardware_a_vm (void);
+ guint gsd_power_enable_screensaver_watchdog (void);
+ void reset_idletime (void);
++gboolean manage_dpms (void);
+
+ /* Backlight helpers */
+
+diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
+index c500fa38..445496ee 100644
+--- a/plugins/power/gsd-power-manager.c
++++ b/plugins/power/gsd-power-manager.c
+@@ -1033,6 +1033,9 @@ backlight_enable (GsdPowerManager *manager)
+ gboolean ret;
+ GError *error = NULL;
+
++ if (!(manage_dpms ()))
++ return;
++
+ iio_proxy_claim_light (manager, TRUE);
+ ret = gnome_rr_screen_set_dpms_mode (manager->rr_screen,
+ GNOME_RR_DPMS_ON,
+@@ -1052,6 +1055,9 @@ backlight_disable (GsdPowerManager *manager)
+ gboolean ret;
+ GError *error = NULL;
+
++ if (!(manage_dpms ()))
++ return;
++
+ iio_proxy_claim_light (manager, FALSE);
+ ret = gnome_rr_screen_set_dpms_mode (manager->rr_screen,
+ GNOME_RR_DPMS_OFF,
diff --git a/pkgs/desktops/pantheon/services/elementary-settings-daemon/fix-paths.patch b/pkgs/desktops/pantheon/services/elementary-settings-daemon/fix-paths.patch
index 272656fae78c..2229302cab7c 100644
--- a/pkgs/desktops/pantheon/services/elementary-settings-daemon/fix-paths.patch
+++ b/pkgs/desktops/pantheon/services/elementary-settings-daemon/fix-paths.patch
@@ -13,14 +13,3 @@
typedef struct _TzDB TzDB;
typedef struct _TzLocation TzLocation;
---- a/plugins/mouse/gsd-mouse-manager.c
-+++ b/plugins/mouse/gsd-mouse-manager.c
-@@ -118,7 +118,7 @@ set_mousetweaks_daemon (GsdMouseManager *manager,
- gboolean run_daemon = dwell_click_enabled || secondary_click_enabled;
-
- if (run_daemon || manager->priv->mousetweaks_daemon_running)
-- comm = g_strdup_printf ("mousetweaks %s",
-+ comm = g_strdup_printf ("@mousetweaks@/bin/mousetweaks %s",
- run_daemon ? "" : "-s");
- else
- return;
diff --git a/pkgs/desktops/pantheon/services/elementary-settings-daemon/global-backlight-helper.patch b/pkgs/desktops/pantheon/services/elementary-settings-daemon/global-backlight-helper.patch
index c073b23e6b9f..dcdc83934ba6 100644
--- a/pkgs/desktops/pantheon/services/elementary-settings-daemon/global-backlight-helper.patch
+++ b/pkgs/desktops/pantheon/services/elementary-settings-daemon/global-backlight-helper.patch
@@ -1,18 +1,18 @@
-diff --git a/plugins/power/gpm-common.c b/plugins/power/gpm-common.c
-index e83f1549..15890053 100644
---- a/plugins/power/gpm-common.c
-+++ b/plugins/power/gpm-common.c
-@@ -452,7 +452,7 @@ run_backlight_helper (enum BacklightHelperCommand command,
- gchar *argv[5] = { 0 };
-
- argv[0] = "pkexec";
-- argv[1] = LIBEXECDIR "/gsd-backlight-helper";
-+ argv[1] = "/run/current-system/sw/bin/elementary-settings-daemon/gsd-backlight-helper";
- argv[2] = helper_args[command];
- argv[3] = value;
-
+diff --git a/plugins/power/gsd-backlight.c b/plugins/power/gsd-backlight.c
+index d7d10fd2..5619d6ad 100644
+--- a/plugins/power/gsd-backlight.c
++++ b/plugins/power/gsd-backlight.c
+@@ -358,7 +358,7 @@ gsd_backlight_run_set_helper (GsdBacklight *backlight, GTask *task)
+ proc = g_subprocess_new (G_SUBPROCESS_FLAGS_STDOUT_SILENCE,
+ &error,
+ "pkexec",
+- LIBEXECDIR "/gsd-backlight-helper",
++ "/run/current-system/sw/bin/elementary-settings-daemon/gsd-backlight-helper",
+ g_udev_device_get_sysfs_path (backlight->udev_device),
+ data->value_str, NULL);
+ } else {
diff --git a/plugins/power/org.gnome.settings-daemon.plugins.power.policy.in.in b/plugins/power/org.gnome.settings-daemon.plugins.power.policy.in.in
-index f16300f8..f19bba3e 100644
+index f16300f8..79d6bd17 100644
--- a/plugins/power/org.gnome.settings-daemon.plugins.power.policy.in.in
+++ b/plugins/power/org.gnome.settings-daemon.plugins.power.policy.in.in
@@ -25,7 +25,7 @@
@@ -22,5 +22,5 @@ index f16300f8..f19bba3e 100644
- <annotate key="org.freedesktop.policykit.exec.path">@libexecdir@/gsd-backlight-helper</annotate>
+ <annotate key="org.freedesktop.policykit.exec.path">/run/current-system/sw/bin/elementary-settings-daemon/gsd-backlight-helper</annotate>
</action>
-
+
</policyconfig>