depot/third_party/nixpkgs/pkgs/applications/misc/nwg-bar/default.nix
Default email 4d5a95770c Project import generated by Copybara.
GitOrigin-RevId: 3c5319ad3aa51551182ac82ea17ab1c6b0f0df89
2023-03-04 15:14:45 +03:00

39 lines
1,010 B
Nix

{ lib, buildGoModule, fetchFromGitHub, pkg-config, gtk3, gtk-layer-shell }:
buildGoModule rec {
pname = "nwg-bar";
version = "0.1.1";
src = fetchFromGitHub {
owner = "nwg-piotr";
repo = pname;
rev = "v${version}";
sha256 = "sha256-XeRQhDQeobO1xNThdNgBkoGvnO3PMAxrNwTljC1GKPM=";
};
patches = [ ./fix-paths.patch ];
postPatch = ''
substituteInPlace config/bar.json --subst-var out
substituteInPlace tools.go --subst-var out
'';
vendorHash = "sha256-EewEhkX7Bwnz+J1ptO31HKHU4NHo76r4NqMbcrWdiu4=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ gtk3 gtk-layer-shell ];
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";
homepage = "https://github.com/nwg-piotr/nwg-bar";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ sei40kr ];
};
}