1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 poetry-core, 6 python, 7 pythonOlder, 8}: 9 10buildPythonPackage rec { 11 pname = "async-dns"; 12 version = "2.0.0"; 13 disabled = pythonOlder "3.6"; 14 format = "pyproject"; 15 16 src = fetchFromGitHub { 17 owner = "gera2ld"; 18 repo = "async_dns"; 19 rev = "v${version}"; 20 sha256 = "0vn7hxvpzikd7q61a27fwzal4lwsra2063awyr6fjpy6lh3cjdwf"; 21 }; 22 23 nativeBuildInputs = [ poetry-core ]; 24 25 checkPhase = '' 26 export HOME=$TMPDIR 27 # Test needs network access 28 rm -r tests/resolver 29 ${python.interpreter} -m unittest 30 ''; 31 32 pythonImportsCheck = [ "async_dns" ]; 33 34 meta = with lib; { 35 description = "Python DNS library"; 36 homepage = "https://github.com/gera2ld/async_dns"; 37 license = with licenses; [ mit ]; 38 maintainers = with maintainers; [ fab ]; 39 }; 40}