depot/third_party/nixpkgs/pkgs/development/python-modules/async-dns/default.nix
Default email 634fe97655 Project import generated by Copybara.
GitOrigin-RevId: 09c38c29f2c719cd76ca17a596c2fdac9e186ceb
2021-07-03 00:11:41 -03:00

41 lines
828 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, python
, pythonOlder
}:
buildPythonPackage rec {
pname = "async-dns";
version = "1.1.10";
disabled = pythonOlder "3.6";
format = "pyproject";
src = fetchFromGitHub {
owner = "gera2ld";
repo = "async_dns";
rev = "v${version}";
sha256 = "1yxmdlf2n66kp2mprsd4bvfsf63l4c4cfkjm2rm063pmlifz2fvj";
};
nativeBuildInputs = [
poetry-core
];
checkPhase = ''
export HOME=$TMPDIR
# Test needs network access
rm tests/test_resolver.py
${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 ];
};
}