2021-01-25 08:26:54 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, python,
|
2017-12-08 11:20:31 +00:00
|
|
|
django_hijack, django_nose }:
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-hijack-admin";
|
2019-01-19 15:06:27 +00:00
|
|
|
version = "2.1.10";
|
2017-12-08 11:20:31 +00:00
|
|
|
|
|
|
|
# the pypi packages don't include everything required for the tests
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "arteria";
|
|
|
|
repo = "django-hijack-admin";
|
|
|
|
rev = "v${version}";
|
2019-01-19 15:06:27 +00:00
|
|
|
sha256 = "0m98lchp2y43886n67j4s7miyd50pg2r5r966vjnxmd7nx7qkihf";
|
2017-12-08 11:20:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [ django_nose ];
|
|
|
|
propagatedBuildInputs = [ django_hijack ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
2019-01-19 15:45:30 +00:00
|
|
|
|
|
|
|
# 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
|
|
|
|
mv ../runtests.py .
|
2017-12-08 11:20:31 +00:00
|
|
|
${python.interpreter} runtests.py hijack_admin
|
2019-01-19 15:45:30 +00:00
|
|
|
popd
|
|
|
|
|
2017-12-08 11:20:31 +00:00
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-12-08 11:20:31 +00:00
|
|
|
description = "Admin integration for django-hijack";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/arteria/django-hijack-admin";
|
2017-12-08 11:20:31 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ lsix ];
|
|
|
|
};
|
|
|
|
}
|