1{ lib, buildPythonPackage, fetchFromGitHub
2, pillow, xlib, six, xvfb-run, sphinx }:
3
4buildPythonPackage rec {
5 pname = "pystray";
6 version = "0.17.4";
7
8 src = fetchFromGitHub {
9 owner = "moses-palmer";
10 repo = "pystray";
11 rev = "v${version}";
12 sha256 = "sha256-Rg2bbFTXLc1hXdShUmFxPcJtlcyWhspcjZtJYDSQ6vQ=";
13 };
14
15 nativeBuildInputs = [ sphinx ];
16 propagatedBuildInputs = [ pillow xlib six ];
17 checkInputs = [ xvfb-run ];
18
19 checkPhase = ''
20 rm tests/icon_tests.py # test needs user input
21
22 xvfb-run -s '-screen 0 800x600x24' python setup.py test
23 '';
24
25 meta = with lib; {
26 homepage = "https://github.com/moses-palmer/pystray";
27 description = "This library allows you to create a system tray icon";
28 license = with licenses; [ gpl3Plus lgpl3Plus ];
29 platforms = platforms.linux;
30 maintainers = with maintainers; [ jojosch ];
31 };
32}