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