summaryrefslogtreecommitdiffstats
path: root/pkgs/tools/wayland
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2021-07-16 12:01:03 +0000
committerGitHub <noreply@github.com>2021-07-16 12:01:03 +0000
commit9fe75f18c0b0fef185247e1bfc460437098a1c7e (patch)
tree0de7d44d010255b51ce68b5e3bbe45dfc395e11d /pkgs/tools/wayland
parent1e9175815bff54995d71136a5b330196b987ea72 (diff)
parent91367071919c3972cadaf71f6842b00f97cde989 (diff)
Merge master into staging-next
Diffstat (limited to 'pkgs/tools/wayland')
-rw-r--r--pkgs/tools/wayland/swayr/default.nix30
-rw-r--r--pkgs/tools/wayland/swayr/icon-paths.patch17
2 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/tools/wayland/swayr/default.nix b/pkgs/tools/wayland/swayr/default.nix
new file mode 100644
index 000000000000..24a830a7277c
--- /dev/null
+++ b/pkgs/tools/wayland/swayr/default.nix
@@ -0,0 +1,30 @@
+{ lib, fetchFromSourcehut, rustPlatform }:
+
+rustPlatform.buildRustPackage rec {
+ pname = "swayr";
+ version = "0.6.1";
+
+ src = fetchFromSourcehut {
+ owner = "~tsdh";
+ repo = "swayr";
+ rev = "v${version}";
+ sha256 = "1865064q8jb75nfb0hbx4swbbijpibm0n7m4cid8qgylzp4bxvs2";
+ };
+
+ cargoSha256 = "0w6zjnywifdlaw01xz2824lwm4b6r1b7r99wi3p12vgbrmks4jcr";
+
+ patches = [
+ ./icon-paths.patch
+ ];
+
+ preCheck = ''
+ export HOME=$TMPDIR
+ '';
+
+ meta = with lib; {
+ description = "A window switcher (and more) for sway";
+ homepage = "https://git.sr.ht/~tsdh/swayr";
+ license = with licenses; [ gpl3Plus ];
+ maintainers = with maintainers; [ artturin ];
+ };
+}
diff --git a/pkgs/tools/wayland/swayr/icon-paths.patch b/pkgs/tools/wayland/swayr/icon-paths.patch
new file mode 100644
index 000000000000..8fafc4c4153c
--- /dev/null
+++ b/pkgs/tools/wayland/swayr/icon-paths.patch
@@ -0,0 +1,17 @@
+diff --git a/src/config.rs b/src/config.rs
+index de7d04b..291114b 100644
+--- a/src/config.rs
++++ b/src/config.rs
+@@ -197,6 +197,12 @@ impl Default for Format {
+ ),
+ urgency_end: Some("</span>".to_string()),
+ icon_dirs: Some(vec![
++ "/run/current-system/sw/share/icons/hicolor/scalable/apps".to_string(),
++ "/run/current-system/sw/share/icons/hicolor/48x48/apps".to_string(),
++ "/run/current-system/sw/share/pixmaps".to_string(),
++ "~/.nix-profile/share/icons/hicolor/scalable/apps".to_string(),
++ "~/.nix-profile/share/icons/hicolor/48x48/apps".to_string(),
++ "~/.nix-profile/share/pixmaps".to_string(),
+ "/usr/share/icons/hicolor/scalable/apps".to_string(),
+ "/usr/share/icons/hicolor/48x48/apps".to_string(),
+ "/usr/share/pixmaps".to_string(),