1{ stdenv, buildPythonPackage, fetchPypi
2, isPy33, isPy27, isPyPy, python, pycares, asyncio, trollius }:
3
4buildPythonPackage rec {
5 pname = "aiodns";
6 version = "1.1.1";
7
8 src = fetchPypi {
9 inherit pname version;
10 sha256 = "d8677adc679ce8d0ef706c14d9c3d2f27a0e0cc11d59730cdbaf218ad52dd9ea";
11 };
12
13 propagatedBuildInputs = with stdenv.lib; [ pycares ]
14 ++ optional isPy33 asyncio
15 ++ optional (isPy27 || isPyPy) trollius;
16
17 checkPhase = ''
18 ${python.interpreter} tests.py
19 '';
20
21 # 'Could not contact DNS servers'
22 doCheck = false;
23
24 meta = with stdenv.lib; {
25 homepage = https://github.com/saghul/aiodns;
26 license = licenses.mit;
27 description = "Simple DNS resolver for asyncio";
28 };
29}