2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, capnproto
|
|
|
|
, cython
|
2021-01-09 10:05:03 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, isPy27
|
2020-04-24 23:36:52 +00:00
|
|
|
, isPyPy
|
2021-01-09 10:05:03 +00:00
|
|
|
, pkgconfig
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pycapnp";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "1.1.0";
|
2021-01-09 10:05:03 +00:00
|
|
|
disabled = isPyPy || isPy27;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "capnproto";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "1xi6df93ggkpmwckwbi356v7m32zv5qry8s45hvsps66dz438kmi";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
nativeBuildInputs = [ cython pkgconfig ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
buildInputs = [ capnproto ];
|
|
|
|
|
|
|
|
# Tests depend on schema_capnp which fails to generate
|
2021-01-09 10:05:03 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "capnp" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-04-27 09:35:20 +00:00
|
|
|
homepage = "https://capnproto.github.io/pycapnp/";
|
2021-01-09 10:05:03 +00:00
|
|
|
maintainers = with maintainers; [ cstrahan lukeadams ];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd2;
|
|
|
|
};
|
|
|
|
}
|