1{ stdenv
2, buildPythonPackage
3, fetchFromGitHub
4, six
5, setuptools_scm
6, xorg
7, python
8, mock
9, nose
10, utillinux
11}:
12
13buildPythonPackage rec {
14 pname = "xlib";
15 version = "0.25";
16
17 src = fetchFromGitHub {
18 owner = "python-xlib";
19 repo = "python-xlib";
20 rev = version;
21 sha256 = "1nncx7v9chmgh56afg6dklz3479s5zg3kq91mzh4mj512y0skyki";
22 };
23
24 checkPhase = ''
25 ${python.interpreter} runtests.py
26 '';
27
28 checkInputs = [ mock nose utillinux /* mcookie */ xorg.xauth xorg.xorgserver /* xvfb */ ];
29 nativeBuildInputs = [ setuptools_scm ];
30 buildInputs = [ xorg.libX11 ];
31 propagatedBuildInputs = [ six ];
32
33 doCheck = !stdenv.isDarwin;
34
35 meta = with stdenv.lib; {
36 description = "Fully functional X client library for Python programs";
37 homepage = "http://python-xlib.sourceforge.net/";
38 license = licenses.gpl2Plus;
39 };
40
41}