1{ lib, stdenv
2, buildPythonPackage
3, fetchFromGitHub
4, six
5, setuptools-scm
6, xorg
7, python
8, mock
9, nose
10, pytestCheckHook
11, util-linux
12}:
13
14buildPythonPackage rec {
15 pname = "xlib";
16 version = "0.33";
17
18 src = fetchFromGitHub {
19 owner = "python-xlib";
20 repo = "python-xlib";
21 rev = "refs/tags/${version}";
22 hash = "sha256-u06OWlMIOUzHOVS4hvm72jGgTSXWUqMvEQd8bTpFog0=";
23 };
24
25 nativeBuildInputs = [
26 setuptools-scm
27 ];
28
29 buildInputs = [
30 xorg.libX11
31 ];
32
33 propagatedBuildInputs = [
34 six
35 ];
36
37 doCheck = !stdenv.isDarwin;
38
39 nativeCheckInputs = [
40 pytestCheckHook
41 mock
42 nose
43 util-linux
44 xorg.xauth
45 xorg.xorgserver
46 ];
47
48 disabledTestPaths = [
49 # requires x session
50 "test/test_xlib_display.py"
51 ];
52
53 meta = with lib; {
54 changelog = "https://github.com/python-xlib/python-xlib/releases/tag/${version}";
55 description = "Fully functional X client library for Python programs";
56 homepage = "https://github.com/python-xlib/python-xlib";
57 license = licenses.lgpl21Plus;
58 maintainers = with maintainers; [ ];
59 };
60
61}