nixpkgs/pkgs/by-name/nw/nwg-panel/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

66 lines
2.0 KiB
Nix
Raw Normal View History

2021-06-17 01:53:39 +00:00
{ lib, fetchFromGitHub
, python3Packages, wrapGAppsHook3, gobject-introspection
2021-06-17 01:53:39 +00:00
, gtk-layer-shell, pango, gdk-pixbuf, atk
# Extra packages called by various internal nwg-panel modules
, hyprland # hyprctl
2021-06-17 01:53:39 +00:00
, sway # swaylock, swaymsg
, systemd # systemctl
, wlr-randr # wlr-randr
, nwg-menu # nwg-menu
, brightnessctl # brightnessctl
2021-06-17 01:53:39 +00:00
, pamixer # pamixer
, pulseaudio # pactl
2022-07-27 09:37:21 +00:00
, libdbusmenu-gtk3 # tray
2023-08-16 06:02:57 +00:00
, playerctl
2021-06-17 01:53:39 +00:00
}:
python3Packages.buildPythonApplication rec {
pname = "nwg-panel";
2024-08-28 12:37:48 +00:00
version = "0.9.38";
2021-06-17 01:53:39 +00:00
src = fetchFromGitHub {
owner = "nwg-piotr";
repo = "nwg-panel";
2024-02-22 10:43:17 +00:00
rev = "refs/tags/v${version}";
2024-08-28 12:37:48 +00:00
hash = "sha256-5vq/5QovvoDUDu9IiAeI9c06g0iy9YLi7CdpEhXbLqI=";
2021-06-17 01:53:39 +00:00
};
# No tests
doCheck = false;
# Because of wrapGAppsHook3
2021-06-17 01:53:39 +00:00
strictDeps = false;
dontWrapGApps = true;
2023-08-16 06:02:57 +00:00
buildInputs = [ atk gdk-pixbuf gtk-layer-shell pango playerctl ];
nativeBuildInputs = [ wrapGAppsHook3 gobject-introspection ];
2022-07-27 09:37:21 +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-06-17 01:53:39 +00:00
postInstall = ''
mkdir -p $out/share/{applications,pixmaps}
cp $src/nwg-panel-config.desktop nwg-processes.desktop $out/share/applications/
cp $src/nwg-shell.svg $src/nwg-panel.svg nwg-processes.svg $out/share/pixmaps/
2021-06-17 01:53:39 +00:00
'';
preFixup = ''
makeWrapperArgs+=(
"''${gappsWrapperArgs[@]}"
--prefix XDG_DATA_DIRS : "$out/share"
--prefix PATH : "${lib.makeBinPath [ brightnessctl hyprland nwg-menu pamixer pulseaudio sway systemd wlr-randr ]}"
2021-06-17 01:53:39 +00:00
)
'';
meta = with lib; {
homepage = "https://github.com/nwg-piotr/nwg-panel";
2024-06-16 20:48:03 +00:00
changelog = "https://github.com/nwg-piotr/nwg-panel/releases/tag/v${version}";
2021-06-17 01:53:39 +00:00
description = "GTK3-based panel for Sway window manager";
license = licenses.mit;
platforms = platforms.linux;
2023-08-16 06:02:57 +00:00
maintainers = with maintainers; [ ludovicopiero ];
mainProgram = "nwg-panel";
2021-06-17 01:53:39 +00:00
};
}