2021-07-03 03:11:41 +00:00
|
|
|
{ lib, fetchFromGitHub
|
|
|
|
, python3Packages, wrapGAppsHook, gobject-introspection
|
|
|
|
, gtk-layer-shell, pango, gdk-pixbuf, atk
|
|
|
|
# Extra packages called by various internal nwg-panel modules
|
|
|
|
, sway # swaylock, swaymsg
|
|
|
|
, systemd # systemctl
|
|
|
|
, wlr-randr # wlr-randr
|
|
|
|
, nwg-menu # nwg-menu
|
|
|
|
, light # light
|
|
|
|
, pamixer # pamixer
|
|
|
|
, pulseaudio # pactl
|
2022-08-12 12:06:08 +00:00
|
|
|
, libdbusmenu-gtk3 # tray
|
2021-07-03 03:11:41 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "nwg-panel";
|
2022-10-21 18:38:19 +00:00
|
|
|
version = "0.7.11";
|
2021-07-03 03:11:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nwg-piotr";
|
|
|
|
repo = "nwg-panel";
|
2022-09-09 14:08:57 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2022-10-21 18:38:19 +00:00
|
|
|
sha256 = "sha256-Esr1OPyQCCQIOfgkl6RIn93ZaJkF0O2RM9ObIgBlPi4=";
|
2021-07-03 03:11:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# No tests
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
# Because of wrapGAppsHook
|
|
|
|
strictDeps = false;
|
|
|
|
dontWrapGApps = true;
|
|
|
|
|
|
|
|
buildInputs = [ atk gdk-pixbuf gtk-layer-shell pango ];
|
|
|
|
nativeBuildInputs = [ wrapGAppsHook gobject-introspection ];
|
2022-08-12 12:06:08 +00:00
|
|
|
propagatedBuildInputs = (with python3Packages;
|
|
|
|
[ i3ipc netifaces psutil pybluez pygobject3 requests dasbus setuptools ])
|
|
|
|
# Run-time GTK dependency required by the Tray module
|
|
|
|
++ [ libdbusmenu-gtk3 ];
|
2021-07-03 03:11:41 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/{applications,pixmaps}
|
|
|
|
cp $src/nwg-panel-config.desktop $out/share/applications/
|
|
|
|
cp $src/nwg-shell.svg $src/nwg-panel.svg $out/share/pixmaps/
|
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
makeWrapperArgs+=(
|
|
|
|
"''${gappsWrapperArgs[@]}"
|
|
|
|
--prefix XDG_DATA_DIRS : "$out/share"
|
|
|
|
--prefix PATH : "${lib.makeBinPath [ light nwg-menu pamixer pulseaudio sway systemd wlr-randr ]}"
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/nwg-piotr/nwg-panel";
|
|
|
|
description = "GTK3-based panel for Sway window manager";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ berbiche ];
|
|
|
|
};
|
|
|
|
}
|