2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, librsvg
|
|
|
|
, pkg-config
|
|
|
|
, gtk3
|
|
|
|
, gtk-layer-shell
|
2024-05-15 15:35:15 +00:00
|
|
|
, wrapGAppsHook3 }:
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "nwg-bar";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "0.1.6";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nwg-piotr";
|
|
|
|
repo = pname;
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "v${version}";
|
2024-02-07 01:22:34 +00:00
|
|
|
sha256 = "sha256-5N+WKZ+fuHQ0lVLd95/KkNAwzg/C4ImZ4DnSuKNGunk=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./fix-paths.patch ];
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace config/bar.json --subst-var out
|
|
|
|
substituteInPlace tools.go --subst-var out
|
|
|
|
'';
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
vendorHash = "sha256-/kqhZcIuoN/XA0i1ua3lzVGn4ghkekFYScL1o3kgBX4=";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeBuildInputs = [ pkg-config wrapGAppsHook3 ];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
buildInputs = [ gtk3 gtk-layer-shell librsvg ];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $out/share/nwg-bar
|
|
|
|
cp -r config/* images $out/share/nwg-bar
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description =
|
|
|
|
"GTK3-based button bar for sway and other wlroots-based compositors";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "nwg-bar";
|
2022-09-09 14:08:57 +00:00
|
|
|
homepage = "https://github.com/nwg-piotr/nwg-bar";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ sei40kr ];
|
|
|
|
};
|
|
|
|
}
|