2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
python,
|
|
|
|
pythonOlder,
|
2021-04-08 16:26:57 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "async-dns";
|
2021-08-05 21:33:18 +00:00
|
|
|
version = "2.0.0";
|
2021-04-08 16:26:57 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gera2ld";
|
|
|
|
repo = "async_dns";
|
|
|
|
rev = "v${version}";
|
2021-08-05 21:33:18 +00:00
|
|
|
sha256 = "0vn7hxvpzikd7q61a27fwzal4lwsra2063awyr6fjpy6lh3cjdwf";
|
2021-04-08 16:26:57 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2021-04-08 16:26:57 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
# Test needs network access
|
2021-08-05 21:33:18 +00:00
|
|
|
rm -r tests/resolver
|
2021-04-08 16:26:57 +00:00
|
|
|
${python.interpreter} -m unittest
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "async_dns" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python DNS library";
|
|
|
|
homepage = "https://github.com/gera2ld/async_dns";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|