1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 nix-update-script,
6
7 # build-system
8 flit-gettext,
9 flit-scm,
10
11 # dependencies
12 django,
13
14 # tests
15 pytest-cov-stub,
16 pytest-django,
17 pytestCheckHook,
18}:
19
20buildPythonPackage rec {
21 pname = "django-hijack";
22 version = "3.7.4";
23 pyproject = true;
24
25 src = fetchFromGitHub {
26 owner = "django-hijack";
27 repo = "django-hijack";
28 tag = version;
29 hash = "sha256-0gcrV1mlodnX79vZUVAIzJaOqM+WpIy0uH4Y/Cmu2lM=";
30 };
31
32 build-system = [
33 flit-gettext
34 flit-scm
35 ];
36
37 dependencies = [ django ];
38
39 nativeCheckInputs = [
40 pytestCheckHook
41 pytest-cov-stub
42 pytest-django
43 ];
44
45 preCheck = ''
46 export DJANGO_SETTINGS_MODULE=tests.test_app.settings
47 '';
48
49 # needed for npmDeps update
50 passthru.updateScript = nix-update-script { };
51
52 meta = with lib; {
53 description = "Allows superusers to hijack (=login as) and work on behalf of another user";
54 homepage = "https://github.com/django-hijack/django-hijack";
55 changelog = "https://github.com/django-hijack/django-hijack/releases/tag/${src.tag}";
56 license = licenses.mit;
57 maintainers = with maintainers; [ ris ];
58 };
59}