1{ lib
2, fetchPypi
3, buildPythonPackage
4, django
5, django_compat
6, pytest-django
7, pytestCheckHook
8}:
9
10buildPythonPackage rec {
11 pname = "django-hijack";
12 version = "3.2.1";
13
14 # the wheel comes with pre-built assets, allowing us to avoid fighting
15 # with npm/webpack/gettext to build them ourselves.
16 format = "wheel";
17 src = fetchPypi {
18 inherit version format;
19 pname = "django_hijack";
20 dist = "py3";
21 python = "py3";
22 sha256 = "sha256-sHI3ULJH5bH2n2AKQLHVEkBAYfM5GOC/+0qpKDFOods=";
23 };
24
25 propagatedBuildInputs = [ django django_compat ];
26
27 checkInputs = [ pytestCheckHook pytest-django ];
28 preCheck = ''
29 export DJANGO_SETTINGS_MODULE='hijack.tests.test_app.settings'
30 '';
31 pytestFlagsArray = [ "--pyargs" "hijack" ];
32
33 meta = with lib; {
34 description = "Allows superusers to hijack (=login as) and work on behalf of another user";
35 homepage = "https://github.com/arteria/django-hijack";
36 license = licenses.mit;
37 maintainers = with maintainers; [ ris ];
38 };
39}