2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiodns,
|
|
|
|
buildPythonPackage,
|
|
|
|
c-ares,
|
|
|
|
cffi,
|
|
|
|
fetchPypi,
|
|
|
|
idna,
|
|
|
|
pythonOlder,
|
|
|
|
tornado,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pycares";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "4.4.0";
|
2023-01-20 10:41:00 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-9HV51Qjy9W7d0WznIEV4KtOxs7Z4CYaZ4rahswcz4cI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +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
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedNativeBuildInputs = [ cffi ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|