2017-05-28 13:24:02 +02:00
|
|
|
{ stdenv, buildPythonPackage, fetchFromGitHub, python,
|
|
|
|
django, django_compat, django_nose
|
|
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
2017-11-09 12:26:09 +01:00
|
|
|
pname = "django-hijack";
|
2019-01-19 15:18:54 +01:00
|
|
|
version = "2.1.10";
|
2017-05-28 13:24:02 +02: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 15:18:54 +01:00
|
|
|
sha256 = "01fwkjdzvw0yx2spwi7zc1yy64ndq1y72bfmk7kxnq5x803m2ak6";
|
2017-05-28 13:24:02 +02: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 15:18:54 +01:00
|
|
|
mv ../runtests.py .
|
2017-05-28 13:24:02 +02:00
|
|
|
${python.interpreter} runtests.py hijack
|
|
|
|
popd
|
|
|
|
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Allows superusers to hijack (=login as) and work on behalf of another user";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/arteria/django-hijack";
|
2017-05-28 13:24:02 +02:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ ris ];
|
|
|
|
};
|
2017-11-09 12:26:09 +01:00
|
|
|
}
|