nixpkgs/pkgs/applications/misc/waybar/default.nix

50 lines
1.6 KiB
Nix
Raw Normal View History

2019-01-26 15:43:16 +00:00
{ stdenv, fetchFromGitHub, meson, pkgconfig, ninja
2019-05-25 15:44:23 +01:00
, wayland, wlroots, gtkmm3, libinput, libsigcxx, jsoncpp, fmt, spdlog
2019-01-26 15:43:16 +00:00
, traySupport ? true, libdbusmenu-gtk3
, pulseSupport ? false, libpulseaudio
, nlSupport ? true, libnl
2019-03-26 15:37:24 +00:00
, udevSupport ? true, udev
2019-01-26 15:43:16 +00:00
, swaySupport ? true, sway
2019-05-01 10:25:30 +01:00
, mpdSupport ? true, mpd_clientlib
2019-01-26 15:43:16 +00:00
}:
stdenv.mkDerivation rec {
name = "waybar-${version}";
2019-05-25 15:44:23 +01:00
version = "0.6.6";
2019-01-26 15:43:16 +00:00
src = fetchFromGitHub {
owner = "Alexays";
repo = "Waybar";
rev = version;
2019-05-25 15:44:23 +01:00
sha256 = "0wxd03lkgssz0vsib9qc040vfg1i6nrg7ac2c6qwficx62j2zlm1";
2019-01-26 15:43:16 +00:00
};
nativeBuildInputs = [
meson ninja pkgconfig
];
buildInputs = with stdenv.lib;
2019-05-25 15:44:23 +01:00
[ wayland wlroots gtkmm3 libinput libsigcxx jsoncpp fmt spdlog ]
2019-01-26 15:43:16 +00:00
++ optional traySupport libdbusmenu-gtk3
++ optional pulseSupport libpulseaudio
++ optional nlSupport libnl
2019-03-26 15:37:24 +00:00
++ optional udevSupport udev
2019-05-01 10:25:30 +01:00
++ optional swaySupport sway
++ optional mpdSupport mpd_clientlib;
2019-01-26 15:43:16 +00:00
mesonFlags = [
"-Ddbusmenu-gtk=${ if traySupport then "enabled" else "disabled" }"
"-Dpulseaudio=${ if pulseSupport then "enabled" else "disabled" }"
"-Dlibnl=${ if nlSupport then "enabled" else "disabled" }"
2019-03-26 15:37:24 +00:00
"-Dlibudev=${ if udevSupport then "enabled" else "disabled" }"
2019-05-01 10:25:30 +01:00
"-Dmpd=${ if mpdSupport then "enabled" else "disabled" }"
2019-01-26 15:43:16 +00:00
"-Dout=${placeholder "out"}"
];
meta = with stdenv.lib; {
description = "Highly customizable Wayland bar for Sway and Wlroots based compositors";
license = licenses.mit;
2019-03-26 15:37:24 +00:00
maintainers = with maintainers; [ FlorianFranzen minijackson ];
2019-01-26 15:43:16 +00:00
platforms = platforms.unix;
};
}