@@ -1,34 +1,35 @@
11{ stdenv
22, buildPythonPackage
3−, fetchPypi
43, capnproto
54, cython
5+, fetchFromGitHub
6+, isPy27
67, isPyPy
7−, isPy3k
8+, pkgconfig
89}:
910
1011buildPythonPackage rec {
1112 pname = "pycapnp";
1213 version = "1.0.0";
13− disabled = isPyPy || isPy3k;
14+ disabled = isPyPy || isPy27;
1415
15− src = fetchPypi {
16− inherit pname version;
17− sha256 = "9f6fcca349ebf2ec04ca7eacb076aea3e4fcdc010ac33c98b54f0a19d4e5d3e0";
16+ src = fetchFromGitHub {
17+ owner = "capnproto";
18+ repo = pname;
19+ rev = "v${version}";
20+ sha256 = "1n6dq2fbagi3wvrpkyb7wx4y15nkm2grln4y75hrqgmnli8ggi9v";
1821 };
1922
20− buildInputs = [ capnproto cython ];
23+ buildInputs = [ capnproto cython pkgconfig ];
2124
22− # import setuptools as soon as possible, to minimize monkeypatching mayhem.
23− postConfigure = ''
24− sed -i '3iimport setuptools' setup.py
25− '';
25+ # Tests disabled due to dependency on jinja and various other libraries.
26+ doCheck = false;
27+
28+ pythonImportsCheck = [ "capnp" ];
2629
2730 meta = with stdenv.lib; {
28− maintainers = with maintainers; [ cstrahan ];
31+ maintainers = with maintainers; [ cstrahan lukeadams ];
2932 license = licenses.bsd2;
30− homepage = "http://jparyani.github.io/pycapnp/index.html";
31− broken = true; # 2018-04-11
33+ homepage = "https://capnproto.github.io/pycapnp/";
3234 };
33−
3435}