2021-01-25 08:26:54 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, python,
|
2017-05-28 12:24:02 +01:00
|
|
|
django, django_compat, django_nose
|
|
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
2017-11-09 11:26:09 +00:00
|
|
|
pname = "django-hijack";
|
2019-01-19 14:18:54 +00:00
|
|
|
version = "2.1.10";
|
2017-05-28 12:24:02 +01:00
|
|
|
|
|
|
|
# the pypi packages don't include everything required for the tests
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "arteria";
|
|
|
|
repo = "django-hijack";
|
|
|
|
rev = "v${version}";
|
2019-01-19 14:18:54 +00:00
|
|
|
sha256 = "01fwkjdzvw0yx2spwi7zc1yy64ndq1y72bfmk7kxnq5x803m2ak6";
|
2017-05-28 12:24:02 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [ django_nose ];
|
|
|
|
propagatedBuildInputs = [ django django_compat ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
|
|
|
|
# we have to do a little bit of tinkering to convince the tests to run against the installed package, not the
|
|
|
|
# source directory
|
|
|
|
mkdir testbase
|
|
|
|
pushd testbase
|
2019-01-19 14:18:54 +00:00
|
|
|
mv ../runtests.py .
|
2017-05-28 12:24:02 +01:00
|
|
|
${python.interpreter} runtests.py hijack
|
|
|
|
popd
|
|
|
|
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-05-28 12:24:02 +01:00
|
|
|
description = "Allows superusers to hijack (=login as) and work on behalf of another user";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/arteria/django-hijack";
|
2017-05-28 12:24:02 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ ris ];
|
|
|
|
};
|
2017-11-09 11:26:09 +00:00
|
|
|
}
|