diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/misc/waybar/default.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/misc/waybar/default.nix | 53 |
1 files changed, 53 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..0be04c895e35 --- /dev/null +++ b/nixpkgs/pkgs/applications/misc/waybar/default.nix @@ -0,0 +1,53 @@ +{ stdenv, fetchFromGitHub, meson, pkgconfig, ninja +, wayland, wlroots, gtkmm3, libinput, libsigcxx, jsoncpp, fmt, spdlog +, traySupport ? true, libdbusmenu-gtk3 +, pulseSupport ? false, libpulseaudio +, nlSupport ? true, libnl +, udevSupport ? true, udev +, swaySupport ? true, sway +, mpdSupport ? true, mpd_clientlib +}: + stdenv.mkDerivation rec { + pname = "waybar"; + version = "0.7.0"; + + src = fetchFromGitHub { + owner = "Alexays"; + repo = "Waybar"; + rev = version; + sha256 = "0fylq8sz00zv7jvjp7pgckabvmhanpcsqfvpw8c84vy4d8dvqbkx"; + }; + + nativeBuildInputs = [ + meson ninja pkgconfig + ]; + + buildInputs = with stdenv.lib; + [ wayland wlroots gtkmm3 libinput libsigcxx jsoncpp fmt spdlog ] + ++ optional traySupport libdbusmenu-gtk3 + ++ optional pulseSupport libpulseaudio + ++ optional nlSupport libnl + ++ optional udevSupport udev + ++ optional swaySupport sway + ++ optional mpdSupport mpd_clientlib; + + mesonFlags = (stdenv.lib.mapAttrsToList + (option: enable: "-D${option}=${if enable then "enabled" else "disabled"}") + { + dbusmenu-gtk = traySupport; + pulseaudio = pulseSupport; + libnl = nlSupport; + libudev = udevSupport; + mpd = mpdSupport; + } + ) ++ [ + "-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 synthetica ]; + platforms = platforms.unix; + }; + } |