2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, six
|
2021-06-04 09:07:49 +00:00
|
|
|
, setuptools-scm
|
2020-04-24 23:36:52 +00:00
|
|
|
, xorg
|
|
|
|
, python
|
|
|
|
, mock
|
|
|
|
, nose
|
2022-02-10 20:34:41 +00:00
|
|
|
, pytestCheckHook
|
2020-11-24 20:58:05 +00:00
|
|
|
, util-linux
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "xlib";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "0.31";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "python-xlib";
|
|
|
|
repo = "python-xlib";
|
|
|
|
rev = version;
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "155p9xhsk01z9vdml74h07svlqy6gljnx9c6qbydcr14lwghwn06";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
patches = [
|
|
|
|
./fix-no-protocol-specified.patch
|
|
|
|
];
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ xorg.libX11 ];
|
|
|
|
propagatedBuildInputs = [ six ];
|
|
|
|
|
|
|
|
doCheck = !stdenv.isDarwin;
|
2022-02-10 20:34:41 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
mock
|
|
|
|
nose
|
|
|
|
util-linux
|
|
|
|
xorg.xauth
|
|
|
|
xorg.xorgserver
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# requires x session
|
|
|
|
"test/test_xlib_display.py"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Fully functional X client library for Python programs";
|
|
|
|
homepage = "http://python-xlib.sourceforge.net/";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|