yambar: refactor derivation and split backends as separate packages
* Use fetchFromGitea instead of fetchgit, submodules are unnecessary as we wlr-protocols are vendored. * Split into xorg and wayland backends based on an option flag, (By default, the xorg backend is used, this might be a breaking change) * Adhere to syntax style guide for long lists.
This commit is contained in:
parent
68c0c7f623
commit
82076fcde4
2 changed files with 34 additions and 7 deletions
|
@ -1,6 +1,6 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchgit
|
||||
, fetchFromGitea
|
||||
, pkg-config
|
||||
, meson
|
||||
, ninja
|
||||
|
@ -9,50 +9,75 @@
|
|||
, fcft
|
||||
, json_c
|
||||
, libmpdclient
|
||||
, libxcb
|
||||
, libyaml
|
||||
, pixman
|
||||
, tllist
|
||||
, udev
|
||||
, wayland
|
||||
, wayland-scanner
|
||||
, wayland-protocols
|
||||
, waylandSupport ? false
|
||||
# Xorg backend
|
||||
, libxcb
|
||||
, xcbutil
|
||||
, xcbutilcursor
|
||||
, xcbutilerrors
|
||||
, xcbutilwm
|
||||
}:
|
||||
|
||||
let
|
||||
# Courtesy of sternenseemann and FRidh, commit c9a7fdfcfb420be8e0179214d0d91a34f5974c54
|
||||
mesonFeatureFlag = opt: b: "-D${opt}=${if b then "enabled" else "disabled"}";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "yambar";
|
||||
version = "1.6.2";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://codeberg.org/dnkl/yambar.git";
|
||||
src = fetchFromGitea {
|
||||
domain = "codeberg.org";
|
||||
owner = "dnkl";
|
||||
repo = "yambar";
|
||||
rev = version;
|
||||
sha256 = "sha256-oUNkaWrYIcsK2u+aeRg6DHmH4M1VZ0leNSM0lV9Yy1Y=";
|
||||
sha256 = "sha256-GPKR2BYl3ebxxXbVfH/oZLs7639EYwWU4ZsilJn0Ss8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config meson ninja scdoc ];
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
meson
|
||||
ninja
|
||||
scdoc
|
||||
wayland-scanner
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
alsa-lib
|
||||
fcft
|
||||
json_c
|
||||
libmpdclient
|
||||
libxcb
|
||||
libyaml
|
||||
pixman
|
||||
tllist
|
||||
udev
|
||||
wayland
|
||||
wayland-protocols
|
||||
] ++ lib.optionals (!waylandSupport) [
|
||||
xcbutil
|
||||
xcbutilcursor
|
||||
xcbutilerrors
|
||||
xcbutilwm
|
||||
];
|
||||
|
||||
mesonBuildType = "release";
|
||||
|
||||
mesonFlags = [
|
||||
(mesonFeatureFlag "backend-x11" (!waylandSupport))
|
||||
(mesonFeatureFlag "backend-wayland" waylandSupport)
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://codeberg.org/dnkl/yambar";
|
||||
changelog = "https://codeberg.org/dnkl/yambar/releases/tag/${version}";
|
||||
description = "Modular status panel for X11 and Wayland";
|
||||
longDescription = ''
|
||||
yambar is a lightweight and configurable status panel (bar, for short) for
|
||||
|
|
|
@ -26246,6 +26246,8 @@ in
|
|||
|
||||
yambar = callPackage ../applications/misc/yambar { };
|
||||
|
||||
yambar-wayland = callPackage ../applications/misc/yambar { waylandSupport = true; };
|
||||
|
||||
polyphone = libsForQt514.callPackage ../applications/audio/polyphone { };
|
||||
|
||||
portfolio = callPackage ../applications/office/portfolio {
|
||||
|
|
Loading…
Reference in a new issue