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

47 lines
1.5 KiB
Nix
Raw Normal View History

2019-01-26 16:43:16 +01:00
{ stdenv, fetchFromGitHub, meson, pkgconfig, ninja
, wayland, wlroots, gtkmm3, libinput, libsigcxx, jsoncpp, fmt
, traySupport ? true, libdbusmenu-gtk3
, pulseSupport ? false, libpulseaudio
, nlSupport ? true, libnl
2019-03-26 16:37:24 +01:00
, udevSupport ? true, udev
2019-01-26 16:43:16 +01:00
, swaySupport ? true, sway
}:
stdenv.mkDerivation rec {
name = "waybar-${version}";
2019-04-09 10:26:09 +02:00
version = "0.5.1";
2019-01-26 16:43:16 +01:00
src = fetchFromGitHub {
owner = "Alexays";
repo = "Waybar";
rev = version;
2019-04-09 10:26:09 +02:00
sha256 = "1h3ifiklzcbrvqzzhs7rij8w45k96cir2d4kkyd2ap93akvcnsr9";
2019-01-26 16:43:16 +01:00
};
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
2019-03-26 16:37:24 +01:00
++ optional udevSupport udev
2019-01-26 16:43:16 +01:00
++ 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" }"
2019-03-26 16:37:24 +01:00
"-Dlibudev=${ if udevSupport then "enabled" else "disabled" }"
2019-01-26 16:43:16 +01: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 16:37:24 +01:00
maintainers = with maintainers; [ FlorianFranzen minijackson ];
2019-01-26 16:43:16 +01:00
platforms = platforms.unix;
};
}