2 , python3Packages, wrapGAppsHook3, gobject-introspection
3 , gtk-layer-shell, pango, gdk-pixbuf, atk
4 # Extra packages called by various internal nwg-panel modules
6 , sway # swaylock, swaymsg
8 , wlr-randr # wlr-randr
10 , brightnessctl # brightnessctl
13 , libdbusmenu-gtk3 # tray
17 python3Packages.buildPythonApplication rec {
21 src = fetchFromGitHub {
24 rev = "refs/tags/v${version}";
25 hash = "sha256-MymxhQxPS07qZlD+TsiMyMtOrmIuqi3LAhc0Huxwxjs=";
31 # Because of wrapGAppsHook3
35 buildInputs = [ atk gdk-pixbuf gtk-layer-shell pango playerctl ];
36 nativeBuildInputs = [ wrapGAppsHook3 gobject-introspection ];
37 propagatedBuildInputs = (with python3Packages;
38 [ i3ipc netifaces psutil pybluez pygobject3 requests dasbus setuptools ])
39 # Run-time GTK dependency required by the Tray module
40 ++ [ libdbusmenu-gtk3 ];
43 mkdir -p $out/share/{applications,pixmaps}
44 cp $src/nwg-panel-config.desktop nwg-processes.desktop $out/share/applications/
45 cp $src/nwg-shell.svg $src/nwg-panel.svg nwg-processes.svg $out/share/pixmaps/
50 "''${gappsWrapperArgs[@]}"
51 --prefix XDG_DATA_DIRS : "$out/share"
52 --prefix PATH : "${lib.makeBinPath [ brightnessctl hyprland nwg-menu pamixer pulseaudio sway systemd wlr-randr ]}"
57 homepage = "https://github.com/nwg-piotr/nwg-panel";
58 changelog = "https://github.com/nwg-piotr/nwg-panel/releases/tag/v${version}";
59 description = "GTK3-based panel for Sway window manager";
60 license = licenses.mit;
61 platforms = platforms.linux;
62 maintainers = with maintainers; [ ludovicopiero ];
63 mainProgram = "nwg-panel";