diff --git a/pkgs/desktops/gnome/core/evolution-data-server/default.nix b/pkgs/desktops/gnome/core/evolution-data-server/default.nix index e66479913958..f372f688eabc 100644 --- a/pkgs/desktops/gnome/core/evolution-data-server/default.nix +++ b/pkgs/desktops/gnome/core/evolution-data-server/default.nix @@ -1,6 +1,6 @@ { stdenv , lib -, fetchzip +, fetchurl , substituteAll , pkg-config , gnome @@ -55,16 +55,9 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; - src = fetchzip { + src = fetchurl { url = "mirror://gnome/sources/evolution-data-server/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "7TXEArGpnOxfQGnMtacYwHjCyH15RAjJW09lvVo1uDI="; - - postFetch = '' - # Very dirty hack to make update script happy. - substituteInPlace $out/src/calendar/libecal/e-reminder-watcher.c \ - --replace "settings = g_settings_new (schema_id)" "settings = NULL" \ - --replace 'e_reminder_watcher_load_settings_tentative ("' 'g_settings_new ("' - ''; + sha256 = "kfT/w4objS/ok5g0RJrFQcC/9KObRE7cKpUpNEoo6Yo="; }; patches = [ @@ -72,6 +65,10 @@ stdenv.mkDerivation rec { src = ./fix-paths.patch; inherit tzdata; }) + + # Avoid using wrapper function, which the hardcode gsettings + # patch generator cannot handle. + ./drop-tentative-settings-constructor.patch ]; prePatch = '' @@ -169,7 +166,7 @@ stdenv.mkDerivation rec { "org.gnome.evolution-data-server" = "EDS"; "org.gnome.desktop.interface" = "GDS"; }; - inherit src; + inherit src patches; }; updateScript = let diff --git a/pkgs/desktops/gnome/core/evolution-data-server/drop-tentative-settings-constructor.patch b/pkgs/desktops/gnome/core/evolution-data-server/drop-tentative-settings-constructor.patch new file mode 100644 index 000000000000..a86d1966eb6b --- /dev/null +++ b/pkgs/desktops/gnome/core/evolution-data-server/drop-tentative-settings-constructor.patch @@ -0,0 +1,40 @@ +diff --git a/src/calendar/libecal/e-reminder-watcher.c b/src/calendar/libecal/e-reminder-watcher.c +index f1614f2..c01e8b2 100644 +--- a/src/calendar/libecal/e-reminder-watcher.c ++++ b/src/calendar/libecal/e-reminder-watcher.c +@@ -2609,26 +2609,6 @@ e_reminder_watcher_load_clock_format (EReminderWatcher *watcher) + g_free (clock_format); + } + +-static GSettings* +-e_reminder_watcher_load_settings_tentative (const gchar *schema_id) +-{ +- GSettings *settings; +- GSettingsSchemaSource *schema_source; +- GSettingsSchema *schema; +- +- schema_source = g_settings_schema_source_get_default (); +- schema = g_settings_schema_source_lookup (schema_source, schema_id, TRUE); +- +- if (schema == NULL) { +- return NULL; +- } +- +- settings = g_settings_new (schema_id); +- /* only unref after g_settings_new() to avoid needless realloc */ +- g_settings_schema_unref (schema); +- return settings; +-} +- + static void + e_reminder_watcher_init (EReminderWatcher *watcher) + { +@@ -2647,7 +2627,7 @@ e_reminder_watcher_init (EReminderWatcher *watcher) + watcher->priv = e_reminder_watcher_get_instance_private (watcher); + watcher->priv->cancellable = g_cancellable_new (); + watcher->priv->settings = g_settings_new ("org.gnome.evolution-data-server.calendar"); +- watcher->priv->desktop_settings = e_reminder_watcher_load_settings_tentative ("org.gnome.desktop.interface"); ++ watcher->priv->desktop_settings = g_settings_new ("org.gnome.desktop.interface"); + if (watcher->priv->desktop_settings) { + g_signal_connect_object ( + watcher->priv->desktop_settings, diff --git a/pkgs/desktops/gnome/core/evolution-data-server/hardcode-gsettings.patch b/pkgs/desktops/gnome/core/evolution-data-server/hardcode-gsettings.patch index 1c875a84e5bb..4857efc4c230 100644 --- a/pkgs/desktops/gnome/core/evolution-data-server/hardcode-gsettings.patch +++ b/pkgs/desktops/gnome/core/evolution-data-server/hardcode-gsettings.patch @@ -202,10 +202,10 @@ index 2525856..7ecc1a8 100644 g_clear_object (&settings); } diff --git a/src/calendar/libecal/e-reminder-watcher.c b/src/calendar/libecal/e-reminder-watcher.c -index 2dbdd99..a6cf45c 100644 +index c01e8b2..59fb4c4 100644 --- a/src/calendar/libecal/e-reminder-watcher.c +++ b/src/calendar/libecal/e-reminder-watcher.c -@@ -2646,8 +2646,33 @@ e_reminder_watcher_init (EReminderWatcher *watcher) +@@ -2626,8 +2626,33 @@ e_reminder_watcher_init (EReminderWatcher *watcher) watcher->priv = e_reminder_watcher_get_instance_private (watcher); watcher->priv->cancellable = g_cancellable_new ();