depot/third_party/nixpkgs/pkgs/development/python-modules/xcffib/default.nix
Default email ce641f4048 Project import generated by Copybara.
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
2021-12-06 17:07:01 +01:00

38 lines
794 B
Nix

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