blob: a6a389931953eb3955cfebf71f731a0f1e4bc480 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
python,
writableTmpDirAsHomeHook,
}:
buildPythonPackage rec {
pname = "async-dns";
version = "2.0.0";
pyproject = true;
src = fetchFromGitHub {
owner = "gera2ld";
repo = "async_dns";
tag = "v${version}";
hash = "sha256-jjfJBqTGX+lM9lwNA4TKmlNC1efuCBUMPm3Gf3eHx24=";
};
build-system = [ poetry-core ];
nativeCheckInputs = [
writableTmpDirAsHomeHook
];
checkPhase = ''
runHook preCheck
# Test needs network access
rm -r tests/resolver
${python.interpreter} -m unittest
runHook postCheck
'';
pythonImportsCheck = [ "async_dns" ];
meta = {
description = "Python DNS library";
homepage = "https://github.com/gera2ld/async_dns";
changelog = "https://github.com/gera2ld/async_dns/releases/tag/${src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}
|