tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
pasystray: 0.7.1 -> 0.8.2
Santhosh Kannan
2 years ago
ad86cb32
c90c4025
+13
-43
2 changed files
expand all
collapse all
unified
split
pkgs
tools
audio
pasystray
default.nix
fix-wayland.patch
+13
-9
pkgs/tools/audio/pasystray/default.nix
···
5
6
stdenv.mkDerivation rec {
7
pname = "pasystray";
8
-
version = "0.7.1";
9
10
src = fetchFromGitHub {
11
owner = "christophgysin";
12
repo = "pasystray";
13
-
rev = "${pname}-${version}";
14
-
sha256 = "0xx1bm9kimgq11a359ikabdndqg5q54pn1d1dyyjnrj0s41168fk";
15
};
16
17
patches = [
18
-
# https://github.com/christophgysin/pasystray/issues/90#issuecomment-306190701
19
-
./fix-wayland.patch
20
-
21
# https://github.com/christophgysin/pasystray/issues/98
22
(fetchpatch {
23
-
url = "https://sources.debian.org/data/main/p/pasystray/0.7.1-1/debian/patches/0001-Build-against-ayatana-appindicator.patch";
24
-
sha256 = "0hijphrf52n2zfwdnrmxlp3a7iwznnkb79awvpzplz0ia2lqywpw";
0
0
0
0
0
0
25
})
26
-
];
27
28
nativeBuildInputs = [ pkg-config autoreconfHook wrapGAppsHook ];
29
buildInputs = [
···
5
6
stdenv.mkDerivation rec {
7
pname = "pasystray";
8
+
version = "0.8.2";
9
10
src = fetchFromGitHub {
11
owner = "christophgysin";
12
repo = "pasystray";
13
+
rev = version;
14
+
sha256 = "sha256-QaTQ8yUviJaFEQaQm2vYAUngqHliKe8TDYqfWt1Nx/0=";
15
};
16
17
patches = [
18
+
# Use ayatana-appindicator instead of appindicator
0
0
19
# https://github.com/christophgysin/pasystray/issues/98
20
(fetchpatch {
21
+
url = "https://sources.debian.org/data/main/p/pasystray/0.8.1-1/debian/patches/0001-Build-against-ayatana-appindicator.patch";
22
+
sha256 = "sha256-/HKPqVARfHr/3Vyls6a1n8ejxqW9Ztu4+8KK4jK8MkI=";
23
+
})
24
+
# Require X11 backend
25
+
# https://github.com/christophgysin/pasystray/issues/90#issuecomment-361881076
26
+
(fetchpatch {
27
+
url = "https://sources.debian.org/data/main/p/pasystray/0.8.1-1/debian/patches/0002-Require-X11-backend.patch";
28
+
sha256 = "sha256-6njC3vqBPWFS1xAsa1katQ4C0KJdVkHAP1MCPiZ6ELM=";
29
})
30
+
];
31
32
nativeBuildInputs = [ pkg-config autoreconfHook wrapGAppsHook ];
33
buildInputs = [
-34
pkgs/tools/audio/pasystray/fix-wayland.patch
···
1
-
--- a/src/x11-property.c
2
-
+++ b/src/x11-property.c
3
-
@@ -43,11 +43,15 @@ static Window window;
4
-
void x11_property_init()
5
-
{
6
-
display = gdk_x11_get_default_xdisplay();
7
-
+ if (!GDK_IS_X11_DISPLAY(display)) return;
8
-
+ Screen* scr = ScreenOfDisplay(display, 0);
9
-
+
10
-
window = RootWindow(display, 0);
11
-
}
12
-
13
-
void x11_property_set(const char* key, const char* value)
14
-
{
15
-
+ if (!GDK_IS_X11_DISPLAY(display)) return;
16
-
g_debug("[x11-property] setting '%s' to '%s'", key, value);
17
-
18
-
Atom atom = XInternAtom(display, key, False);
19
-
@@ -57,6 +61,7 @@ void x11_property_set(const char* key, c
20
-
21
-
void x11_property_del(const char* key)
22
-
{
23
-
+ if (!GDK_IS_X11_DISPLAY(display)) return;
24
-
g_debug("[x11-property] deleting '%s'", key);
25
-
26
-
Atom atom = XInternAtom(display, key, False);
27
-
@@ -65,6 +70,7 @@ void x11_property_del(const char* key)
28
-
29
-
char* x11_property_get(const char* key)
30
-
{
31
-
+ if (!GDK_IS_X11_DISPLAY(display)) return NULL;
32
-
Atom property = XInternAtom(display, key, False);
33
-
Atom actual_type;
34
-
int actual_format;
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0