2018-10-16 15:49:52 +01:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2019-03-19 15:11:46 +00:00
|
|
|
, python
|
|
|
|
, c-ares
|
|
|
|
, cffi
|
2018-10-16 15:49:52 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pycares";
|
2019-03-19 15:11:46 +00:00
|
|
|
version = "3.0.0";
|
2018-10-16 15:49:52 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-03-19 15:11:46 +00:00
|
|
|
sha256 = "b253f5dcaa0ac7076b79388a3ac80dd8f3bd979108f813baade40d3a9b8bf0bd";
|
2018-10-16 15:49:52 +01:00
|
|
|
};
|
|
|
|
|
2019-03-19 15:11:46 +00:00
|
|
|
buildInputs = [ c-ares ];
|
2018-10-16 15:49:52 +01:00
|
|
|
|
2019-03-19 15:11:46 +00:00
|
|
|
propagatedBuildInputs = [ cffi ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} tests/tests.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
# requires network access
|
2018-10-16 15:49:52 +01:00
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://github.com/saghul/pycares;
|
|
|
|
description = "Interface for c-ares";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|