2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
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 {
|
2020-11-29 14:04:46 +00:00
|
|
|
version = "0.11.0";
|
2018-02-01 07:48:49 +00:00
|
|
|
pname = "xcffib";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-11-29 14:04:46 +00:00
|
|
|
sha256 = "a751081d816a63d02a4c63f91fd9c0112c1e0061af7ccf79c4e7c18517a75406";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|