depot/third_party/nixpkgs/pkgs/development/python-modules/xcffib/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

31 lines
676 B
Nix

{ stdenv
, buildPythonPackage
, fetchPypi
, xorg
, cffi
, six
}:
buildPythonPackage rec {
version = "0.9.0";
pname = "xcffib";
src = fetchPypi {
inherit pname version;
sha256 = "1r03yvxwbimh8ngfrbd436f9r535vvj6m1b3zfgz9kl76c8yn5ic";
};
patchPhase = ''
# Hardcode cairo library path
sed -e 's,ffi\.dlopen(,&"${xorg.libxcb.out}/lib/" + ,' -i xcffib/__init__.py
'';
propagatedBuildInputs = [ cffi six ];
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 ];
};
}