1{ lib
2, buildPythonPackage
3, fetchPypi
4, xorg
5, cffi
6, nose
7, six
8}:
9
10buildPythonPackage rec {
11 version = "0.11.1";
12 pname = "xcffib";
13
14 src = fetchPypi {
15 inherit pname version;
16 sha256 = "12949cfe2e68c806efd57596bb9bf3c151f399d4b53e15d1101b2e9baaa66f5a";
17 };
18
19 patchPhase = ''
20 # Hardcode cairo library path
21 sed -e 's,ffi\.dlopen(,&"${xorg.libxcb.out}/lib/" + ,' -i xcffib/__init__.py
22 '';
23
24 propagatedBuildInputs = [ cffi six ];
25
26 propagatedNativeBuildInputs = [ cffi ];
27
28 checkInputs = [ nose ];
29
30 pythonImportsCheck = [ "xcffib" ];
31
32 meta = with lib; {
33 description = "A drop in replacement for xpyb, an XCB python binding";
34 homepage = "https://github.com/tych0/xcffib";
35 license = licenses.asl20;
36 maintainers = with maintainers; [ kamilchm ];
37 };
38}