···11+{ stdenv, buildPythonPackage, fetchFromGitHub, python,22+ django, django_compat, django_nose33+}:44+buildPythonPackage rec {55+ name = "django-hijack-${version}";66+ version = "2.1.4";77+88+ # the pypi packages don't include everything required for the tests99+ src = fetchFromGitHub {1010+ owner = "arteria";1111+ repo = "django-hijack";1212+ rev = "v${version}";1313+ sha256 = "1wbm6l8mzpkj4wsj4fyfamzpzi3day2v1cva5j89v4dn4403jq21";1414+ };1515+1616+ checkInputs = [ django_nose ];1717+ propagatedBuildInputs = [ django django_compat ];1818+1919+ checkPhase = ''2020+ runHook preCheck2121+2222+ # we have to do a little bit of tinkering to convince the tests to run against the installed package, not the2323+ # source directory2424+ mkdir testbase2525+ pushd testbase2626+ cp ../runtests.py .2727+ ${python.interpreter} runtests.py hijack2828+ popd2929+3030+ runHook postCheck3131+ '';3232+3333+ meta = with stdenv.lib; {3434+ description = "Allows superusers to hijack (=login as) and work on behalf of another user";3535+ homepage = https://github.com/arteria/django-hijack;3636+ license = licenses.mit;3737+ maintainers = with maintainers; [ ris ];3838+ };3939+}
+2-18
pkgs/top-level/python-packages.nix
···1019510195 };1019610196 };10197101971019810198- # This package likely needs an older version of Django.1019810198+ # This package may need an older version of Django.1019910199 # Override the package set and set e.g. `django = super.django_1_9`.1020010200 # See the Nixpkgs manual for examples on how to override the package set.1020110201- django_hijack = buildPythonPackage rec {1020210202- name = "django-hijack-${version}";1020310203- version = "2.0.7";1020410204-1020510205- src = pkgs.fetchurl {1020610206- url = "mirror://pypi/d/django-hijack/${name}.tar.gz";1020710207- sha256 = "0rpi1bkfx74xfbb2nk874kfdra1jcqp2vzky1r3z7zidlc9kah04";1020810208- };1020910209-1021010210- propagatedBuildInputs = with self; [ django django_compat ];1021110211-1021210212- meta = {1021310213- description = "Allows superusers to hijack (=login as) and work on behalf of another user";1021410214- homepage = https://github.com/arteria/django-hijack;1021510215- license = licenses.mit;1021610216- };1021710217- };1020110201+ django_hijack = callPackage ../development/python-modules/django-hijack { };10218102021021910203 django_nose = buildPythonPackage rec {1022010204 name = "django-nose-${version}";