nixpkgs/pkgs/development/python-modules/xcffib/default.nix

37 lines
759 B
Nix
Raw Normal View History

{ 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 {
version = "0.11.0";
2018-02-01 07:48:49 +00:00
pname = "xcffib";
src = fetchPypi {
inherit pname version;
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" ];
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 ];
};
}