1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 djangorestframework,
7 django,
8 josepy,
9 requests,
10 cryptography,
11}:
12
13buildPythonPackage rec {
14 pname = "mozilla-django-oidc";
15 version = "4.0.1";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "mozilla";
20 repo = "mozilla-django-oidc";
21 rev = version;
22 hash = "sha256-72F1aLLIId+YClTrpOz3bL8LSq6ZhZjjtv8V/GJGkqs=";
23 };
24
25 nativeBuildInputs = [
26 setuptools
27 ];
28
29 nativeCheckInputs = [
30 djangorestframework
31 ];
32
33 checkPhase = ''
34 runHook preCheck
35
36 PYTHONPATH=.:$PYTHONPATH DJANGO_SETTINGS_MODULE=tests.settings django-admin test
37
38 runHook postCheck
39 '';
40
41 dependencies = [
42 django
43 josepy
44 requests
45 cryptography
46 ];
47
48 meta = {
49 description = "Django OpenID Connect library";
50 homepage = "https://github.com/mozilla/mozilla-django-oidc";
51 changelog = "https://github.com/mozilla/mozilla-django-oidc/releases/tag/${src.rev}";
52 license = lib.licenses.mpl20;
53 maintainers = with lib.maintainers; [ felbinger ];
54 };
55}