2022-08-12 12:06:08 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromSourcehut
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, wayland
|
|
|
|
, pango
|
|
|
|
, wayland-protocols
|
2023-04-29 16:46:19 +00:00
|
|
|
, wayland-scanner
|
2022-08-12 12:06:08 +00:00
|
|
|
, conf ? null
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
# There is a configuration in src/config.def.hpp, which we use by default
|
|
|
|
configFile = if lib.isDerivation conf || builtins.isPath conf then conf else "src/config.def.hpp";
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "somebar";
|
2023-03-08 16:32:21 +00:00
|
|
|
version = "1.0.3";
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
src = fetchFromSourcehut {
|
|
|
|
owner = "~raphi";
|
|
|
|
repo = "somebar";
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = version;
|
2023-03-08 16:32:21 +00:00
|
|
|
sha256 = "sha256-PBxCy1dZrOL1nmhVDQozvF0XL79uKMhhERGNpPPzaRU=";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
nativeBuildInputs = [ meson ninja pkg-config wayland-scanner ];
|
2022-08-12 12:06:08 +00:00
|
|
|
buildInputs = [ pango wayland wayland-protocols ];
|
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
cp ${configFile} src/config.hpp
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://git.sr.ht/~raphi/somebar";
|
|
|
|
description = "dwm-like bar for dwl";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ magnouvean ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|