git.iko.soy/typeable/nixpkgs
on master help sign in
python.pkgs.django_hijack: 2.0.7 -> 2.1.4

also fix & enable tests, add self as maintainer

commitfa44b72d91625bcf5aee5438b10abdd0eb4e5acb authorRobert Scott <code@humanleg.org.uk> dateSun 28 May 2017, 12:24 (10 years ago) parentac8a58b
2 files changed+41−18
pkgs/development/python-modules/django-hijack/default.nix+39 pkgs/top-level/python-packages.nix+2−18
pkgs/development/python-modules/django-hijack/default.nixnew file+39
@@ -0,0 +1,39 @@
1+{ stdenv, buildPythonPackage, fetchFromGitHub, python,
2+ django, django_compat, django_nose
3+}:
4+buildPythonPackage rec {
5+ name = "django-hijack-${version}";
6+ version = "2.1.4";
7+
8+ # the pypi packages don't include everything required for the tests
9+ src = fetchFromGitHub {
10+ owner = "arteria";
11+ repo = "django-hijack";
12+ rev = "v${version}";
13+ sha256 = "1wbm6l8mzpkj4wsj4fyfamzpzi3day2v1cva5j89v4dn4403jq21";
14+ };
15+
16+ checkInputs = [ django_nose ];
17+ propagatedBuildInputs = [ django django_compat ];
18+
19+ checkPhase = ''
20+ runHook preCheck
21+
22+ # we have to do a little bit of tinkering to convince the tests to run against the installed package, not the
23+ # source directory
24+ mkdir testbase
25+ pushd testbase
26+ cp ../runtests.py .
27+ ${python.interpreter} runtests.py hijack
28+ popd
29+
30+ runHook postCheck
31+ '';
32+
33+ meta = with stdenv.lib; {
34+ description = "Allows superusers to hijack (=login as) and work on behalf of another user";
35+ homepage = https://github.com/arteria/django-hijack;
36+ license = licenses.mit;
37+ maintainers = with maintainers; [ ris ];
38+ };
39+}
pkgs/top-level/python-packages.nix+2−18
@@ -10195,26 +10195,10 @@ in {
1019510195 };
1019610196 };
1019710197
10198− # This package likely needs an older version of Django.
10198+ # 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.
10201− django_hijack = buildPythonPackage rec {
10202− name = "django-hijack-${version}";
10203− version = "2.0.7";
10204−
10205− src = pkgs.fetchurl {
10206− url = "mirror://pypi/d/django-hijack/${name}.tar.gz";
10207− sha256 = "0rpi1bkfx74xfbb2nk874kfdra1jcqp2vzky1r3z7zidlc9kah04";
10208− };
10209−
10210− propagatedBuildInputs = with self; [ django django_compat ];
10211−
10212− meta = {
10213− description = "Allows superusers to hijack (=login as) and work on behalf of another user";
10214− homepage = https://github.com/arteria/django-hijack;
10215− license = licenses.mit;
10216− };
10217− };
10201+ django_hijack = callPackage ../development/python-modules/django-hijack { };
1021810202
1021910203 django_nose = buildPythonPackage rec {
1022010204 name = "django-nose-${version}";