about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pystray/default.nix
blob: 45bc2a55e599d484eaefd5c3f2e6614f789d8e60 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{ lib, buildPythonPackage, fetchFromGitHub
, pillow, xlib, six, xvfb-run, sphinx }:

buildPythonPackage rec {
  pname = "pystray";
  version = "0.17.3";

  src = fetchFromGitHub {
    owner = "moses-palmer";
    repo = "pystray";
    rev = "v${version}";
    sha256 = "sha256-da2ZkehyXrxW5LdMR3K5AEQhiCpx8ygn6eswTC8fsRo=";
  };

  nativeBuildInputs = [ sphinx ];
  propagatedBuildInputs = [ pillow xlib six ];
  checkInputs = [ xvfb-run ];

  checkPhase = ''
    rm tests/icon_tests.py # test needs user input

    xvfb-run -s '-screen 0 800x600x24' python setup.py test
  '';

  meta = with lib; {
    homepage = "https://github.com/moses-palmer/pystray";
    description = "This library allows you to create a system tray icon";
    license = with licenses; [ gpl3Plus lgpl3Plus ];
    platforms = platforms.linux;
    maintainers = with maintainers; [ jojosch ];
  };
}