From 9c573f5379b1bf449d0aca58aa7ed4d071dd621e Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Tue, 16 Oct 2018 13:43:42 -0400 Subject: [PATCH] pythonPackages.django_classtags: refactor move to python-modules --- .../django_classytags/default.nix | 27 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 21 +-------------- 2 files changed, 28 insertions(+), 20 deletions(-) create mode 100644 pkgs/development/python-modules/django_classytags/default.nix diff --git a/pkgs/development/python-modules/django_classytags/default.nix b/pkgs/development/python-modules/django_classytags/default.nix new file mode 100644 index 000000000000..022709bacbe0 --- /dev/null +++ b/pkgs/development/python-modules/django_classytags/default.nix @@ -0,0 +1,27 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, django +}: + +buildPythonPackage rec { + pname = "django-classy-tags"; + version = "0.6.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "0wxvpmjdzk0aajk33y4himn3wqjx7k0aqlka9j8ay3yfav78bdq0"; + }; + + propagatedBuildInputs = [ django ]; + + # tests appear to be broken on 0.6.1 at least + doCheck = ( version != "0.6.1" ); + + meta = with stdenv.lib; { + description = "Class based template tags for Django"; + homepage = https://github.com/ojii/django-classy-tags; + license = licenses.bsd3; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3b3841afa882..fd557a6ba50f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2289,26 +2289,7 @@ in { propagatedBuildInputs = with self; [ django ]; }); - django_classytags = buildPythonPackage rec { - name = "django-classy-tags-${version}"; - version = "0.6.1"; - - src = pkgs.fetchurl { - url = "mirror://pypi/d/django-classy-tags/${name}.tar.gz"; - sha256 = "0wxvpmjdzk0aajk33y4himn3wqjx7k0aqlka9j8ay3yfav78bdq0"; - }; - - propagatedBuildInputs = with self; [ django ]; - - # tests appear to be broken on 0.6.1 at least - doCheck = ( version != "0.6.1" ); - - meta = { - description = "Class based template tags for Django"; - homepage = https://github.com/ojii/django-classy-tags; - license = licenses.bsd3; - }; - }; + django_classytags = callPackage ../development/python-modules/django_classytags { }; # This package may need an older version of Django. # Override the package set and set e.g. `django = super.django_1_9`.