1{ buildPythonPackage, lib, fetchPypi, glibcLocales, isPy3k, contextvars 2, pythonOlder, pytest, curio 3}: 4 5buildPythonPackage rec { 6 pname = "sniffio"; 7 version = "1.2.0"; 8 9 src = fetchPypi { 10 inherit pname version; 11 sha256 = "c4666eecec1d3f50960c6bdf61ab7bc350648da6c126e3cf6898d8cd4ddcd3de"; 12 }; 13 14 disabled = !isPy3k; 15 16 buildInputs = [ glibcLocales ]; 17 18 propagatedBuildInputs = lib.optionals (pythonOlder "3.7") [ contextvars ]; 19 20 checkInputs = [ pytest curio ]; 21 22 checkPhase = '' 23 pytest 24 ''; 25 26 meta = with lib; { 27 homepage = "https://github.com/python-trio/sniffio"; 28 license = licenses.asl20; 29 description = "Sniff out which async library your code is running under"; 30 }; 31}