2019-11-17 11:11:35 +00:00
|
|
|
{ stdenv, fetchFromGitHub, meson, pkgconfig, ninja, wrapGAppsHook
|
2019-12-28 15:09:15 +00:00
|
|
|
, wayland, wlroots, gtkmm3, libinput, libsigcxx, jsoncpp, fmt, scdoc, spdlog, gtk-layer-shell
|
2020-02-18 08:41:40 +00:00
|
|
|
, howard-hinnant-date, cmake
|
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 09:25:30 +00:00
|
|
|
, mpdSupport ? true, mpd_clientlib
|
2020-04-18 17:40:29 +00:00
|
|
|
, withMediaPlayer ? false, glib, gobject-introspection, python3, python38Packages, playerctl
|
2019-01-26 15:43:16 +00:00
|
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
2019-06-10 12:35:06 +00:00
|
|
|
pname = "waybar";
|
2020-04-12 04:00:43 +00:00
|
|
|
version = "0.9.2";
|
2019-01-26 15:43:16 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Alexays";
|
|
|
|
repo = "Waybar";
|
|
|
|
rev = version;
|
2020-04-12 04:00:43 +00:00
|
|
|
sha256 = "1gfxyjzwfqznyrpyr3322z3w844i1lh77kly4hcpy9y5gsfmlafy";
|
2019-01-26 15:43:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2020-02-18 08:41:40 +00:00
|
|
|
meson ninja pkgconfig scdoc wrapGAppsHook cmake
|
2020-04-18 17:40:29 +00:00
|
|
|
] ++ stdenv.lib.optional withMediaPlayer gobject-introspection;
|
|
|
|
|
|
|
|
propagatedBuildInputs = stdenv.lib.optionals withMediaPlayer [
|
|
|
|
glib
|
|
|
|
playerctl
|
|
|
|
python38Packages.pygobject3
|
2019-01-26 15:43:16 +00:00
|
|
|
];
|
2020-04-18 17:40:29 +00:00
|
|
|
strictDeps = false;
|
2019-01-26 15:43:16 +00:00
|
|
|
|
|
|
|
buildInputs = with stdenv.lib;
|
2020-02-18 08:41:40 +00:00
|
|
|
[ wayland wlroots gtkmm3 libinput libsigcxx jsoncpp fmt spdlog gtk-layer-shell howard-hinnant-date ]
|
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 09:25:30 +00:00
|
|
|
++ optional swaySupport sway
|
|
|
|
++ optional mpdSupport mpd_clientlib;
|
2019-01-26 15:43:16 +00:00
|
|
|
|
2019-06-04 19:15:29 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
) ++ [
|
2019-01-26 15:43:16 +00:00
|
|
|
"-Dout=${placeholder "out"}"
|
2019-12-28 15:09:15 +00:00
|
|
|
"-Dsystemd=disabled"
|
2019-01-26 15:43:16 +00:00
|
|
|
];
|
|
|
|
|
2020-04-18 17:40:29 +00:00
|
|
|
preFixup = stdenv.lib.optional withMediaPlayer ''
|
|
|
|
cp $src/resources/custom_modules/mediaplayer.py $out/bin/waybar-mediaplayer.py
|
|
|
|
|
|
|
|
wrapProgram $out/bin/waybar-mediaplayer.py \
|
|
|
|
--prefix PYTHONPATH : "$PYTHONPATH:$out/${python3.sitePackages}"
|
|
|
|
'';
|
|
|
|
|
2019-01-26 15:43:16 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Highly customizable Wayland bar for Sway and Wlroots based compositors";
|
|
|
|
license = licenses.mit;
|
2019-06-10 12:36:22 +00:00
|
|
|
maintainers = with maintainers; [ FlorianFranzen minijackson synthetica ];
|
2019-01-26 15:43:16 +00:00
|
|
|
platforms = platforms.unix;
|
2020-02-18 08:41:40 +00:00
|
|
|
homepage = "https://github.com/alexays/waybar";
|
2019-01-26 15:43:16 +00:00
|
|
|
};
|
|
|
|
}
|