1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pytest-runner 5, pytest 6, pytest-asyncio 7, contextvars 8, sqlalchemy 9, isPy27 10, pythonOlder 11}: 12 13buildPythonPackage rec { 14 pname = "aiocontextvars"; 15 version = "0.2.2"; 16 disabled = isPy27; 17 18 src = fetchFromGitHub { 19 owner = "fantix"; 20 repo = pname; 21 rev = "v${version}"; 22 sha256 = "0a2gmrm9csiknc8n3si67sgzffkydplh9d7ga1k87ygk2aj22mmk"; 23 }; 24 25 buildInputs = [ 26 pytest-runner 27 ]; 28 29 checkInputs = [ 30 pytest 31 pytest-asyncio 32 ]; 33 34 propagatedBuildInputs = [ 35 sqlalchemy 36 ] ++ lib.optionals (pythonOlder "3.7") [ contextvars ]; 37 38 checkPhase = '' 39 pytest 40 ''; 41 42 meta = with lib; { 43 description = "Asyncio support for PEP-567 contextvars backport"; 44 homepage = "https://github.com/fantix/aiocontextvars"; 45 license = licenses.bsd3; 46 maintainers = [ maintainers.costrouc ]; 47 }; 48}