2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2023-01-20 10:41:00 +00:00
|
|
|
, aiodns
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, c-ares
|
|
|
|
, cffi
|
2021-06-04 09:07:49 +00:00
|
|
|
, fetchPypi
|
|
|
|
, idna
|
2023-01-20 10:41:00 +00:00
|
|
|
, pythonOlder
|
|
|
|
, tornado
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pycares";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "4.3.0";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-01-20 10:41:00 +00:00
|
|
|
hash = "sha256-xUJpb22sl46dmRkjhHRaZfgKfZRQUBFR5KdWPgYBDUU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
buildInputs = [
|
|
|
|
c-ares
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cffi
|
|
|
|
idna
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedNativeBuildInputs = [
|
|
|
|
cffi
|
|
|
|
];
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
# Requires network access
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit aiodns tornado;
|
|
|
|
};
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"pycares"
|
|
|
|
];
|
2021-06-04 09:07:49 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-06-04 09:07:49 +00:00
|
|
|
description = "Python interface for c-ares";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/saghul/pycares";
|
2023-01-20 10:41:00 +00:00
|
|
|
changelog = "https://github.com/saghul/pycares/releases/tag/pycares-${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2021-06-04 09:07:49 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|