2018-09-08 01:02:55 +02:00
|
|
|
{ buildPythonPackage, lib, fetchPypi, glibcLocales, isPy3k, contextvars
|
2019-05-23 01:42:29 +02:00
|
|
|
, pythonOlder, pytest, curio
|
2018-09-08 01:02:55 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sniffio";
|
2019-05-23 01:42:29 +02:00
|
|
|
version = "1.1.0";
|
2018-09-08 01:02:55 +02:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-05-23 01:42:29 +02:00
|
|
|
sha256 = "8e3810100f69fe0edd463d02ad407112542a11ffdc29f67db2bf3771afb87a21";
|
2018-09-08 01:02:55 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
buildInputs = [ glibcLocales ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = lib.optionals (pythonOlder "3.7") [ contextvars ];
|
|
|
|
|
2019-05-23 01:42:29 +02:00
|
|
|
checkInputs = [ pytest curio ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
pytest
|
|
|
|
'';
|
2018-09-08 01:02:55 +02:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = https://github.com/python-trio/sniffio;
|
|
|
|
license = licenses.asl20;
|
|
|
|
description = "Sniff out which async library your code is running under";
|
|
|
|
};
|
|
|
|
}
|