2017-05-28 12:24:02 +01:00
|
|
|
{ stdenv, buildPythonPackage, fetchFromGitHub, python,
|
|
|
|
django, django_compat, django_nose
|
|
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
2017-11-09 11:26:09 +00:00
|
|
|
pname = "django-hijack";
|
2017-12-08 11:20:00 +00:00
|
|
|
version = "2.1.5";
|
2017-11-09 11:26:09 +00:00
|
|
|
name = pname + "-" + version;
|
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}";
|
2017-12-08 11:20:00 +00:00
|
|
|
sha256 = "1paiyxhc034336xcd9yzf3azpsapsv26j7w2baxiby71z2hhg0sj";
|
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
|
|
|
|
cp ../runtests.py .
|
|
|
|
${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";
|
|
|
|
homepage = https://github.com/arteria/django-hijack;
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ ris ];
|
|
|
|
};
|
2017-11-09 11:26:09 +00:00
|
|
|
}
|