2018-02-01 07:48:49 +00:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, xorg
|
|
|
|
, cffi
|
2020-08-26 08:42:08 +01:00
|
|
|
, nose
|
2018-02-01 07:48:49 +00:00
|
|
|
, six
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2020-08-16 18:31:20 +01:00
|
|
|
version = "0.10.1";
|
2018-02-01 07:48:49 +00:00
|
|
|
pname = "xcffib";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-08-16 18:31:20 +01:00
|
|
|
sha256 = "cab1630a51076b11819c97e6da461ddd4cb21bdf65c071d1c57a846c9b129c12";
|
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" ];
|
|
|
|
|
2018-02-01 07:48:49 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A drop in replacement for xpyb, an XCB python binding";
|
|
|
|
homepage = "https://github.com/tych0/xcffib";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ kamilchm ];
|
|
|
|
};
|
|
|
|
}
|