1{ lib, buildPythonPackage, fetchFromGitHub, python,
2 django_hijack, django_nose }:
3buildPythonPackage rec {
4 pname = "django-hijack-admin";
5 version = "2.1.10";
6
7 # the pypi packages don't include everything required for the tests
8 src = fetchFromGitHub {
9 owner = "arteria";
10 repo = "django-hijack-admin";
11 rev = "v${version}";
12 sha256 = "0m98lchp2y43886n67j4s7miyd50pg2r5r966vjnxmd7nx7qkihf";
13 };
14
15 checkInputs = [ django_nose ];
16 propagatedBuildInputs = [ django_hijack ];
17
18 checkPhase = ''
19 runHook preCheck
20
21 # we have to do a little bit of tinkering to convince the tests to run against the installed package, not the
22 # source directory
23 mkdir testbase
24 pushd testbase
25 mv ../runtests.py .
26 ${python.interpreter} runtests.py hijack_admin
27 popd
28
29 runHook postCheck
30 '';
31
32 meta = with lib; {
33 description = "Admin integration for django-hijack";
34 homepage = "https://github.com/arteria/django-hijack-admin";
35 license = licenses.mit;
36 maintainers = with maintainers; [ lsix ];
37 };
38}