aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/python-modules/sniffio/default.nix
blob: 5b91bade0098dbd0c1199f700d6f5ca656fdc099 (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
{ buildPythonPackage, lib, fetchPypi, glibcLocales, isPy3k, contextvars
, pythonOlder, pytest, curio
}:

buildPythonPackage rec {
  pname = "sniffio";
  version = "1.2.0";

  src = fetchPypi {
    inherit pname version;
    sha256 = "c4666eecec1d3f50960c6bdf61ab7bc350648da6c126e3cf6898d8cd4ddcd3de";
  };

  disabled = !isPy3k;

  buildInputs = [ glibcLocales ];

  propagatedBuildInputs = lib.optionals (pythonOlder "3.7") [ contextvars ];

  checkInputs = [ pytest curio ];

  checkPhase = ''
    pytest
  '';

  meta = with lib; {
    homepage = "https://github.com/python-trio/sniffio";
    license = licenses.asl20;
    description = "Sniff out which async library your code is running under";
  };
}