about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pycares/default.nix
blob: f44aa2e8f8e242d1708dbc02ea5728a21503f721 (plain) (blame)
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
{ stdenv
, buildPythonPackage
, fetchPypi
, python
, c-ares
, cffi
}:

buildPythonPackage rec {
  pname = "pycares";
  version = "3.1.0";

  src = fetchPypi {
    inherit pname version;
    sha256 = "663c000625725d3a63466a674df4ee7f62bf8ca1ae8a0b87a6411eb811e0e794";
  };

  buildInputs = [ c-ares ];

  propagatedBuildInputs = [ cffi ];

  checkPhase = ''
    ${python.interpreter} tests/tests.py
  '';

  # requires network access
  doCheck = false;

  meta = with stdenv.lib; {
    homepage = "https://github.com/saghul/pycares";
    description = "Interface for c-ares";
    license = licenses.mit;
  };

}