about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/misc/waybar/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/misc/waybar/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/misc/waybar/default.nix46
1 files changed, 46 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/misc/waybar/default.nix b/nixpkgs/pkgs/applications/misc/waybar/default.nix
new file mode 100644
index 000000000000..ab1e0b5dda26
--- /dev/null
+++ b/nixpkgs/pkgs/applications/misc/waybar/default.nix
@@ -0,0 +1,46 @@
+{ stdenv, fetchFromGitHub, meson, pkgconfig, ninja
+, wayland, wlroots, gtkmm3, libinput, libsigcxx, jsoncpp, fmt
+, traySupport  ? true,  libdbusmenu-gtk3
+, pulseSupport ? false, libpulseaudio
+, nlSupport    ? true,  libnl
+, udevSupport  ? true,  udev
+, swaySupport  ? true,  sway
+}:
+  stdenv.mkDerivation rec {
+    name = "waybar-${version}";
+    version = "0.5.0";
+
+    src = fetchFromGitHub {
+      owner = "Alexays";
+      repo = "Waybar";
+      rev = version;
+      sha256 = "006pzx4crsqn9vk28g87306xh3jrfwk4ib9cmsxqrxy8v0kl2s4g";
+    };
+
+    nativeBuildInputs = [
+      meson ninja pkgconfig
+    ];
+
+    buildInputs = with stdenv.lib;
+      [ wayland wlroots gtkmm3 libinput libsigcxx jsoncpp fmt ]
+      ++ optional  traySupport  libdbusmenu-gtk3
+      ++ optional  pulseSupport libpulseaudio
+      ++ optional  nlSupport    libnl
+      ++ optional  udevSupport  udev
+      ++ optional  swaySupport  sway;
+
+    mesonFlags = [
+      "-Ddbusmenu-gtk=${ if traySupport then "enabled" else "disabled" }"
+      "-Dpulseaudio=${ if pulseSupport then "enabled" else "disabled" }"
+      "-Dlibnl=${ if nlSupport then "enabled" else "disabled" }"
+      "-Dlibudev=${ if udevSupport then "enabled" else "disabled" }"
+      "-Dout=${placeholder "out"}"
+    ];
+
+    meta = with stdenv.lib; {
+      description = "Highly customizable Wayland bar for Sway and Wlroots based compositors";
+      license = licenses.mit;
+      maintainers = with maintainers; [ FlorianFranzen minijackson ];
+      platforms = platforms.unix;
+    };
+  }