waybar: DRY refactor

This commit is contained in:
Patrick Hilhorst 2019-06-04 21:15:29 +02:00
parent 8cc768b64d
commit 9d127b78f6
No known key found for this signature in database
GPG Key ID: 589BB0A8DAFEF2B2

View File

@ -31,12 +31,16 @@
++ optional swaySupport sway ++ optional swaySupport sway
++ optional mpdSupport mpd_clientlib; ++ optional mpdSupport mpd_clientlib;
mesonFlags = [ mesonFlags = (stdenv.lib.mapAttrsToList
"-Ddbusmenu-gtk=${ if traySupport then "enabled" else "disabled" }" (option: enable: "-D${option}=${if enable then "enabled" else "disabled"}")
"-Dpulseaudio=${ if pulseSupport then "enabled" else "disabled" }" {
"-Dlibnl=${ if nlSupport then "enabled" else "disabled" }" dbusmenu-gtk = traySupport;
"-Dlibudev=${ if udevSupport then "enabled" else "disabled" }" pulseaudio = pulseSupport;
"-Dmpd=${ if mpdSupport then "enabled" else "disabled" }" libnl = nlSupport;
libudev = udevSupport;
mpd = mpdSupport;
}
) ++ [
"-Dout=${placeholder "out"}" "-Dout=${placeholder "out"}"
]; ];