2021-01-24 00:29:22 +00:00
|
|
|
{ lib
|
2018-02-01 07:48:49 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, xorg
|
|
|
|
, cffi
|
2020-08-26 08:42:08 +01:00
|
|
|
, nose
|
2018-02-01 07:48:49 +00:00
|
|
|
, six
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-02-20 09:09:19 +00:00
|
|
|
version = "0.11.1";
|
2018-02-01 07:48:49 +00:00
|
|
|
pname = "xcffib";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-02-20 09:09:19 +00:00
|
|
|
sha256 = "12949cfe2e68c806efd57596bb9bf3c151f399d4b53e15d1101b2e9baaa66f5a";
|
2018-02-01 07:48:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
# Hardcode cairo library path
|
|
|
|
sed -e 's,ffi\.dlopen(,&"${xorg.libxcb.out}/lib/" + ,' -i xcffib/__init__.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ cffi six ];
|
|
|
|
|
2020-08-26 08:42:08 +01:00
|
|
|
checkInputs = [ nose ];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "xcffib" ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-02-01 07:48:49 +00:00
|
|
|
description = "A drop in replacement for xpyb, an XCB python binding";
|
|
|
|
homepage = "https://github.com/tych0/xcffib";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ kamilchm ];
|
|
|
|
};
|
|
|
|
}
|