Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / django-sesame / default.nix
blobb0671d789510c2222d9e2e7caf88db178671faaa
1 { lib
2 , buildPythonPackage
3 , django
4 , fetchFromGitHub
5 , poetry-core
6 , python
7 , pythonOlder
8 , ua-parser
9 }:
11 buildPythonPackage rec {
12   pname = "django-sesame";
13   version = "3.2.1";
14   format = "pyproject";
16   disabled = pythonOlder "3.8";
18   src = fetchFromGitHub {
19     owner = "aaugustin";
20     repo = pname;
21     rev = "refs/tags/${version}";
22     hash = "sha256-R7ySuop7E1lkxtRSVNFfzyb3Ba1mW0o6PDiTxTztK/Y=";
23   };
25   nativeBuildInputs = [
26     poetry-core
27   ];
29   nativeCheckInputs = [
30     django
31     ua-parser
32   ];
34   pythonImportsCheck = [
35     "sesame"
36   ];
38   checkPhase = ''
39     runHook preCheck
41     ${python.interpreter} -m django test --settings=tests.settings
43     runHook postCheck
44   '';
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   };