summary refs log tree commit diff
diff options
context:
space:
mode:
authorAmy de Buitléir <amy@nualeargais.ie>2021-11-22 22:26:27 +0000
committerGitHub <noreply@github.com>2021-11-22 19:26:27 -0300
commitdaa8c59404ba38fef684996e1cc98f5e5a634780 (patch)
tree4f6ad405ad7631c4d0c858a085c1135d54ab47a7
parentef63ed7b10f6d41babec249d897329848eb0de87 (diff)
downloadnixpkgs-daa8c59404ba38fef684996e1cc98f5e5a634780.tar
nixpkgs-daa8c59404ba38fef684996e1cc98f5e5a634780.tar.gz
nixpkgs-daa8c59404ba38fef684996e1cc98f5e5a634780.tar.bz2
nixpkgs-daa8c59404ba38fef684996e1cc98f5e5a634780.tar.lz
nixpkgs-daa8c59404ba38fef684996e1cc98f5e5a634780.tar.xz
nixpkgs-daa8c59404ba38fef684996e1cc98f5e5a634780.tar.zst
nixpkgs-daa8c59404ba38fef684996e1cc98f5e5a634780.zip
yambar: build with dual support, both wayland and x11 (#146568)
yambar: build with dual support for X11 and Wayland by default

If by any reason a X11-only or a Wayland-only build is needed, just `override` it!
-rw-r--r--pkgs/applications/misc/yambar/default.nix34
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 17 insertions, 19 deletions
diff --git a/pkgs/applications/misc/yambar/default.nix b/pkgs/applications/misc/yambar/default.nix
index 96b44dc8961..45dba0a9312 100644
--- a/pkgs/applications/misc/yambar/default.nix
+++ b/pkgs/applications/misc/yambar/default.nix
@@ -1,35 +1,34 @@
-{ stdenv
-, lib
+{ lib
+, stdenv
 , fetchFromGitea
-, pkg-config
-, meson
-, ninja
-, scdoc
 , alsa-lib
 , fcft
 , json_c
 , libmpdclient
+, libxcb
 , libyaml
+, meson
+, ninja
 , pixman
+, pkg-config
+, scdoc
 , tllist
 , udev
 , wayland
-, wayland-scanner
 , wayland-protocols
-, waylandSupport ? false
-# Xorg backend
-, libxcb
+, wayland-scanner
 , xcbutil
 , xcbutilcursor
 , xcbutilerrors
 , xcbutilwm
+, waylandSupport ? true
+, x11Support ? true
 }:
 
 let
-  # Courtesy of sternenseemann and FRidh, commit c9a7fdfcfb420be8e0179214d0d91a34f5974c54
+  # Courtesy of sternenseemann and FRidh
   mesonFeatureFlag = opt: b: "-D${opt}=${if b then "enabled" else "disabled"}";
 in
-
 stdenv.mkDerivation rec {
   pname = "yambar";
   version = "1.7.0";
@@ -59,9 +58,10 @@ stdenv.mkDerivation rec {
     pixman
     tllist
     udev
+  ] ++ lib.optionals (waylandSupport) [
     wayland
     wayland-protocols
-  ] ++ lib.optionals (!waylandSupport) [
+  ] ++ lib.optionals (x11Support) [
     xcbutil
     xcbutilcursor
     xcbutilerrors
@@ -71,7 +71,7 @@ stdenv.mkDerivation rec {
   mesonBuildType = "release";
 
   mesonFlags = [
-    (mesonFeatureFlag "backend-x11" (!waylandSupport))
+    (mesonFeatureFlag "backend-x11" x11Support)
     (mesonFeatureFlag "backend-wayland" waylandSupport)
   ];
 
@@ -84,9 +84,9 @@ stdenv.mkDerivation rec {
       X11 and Wayland, that goes to great lengths to be both CPU and battery
       efficient - polling is only done when absolutely necessary.
 
-      It has a number of modules that provide information in the form of
-      tags. For example, the clock module has a date tag that contains the
-      current date.
+      It has a number of modules that provide information in the form of tags.
+      For example, the clock module has a date tag that contains the current
+      date.
 
       The modules do not know how to present the information though. This is
       instead done by particles. And the user, you, decides which particles (and
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index c4c46dbfe11..69e5bb861b2 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -27113,8 +27113,6 @@ with pkgs;
 
   yambar = callPackage ../applications/misc/yambar { };
 
-  yambar-wayland = callPackage ../applications/misc/yambar { waylandSupport = true; };
-
   polyphone = libsForQt514.callPackage ../applications/audio/polyphone { };
 
   portfolio = callPackage ../applications/office/portfolio {