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