1{ lib
2, buildPythonPackage
3, fetchPypi
4, sanic
5, sanic-testing
6, pytestCheckHook
7}:
8
9buildPythonPackage rec {
10 pname = "Sanic-Auth";
11 version = "0.3.0";
12 format = "setuptools";
13
14 src = fetchPypi {
15 inherit pname version;
16 sha256 = "0dc24ynqjraqwgvyk0g9bj87zgpq4xnssl24hnsn7l5vlkmk8198";
17 };
18
19 propagatedBuildInputs = [
20 sanic
21 ];
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 = [
40 "sanic_auth"
41 ];
42
43 meta = with lib; {
44 description = "Simple Authentication for Sanic";
45 homepage = "https://github.com/pyx/sanic-auth/";
46 license = licenses.bsdOriginal;
47 maintainers = with maintainers; [ arnoldfarkas ];
48 };
49}