2022-04-27 09:35:20 +00:00
|
|
|
{ lib
|
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
|
|
|
, django
|
|
|
|
, django_compat
|
|
|
|
, pytest-django
|
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-hijack";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "3.2.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
# the wheel comes with pre-built assets, allowing us to avoid fighting
|
|
|
|
# with npm/webpack/gettext to build them ourselves.
|
|
|
|
format = "wheel";
|
2023-01-11 07:51:40 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit version format;
|
|
|
|
pname = "django_hijack";
|
|
|
|
dist = "py3";
|
|
|
|
python = "py3";
|
2023-01-11 07:51:40 +00:00
|
|
|
hash = "sha256-xFPZ03II1814+bZ5gx7GD/AxYMiLuH6awfSeXEraOHQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
django
|
|
|
|
django_compat
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-django
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
preCheck = ''
|
|
|
|
export DJANGO_SETTINGS_MODULE='hijack.tests.test_app.settings'
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
2023-01-11 07:51:40 +00:00
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"--pyargs"
|
|
|
|
"hijack"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Allows superusers to hijack (=login as) and work on behalf of another user";
|
|
|
|
homepage = "https://github.com/arteria/django-hijack";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/django-hijack/django-hijack/releases/tag/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ ris ];
|
|
|
|
};
|
|
|
|
}
|