1{ lib, stdenv
2, buildPythonPackage
3, fetchFromGitHub
4, six
5, setuptools-scm
6, xorg
7, python
8, mock
9, nose
10, util-linux
11}:
12
13buildPythonPackage rec {
14 pname = "xlib";
15 version = "0.29";
16
17 src = fetchFromGitHub {
18 owner = "python-xlib";
19 repo = "python-xlib";
20 rev = version;
21 sha256 = "sha256-zOG1QzRa5uN36Ngv8i5s3mq+VIoRzxFj5ltUbKdonJ0=";
22 };
23
24 checkPhase = ''
25 ${python.interpreter} runtests.py
26 '';
27
28 checkInputs = [ mock nose util-linux /* 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 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}