python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / applications / misc / nwg-panel / default.nix
blob7724976ebabf55b7e380cc6ba0ffe95142d65905
1 { lib, fetchFromGitHub
2 , python3Packages, wrapGAppsHook, gobject-introspection
3 , gtk-layer-shell, pango, gdk-pixbuf, atk
4 # Extra packages called by various internal nwg-panel modules
5 , sway             # swaylock, swaymsg
6 , systemd          # systemctl
7 , wlr-randr        # wlr-randr
8 , nwg-menu         # nwg-menu
9 , light            # light
10 , pamixer          # pamixer
11 , pulseaudio       # pactl
12 , libdbusmenu-gtk3 # tray
15 python3Packages.buildPythonApplication rec {
16   pname = "nwg-panel";
17   version = "0.7.11";
19   src = fetchFromGitHub {
20     owner = "nwg-piotr";
21     repo = "nwg-panel";
22     rev = "refs/tags/v${version}";
23     sha256 = "sha256-Esr1OPyQCCQIOfgkl6RIn93ZaJkF0O2RM9ObIgBlPi4=";
24   };
26   # No tests
27   doCheck = false;
29   # Because of wrapGAppsHook
30   strictDeps = false;
31   dontWrapGApps = true;
33   buildInputs = [ atk gdk-pixbuf gtk-layer-shell pango ];
34   nativeBuildInputs = [ wrapGAppsHook gobject-introspection ];
35   propagatedBuildInputs = (with python3Packages;
36     [ i3ipc netifaces psutil pybluez pygobject3 requests dasbus setuptools ])
37     # Run-time GTK dependency required by the Tray module
38     ++ [ libdbusmenu-gtk3 ];
40   postInstall = ''
41     mkdir -p $out/share/{applications,pixmaps}
42     cp $src/nwg-panel-config.desktop $out/share/applications/
43     cp $src/nwg-shell.svg $src/nwg-panel.svg $out/share/pixmaps/
44   '';
46   preFixup = ''
47     makeWrapperArgs+=(
48       "''${gappsWrapperArgs[@]}"
49       --prefix XDG_DATA_DIRS : "$out/share"
50       --prefix PATH : "${lib.makeBinPath [ light nwg-menu pamixer pulseaudio sway systemd wlr-randr ]}"
51     )
52   '';
54   meta = with lib; {
55     homepage = "https://github.com/nwg-piotr/nwg-panel";
56     description = "GTK3-based panel for Sway window manager";
57     license = licenses.mit;
58     platforms = platforms.linux;
59     maintainers = with maintainers; [ berbiche ];
60   };