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";
|
2020-05-09 11:01:55 +01:00
|
|
|
version = "3.1.1";
|
2018-10-16 15:49:52 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-05-09 11:01:55 +01:00
|
|
|
sha256 = "18dfd4fd300f570d6c4536c1d987b7b7673b2a9d14346592c5d6ed716df0d104";
|
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; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/saghul/pycares";
|
2018-10-16 15:49:52 +01:00
|
|
|
description = "Interface for c-ares";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|