From ad86cb327212828c44236aff5fe0d3ba452a8f56 Mon Sep 17 00:00:00 2001 From: Santhosh Kannan Date: Thu, 9 Mar 2023 18:36:23 +0100 Subject: [PATCH] pasystray: 0.7.1 -> 0.8.2 --- pkgs/tools/audio/pasystray/default.nix | 22 +++++++------ pkgs/tools/audio/pasystray/fix-wayland.patch | 34 -------------------- 2 files changed, 13 insertions(+), 43 deletions(-) delete mode 100644 pkgs/tools/audio/pasystray/fix-wayland.patch diff --git a/pkgs/tools/audio/pasystray/default.nix b/pkgs/tools/audio/pasystray/default.nix index 8df578d03109..c01088466599 100644 --- a/pkgs/tools/audio/pasystray/default.nix +++ b/pkgs/tools/audio/pasystray/default.nix @@ -5,25 +5,29 @@ stdenv.mkDerivation rec { pname = "pasystray"; - version = "0.7.1"; + version = "0.8.2"; src = fetchFromGitHub { owner = "christophgysin"; repo = "pasystray"; - rev = "${pname}-${version}"; - sha256 = "0xx1bm9kimgq11a359ikabdndqg5q54pn1d1dyyjnrj0s41168fk"; + rev = version; + sha256 = "sha256-QaTQ8yUviJaFEQaQm2vYAUngqHliKe8TDYqfWt1Nx/0="; }; patches = [ - # https://github.com/christophgysin/pasystray/issues/90#issuecomment-306190701 - ./fix-wayland.patch - + # Use ayatana-appindicator instead of appindicator # https://github.com/christophgysin/pasystray/issues/98 (fetchpatch { - url = "https://sources.debian.org/data/main/p/pasystray/0.7.1-1/debian/patches/0001-Build-against-ayatana-appindicator.patch"; - sha256 = "0hijphrf52n2zfwdnrmxlp3a7iwznnkb79awvpzplz0ia2lqywpw"; + url = "https://sources.debian.org/data/main/p/pasystray/0.8.1-1/debian/patches/0001-Build-against-ayatana-appindicator.patch"; + sha256 = "sha256-/HKPqVARfHr/3Vyls6a1n8ejxqW9Ztu4+8KK4jK8MkI="; }) - ]; + # Require X11 backend + # https://github.com/christophgysin/pasystray/issues/90#issuecomment-361881076 + (fetchpatch { + url = "https://sources.debian.org/data/main/p/pasystray/0.8.1-1/debian/patches/0002-Require-X11-backend.patch"; + sha256 = "sha256-6njC3vqBPWFS1xAsa1katQ4C0KJdVkHAP1MCPiZ6ELM="; + }) + ]; nativeBuildInputs = [ pkg-config autoreconfHook wrapGAppsHook ]; buildInputs = [ diff --git a/pkgs/tools/audio/pasystray/fix-wayland.patch b/pkgs/tools/audio/pasystray/fix-wayland.patch deleted file mode 100644 index 17c4e2e6d658..000000000000 --- a/pkgs/tools/audio/pasystray/fix-wayland.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- a/src/x11-property.c -+++ b/src/x11-property.c -@@ -43,11 +43,15 @@ static Window window; - void x11_property_init() - { - display = gdk_x11_get_default_xdisplay(); -+ if (!GDK_IS_X11_DISPLAY(display)) return; -+ Screen* scr = ScreenOfDisplay(display, 0); -+ - window = RootWindow(display, 0); - } - - void x11_property_set(const char* key, const char* value) - { -+ if (!GDK_IS_X11_DISPLAY(display)) return; - g_debug("[x11-property] setting '%s' to '%s'", key, value); - - Atom atom = XInternAtom(display, key, False); -@@ -57,6 +61,7 @@ void x11_property_set(const char* key, c - - void x11_property_del(const char* key) - { -+ if (!GDK_IS_X11_DISPLAY(display)) return; - g_debug("[x11-property] deleting '%s'", key); - - Atom atom = XInternAtom(display, key, False); -@@ -65,6 +70,7 @@ void x11_property_del(const char* key) - - char* x11_property_get(const char* key) - { -+ if (!GDK_IS_X11_DISPLAY(display)) return NULL; - Atom property = XInternAtom(display, key, False); - Atom actual_type; - int actual_format;