1{ lib
2, buildPythonPackage
3, django
4, fetchFromGitHub
5, poetry-core
6, python
7, pythonOlder
8, ua-parser
9}:
10
11buildPythonPackage rec {
12 pname = "django-sesame";
13 version = "3.2.1";
14 format = "pyproject";
15
16 disabled = pythonOlder "3.8";
17
18 src = fetchFromGitHub {
19 owner = "aaugustin";
20 repo = pname;
21 rev = "refs/tags/${version}";
22 hash = "sha256-R7ySuop7E1lkxtRSVNFfzyb3Ba1mW0o6PDiTxTztK/Y=";
23 };
24
25 nativeBuildInputs = [
26 poetry-core
27 ];
28
29 nativeCheckInputs = [
30 django
31 ua-parser
32 ];
33
34 pythonImportsCheck = [
35 "sesame"
36 ];
37
38 checkPhase = ''
39 runHook preCheck
40
41 ${python.interpreter} -m django test --settings=tests.settings
42
43 runHook postCheck
44 '';
45
46 meta = with lib; {
47 description = "URLs with authentication tokens for automatic login";
48 homepage = "https://github.com/aaugustin/django-sesame";
49 license = licenses.bsd3;
50 maintainers = with maintainers; [ elohmeier ];
51 };
52}