From ed4bf383a8bf228cf988fee331db0056aa63ae2d Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sat, 19 Jan 2019 15:45:30 +0000 Subject: [PATCH] pythonPackages.django_hijack_admin: tweak checkPhase to ensure tests are running against installed package, not source directory --- .../python-modules/django-hijack-admin/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/django-hijack-admin/default.nix b/pkgs/development/python-modules/django-hijack-admin/default.nix index aa84a0e7b83..005d61acab9 100644 --- a/pkgs/development/python-modules/django-hijack-admin/default.nix +++ b/pkgs/development/python-modules/django-hijack-admin/default.nix @@ -17,13 +17,21 @@ buildPythonPackage rec { 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 + mv ../runtests.py . ${python.interpreter} runtests.py hijack_admin + popd + runHook postCheck ''; meta = with stdenv.lib; { description = "Admin integration for django-hijack"; - homepage = https://github.com/arteria/django-hijack; + homepage = https://github.com/arteria/django-hijack-admin; license = licenses.mit; maintainers = with maintainers; [ lsix ]; };