2021-11-22 22:26:27 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2021-08-08 04:46:29 +01:00
|
|
|
, fetchFromGitea
|
2021-06-10 03:57:09 +01:00
|
|
|
, alsa-lib
|
2021-02-10 13:56:11 +00:00
|
|
|
, fcft
|
|
|
|
, json_c
|
|
|
|
, libmpdclient
|
2021-11-22 22:26:27 +00:00
|
|
|
, libxcb
|
2021-02-10 13:56:11 +00:00
|
|
|
, libyaml
|
2021-11-22 22:26:27 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
2021-02-10 13:56:11 +00:00
|
|
|
, pixman
|
2021-11-22 22:26:27 +00:00
|
|
|
, pkg-config
|
|
|
|
, scdoc
|
2021-02-10 13:56:11 +00:00
|
|
|
, tllist
|
|
|
|
, udev
|
|
|
|
, wayland
|
|
|
|
, wayland-protocols
|
2021-11-22 22:26:27 +00:00
|
|
|
, wayland-scanner
|
2021-02-10 13:56:11 +00:00
|
|
|
, xcbutil
|
|
|
|
, xcbutilcursor
|
|
|
|
, xcbutilerrors
|
|
|
|
, xcbutilwm
|
2021-11-22 22:26:27 +00:00
|
|
|
, waylandSupport ? true
|
|
|
|
, x11Support ? true
|
2021-02-10 13:56:11 +00:00
|
|
|
}:
|
|
|
|
|
2021-08-08 04:46:29 +01:00
|
|
|
let
|
2021-11-22 22:26:27 +00:00
|
|
|
# Courtesy of sternenseemann and FRidh
|
2022-02-17 02:59:42 +00:00
|
|
|
mesonFeatureFlag = feature: flag:
|
|
|
|
"-D${feature}=${if flag then "enabled" else "disabled"}";
|
2021-08-08 04:46:29 +01:00
|
|
|
in
|
2021-02-10 13:56:11 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "yambar";
|
2022-02-05 17:11:54 +00:00
|
|
|
version = "1.8.0";
|
2021-02-10 13:56:11 +00:00
|
|
|
|
2021-08-08 04:46:29 +01:00
|
|
|
src = fetchFromGitea {
|
|
|
|
domain = "codeberg.org";
|
|
|
|
owner = "dnkl";
|
|
|
|
repo = "yambar";
|
2021-02-10 13:56:11 +00:00
|
|
|
rev = version;
|
2022-02-17 02:59:42 +00:00
|
|
|
hash = "sha256-zXhIXT3JrVSllnYheDU2KK3NE2VYa+xuKufIXjdMFjU=";
|
2021-02-10 13:56:11 +00:00
|
|
|
};
|
|
|
|
|
2021-08-08 04:46:29 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
scdoc
|
|
|
|
wayland-scanner
|
|
|
|
];
|
|
|
|
|
2021-02-10 13:56:11 +00:00
|
|
|
buildInputs = [
|
2021-06-10 03:57:09 +01:00
|
|
|
alsa-lib
|
2021-02-10 13:56:11 +00:00
|
|
|
fcft
|
|
|
|
json_c
|
|
|
|
libmpdclient
|
|
|
|
libyaml
|
|
|
|
pixman
|
|
|
|
tllist
|
|
|
|
udev
|
2021-11-22 22:26:27 +00:00
|
|
|
] ++ lib.optionals (waylandSupport) [
|
2021-02-10 13:56:11 +00:00
|
|
|
wayland
|
|
|
|
wayland-protocols
|
2021-11-22 22:26:27 +00:00
|
|
|
] ++ lib.optionals (x11Support) [
|
2021-02-10 13:56:11 +00:00
|
|
|
xcbutil
|
|
|
|
xcbutilcursor
|
|
|
|
xcbutilerrors
|
|
|
|
xcbutilwm
|
|
|
|
];
|
|
|
|
|
2021-08-08 04:46:29 +01:00
|
|
|
mesonBuildType = "release";
|
|
|
|
|
|
|
|
mesonFlags = [
|
2021-11-22 22:26:27 +00:00
|
|
|
(mesonFeatureFlag "backend-x11" x11Support)
|
2021-08-08 04:46:29 +01:00
|
|
|
(mesonFeatureFlag "backend-wayland" waylandSupport)
|
|
|
|
];
|
|
|
|
|
2021-02-10 13:56:11 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://codeberg.org/dnkl/yambar";
|
2021-08-08 04:46:29 +01:00
|
|
|
changelog = "https://codeberg.org/dnkl/yambar/releases/tag/${version}";
|
2021-02-10 13:56:11 +00:00
|
|
|
description = "Modular status panel for X11 and Wayland";
|
|
|
|
longDescription = ''
|
|
|
|
yambar is a lightweight and configurable status panel (bar, for short) for
|
|
|
|
X11 and Wayland, that goes to great lengths to be both CPU and battery
|
|
|
|
efficient - polling is only done when absolutely necessary.
|
|
|
|
|
2021-11-22 22:26:27 +00:00
|
|
|
It has a number of modules that provide information in the form of tags.
|
|
|
|
For example, the clock module has a date tag that contains the current
|
|
|
|
date.
|
2021-02-10 13:56:11 +00:00
|
|
|
|
|
|
|
The modules do not know how to present the information though. This is
|
|
|
|
instead done by particles. And the user, you, decides which particles (and
|
|
|
|
thus how to present the data) to use.
|
|
|
|
|
|
|
|
Furthermore, each particle can have a decoration - a background color or a
|
|
|
|
graphical underline, for example.
|
|
|
|
|
|
|
|
There is no support for images or icons. use an icon font (e.g. Font
|
|
|
|
Awesome, or Material Icons) if you want a graphical representation.
|
|
|
|
|
|
|
|
There are a number of modules and particles builtin. More can be added as
|
|
|
|
plugins. You can even write your own!
|
|
|
|
|
|
|
|
To summarize: a bar displays information provided by modules, using
|
|
|
|
particles and decorations. How is configured by you.
|
|
|
|
'';
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ AndersonTorres ];
|
|
|
|
platforms = with platforms; unix;
|
|
|
|
};
|
|
|
|
}
|