summary refs log tree commit diff
path: root/pkgs/desktops
diff options
context:
space:
mode:
authorBobby Rong <rjl931189261@126.com>2022-09-21 10:26:05 +0800
committerJan Tojnar <jtojnar@gmail.com>2022-10-11 18:52:33 +0200
commitbb97eab688d2469d5d1df67f9483575ead3c06ce (patch)
treeaf0acefde93a782c31336d7913a3d590c6a640f5 /pkgs/desktops
parentc4c899062a4516af3c54373e674c60679a0044f8 (diff)
downloadnixpkgs-bb97eab688d2469d5d1df67f9483575ead3c06ce.tar
nixpkgs-bb97eab688d2469d5d1df67f9483575ead3c06ce.tar.gz
nixpkgs-bb97eab688d2469d5d1df67f9483575ead3c06ce.tar.bz2
nixpkgs-bb97eab688d2469d5d1df67f9483575ead3c06ce.tar.lz
nixpkgs-bb97eab688d2469d5d1df67f9483575ead3c06ce.tar.xz
nixpkgs-bb97eab688d2469d5d1df67f9483575ead3c06ce.tar.zst
nixpkgs-bb97eab688d2469d5d1df67f9483575ead3c06ce.zip
pantheon.elementary-calendar: Fix build with evolution-data-server 3.46
Diffstat (limited to 'pkgs/desktops')
-rw-r--r--pkgs/desktops/pantheon/apps/elementary-calendar/default.nix22
-rw-r--r--pkgs/desktops/pantheon/apps/elementary-calendar/partly-revert-pr-301.patch57
2 files changed, 75 insertions, 4 deletions
diff --git a/pkgs/desktops/pantheon/apps/elementary-calendar/default.nix b/pkgs/desktops/pantheon/apps/elementary-calendar/default.nix
index 1984a6ebbe2..9f5613fcd22 100644
--- a/pkgs/desktops/pantheon/apps/elementary-calendar/default.nix
+++ b/pkgs/desktops/pantheon/apps/elementary-calendar/default.nix
@@ -1,6 +1,7 @@
 { lib
 , stdenv
 , fetchFromGitHub
+, fetchpatch
 , nix-update-script
 , meson
 , ninja
@@ -12,10 +13,10 @@
 , evolution-data-server
 , folks
 , geoclue2
-, geocode-glib
+, geocode-glib_2
 , granite
 , gtk3
-, libchamplain
+, libchamplain_libsoup3
 , libgee
 , libhandy
 , libical
@@ -32,6 +33,19 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-c2c8QNifBDzb0CelB72AIL4G694l6KCSXBjWIHrzZJo=";
   };
 
+  patches = [
+    # build: support evolution-data-server 3.46
+    # https://github.com/elementary/calendar/pull/758
+    (fetchpatch {
+      url = "https://github.com/elementary/calendar/commit/62c20e5786accd68b96c423b04e32c043e726cac.patch";
+      sha256 = "sha256-xatxoSwAIHiUA03vvBdM8HSW27vhPLvAxEuGK0gLiio=";
+    })
+
+    # Workaround for showing date numbers (TODO: should try to fix upstream)
+    # https://github.com/elementary/calendar/issues/756#issuecomment-1252400047
+    ./partly-revert-pr-301.patch
+  ];
+
   nativeBuildInputs = [
     meson
     ninja
@@ -46,10 +60,10 @@ stdenv.mkDerivation rec {
     evolution-data-server
     folks
     geoclue2
-    geocode-glib
+    geocode-glib_2
     granite
     gtk3
-    libchamplain
+    libchamplain_libsoup3
     libgee
     libhandy
     libical
diff --git a/pkgs/desktops/pantheon/apps/elementary-calendar/partly-revert-pr-301.patch b/pkgs/desktops/pantheon/apps/elementary-calendar/partly-revert-pr-301.patch
new file mode 100644
index 00000000000..0de31ee6365
--- /dev/null
+++ b/pkgs/desktops/pantheon/apps/elementary-calendar/partly-revert-pr-301.patch
@@ -0,0 +1,57 @@
+diff --git a/src/Grid/Grid.vala b/src/Grid/Grid.vala
+index 61706fc8..9b69fc14 100644
+--- a/src/Grid/Grid.vala
++++ b/src/Grid/Grid.vala
+@@ -215,7 +215,7 @@ public class Grid : Gtk.Grid {
+
+         day.in_current_month = new_date.get_month () == month_start.get_month ();
+
+-        day.date = new_date;
++        day.update_date (new_date);
+         return day;
+     }
+
+diff --git a/src/Grid/GridDay.vala b/src/Grid/GridDay.vala
+index 3e59cb7b..df04fe6f 100644
+--- a/src/Grid/GridDay.vala
++++ b/src/Grid/GridDay.vala
+@@ -35,6 +35,7 @@ public class Maya.View.GridDay : Gtk.EventBox {
+     public bool draw_left_border = true;
+     private VAutoHider event_box;
+     private GLib.HashTable<string, EventButton> event_buttons;
++    Gtk.Label label;
+
+     public bool in_current_month {
+         set {
+@@ -79,7 +80,7 @@ public class Maya.View.GridDay : Gtk.EventBox {
+         style_context.add_provider (style_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
+         style_context.add_class ("cell");
+
+-        var label = new Gtk.Label ("");
++        label = new Gtk.Label ("");
+         label.halign = Gtk.Align.END;
+         label.get_style_context ().add_provider (style_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
+         label.margin = EVENT_MARGIN;
+@@ -100,10 +101,6 @@ public class Maya.View.GridDay : Gtk.EventBox {
+
+         Gtk.TargetEntry dnd = {"binary/calendar", 0, 0};
+         Gtk.drag_dest_set (this, Gtk.DestDefaults.MOTION, {dnd}, Gdk.DragAction.MOVE);
+-
+-        this.notify["date"].connect (() => {
+-            label.label = date.get_day_of_month ().to_string ();
+-        });
+     }
+
+     public override bool drag_drop (Gdk.DragContext context, int x, int y, uint time_) {
+@@ -174,6 +171,11 @@ public class Maya.View.GridDay : Gtk.EventBox {
+         event_buttons.remove_all ();
+     }
+
++    public void update_date (DateTime date) {
++        this.date = date;
++        label.label = date.get_day_of_month ().to_string ();
++    }
++
+     public void set_selected (bool selected) {
+         if (selected) {
+             set_state_flags (Gtk.StateFlags.SELECTED, true);