1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 sanic, 6 sanic-testing, 7 pytestCheckHook, 8}: 9 10buildPythonPackage rec { 11 pname = "sanic-auth"; 12 version = "0.3.0"; 13 format = "setuptools"; 14 15 src = fetchPypi { 16 pname = "Sanic-Auth"; 17 inherit version; 18 sha256 = "0dc24ynqjraqwgvyk0g9bj87zgpq4xnssl24hnsn7l5vlkmk8198"; 19 }; 20 21 propagatedBuildInputs = [ sanic ]; 22 23 nativeCheckInputs = [ 24 pytestCheckHook 25 sanic-testing 26 ]; 27 28 disabledTests = [ 29 # incompatible with sanic>=22.3.0 30 "test_login_required" 31 ]; 32 33 postPatch = '' 34 # Support for httpx>=0.20.0 35 substituteInPlace tests/test_auth.py \ 36 --replace "allow_redirects=False" "follow_redirects=False" 37 ''; 38 39 pythonImportsCheck = [ "sanic_auth" ]; 40 41 meta = with lib; { 42 description = "Simple Authentication for Sanic"; 43 homepage = "https://github.com/pyx/sanic-auth/"; 44 license = licenses.bsdOriginal; 45 maintainers = with maintainers; [ arnoldfarkas ]; 46 }; 47}