about summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2020-09-11 10:23:33 +0200
committerMaximilian Bosch <maximilian@mbosch.me>2020-09-11 11:00:40 +0200
commit0a21d06682e09f998807d3bdaf77be100d247908 (patch)
tree0eeaaafe643c016f95cf27fa9764af2f1a247de1 /pkgs/tools
parent56456fef75a5576c6dc3fbdd5cb801d5da041224 (diff)
wdisplays: fix startup on sway 1.5
Starting `wdisplays` on a NixOS 20.09 with `sway-1.5` breaks with the
following output:

```
(wdisplays:28400): Gtk-WARNING **: 10:26:38.619: Could not load a pixbuf from /org/gtk/libgtk/theme/Adwaita/assets/bullet-symbolic.svg.
This may indicate that pixbuf loaders or the mime database could not be found.
Gdk-Message: 10:26:38.752: Error reading events from display: Success
```

The first two warnings can be fixed by adding `wrapGAppsHook`. The last
error is an upstream bug that can be fixed by applying the patch from a
pending PR[1].

[1] https://github.com/cyclopsian/wdisplays/pull/20
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/graphics/wdisplays/default.nix15
1 files changed, 13 insertions, 2 deletions
diff --git a/pkgs/tools/graphics/wdisplays/default.nix b/pkgs/tools/graphics/wdisplays/default.nix
index 0993a39983ed7..eb7598dce206f 100644
--- a/pkgs/tools/graphics/wdisplays/default.nix
+++ b/pkgs/tools/graphics/wdisplays/default.nix
@@ -1,10 +1,12 @@
-{ stdenv, fetchFromGitHub, meson, ninja, pkgconfig, gtk3, epoxy, wayland }:
+{ stdenv, fetchFromGitHub, meson, ninja, pkgconfig, gtk3, epoxy, wayland, wrapGAppsHook
+, fetchpatch
+}:
 
 stdenv.mkDerivation rec {
   pname = "wdisplays";
   version = "1.0";
 
-  nativeBuildInputs = [ meson ninja pkgconfig ];
+  nativeBuildInputs = [ meson ninja pkgconfig wrapGAppsHook ];
 
   buildInputs = [ gtk3 epoxy wayland ];
 
@@ -15,6 +17,15 @@ stdenv.mkDerivation rec {
     sha256 = "1xhgrcihja2i7yg54ghbwr1v6kf8jnsfcp364yb97vkxskc4y21y";
   };
 
+  patches = [
+    # Fixes `Gdk-Message: 10:26:38.752: Error reading events from display: Success`
+    # https://github.com/cyclopsian/wdisplays/pull/20
+    (fetchpatch {
+      url = "https://github.com/cyclopsian/wdisplays/commit/5198a9c94b40ff157c284df413be5402f1b75118.patch";
+      sha256 = "1xwphyn0ksf8isy9dz3mfdhmsz4jv02870qz5615zs7aqqfcwn85";
+    })
+  ];
+
   meta = let inherit (stdenv) lib; in {
     description = "A graphical application for configuring displays in Wayland compositors";
     homepage = "https://github.com/cyclopsian/wdisplays";