From 90859b17c68db2c4d995407f1895466371e8916a Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Tue, 16 Oct 2018 13:47:51 -0400 Subject: [PATCH] pythonPakcages.django_modelcluster: refactor move to python-modules --- .../django_modelcluster/default.nix | 28 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 21 +------------- 2 files changed, 29 insertions(+), 20 deletions(-) create mode 100644 pkgs/development/python-modules/django_modelcluster/default.nix diff --git a/pkgs/development/python-modules/django_modelcluster/default.nix b/pkgs/development/python-modules/django_modelcluster/default.nix new file mode 100644 index 000000000000..3a2aad16ba5f --- /dev/null +++ b/pkgs/development/python-modules/django_modelcluster/default.nix @@ -0,0 +1,28 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, pytz +, six +}: + +buildPythonPackage rec { + pname = "django-modelcluster"; + version = "0.6.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "1plsdi44dvsj2sfx79lsrccjfg0ymajcsf5n0mln4cwd4qi5mwpx"; + }; + + doCheck = false; + + propagatedBuildInputs = [ pytz six ]; + + meta = with stdenv.lib; { + description = "Django extension to allow working with 'clusters' of models as a single unit, independently of the database"; + homepage = https://github.com/torchbox/django-modelcluster/; + license = licenses.bsd2; + maintainers = with maintainers; [ desiderius ]; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1b6170b6e4f0..e0a5a8c4303c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2300,26 +2300,7 @@ in { django_nose = callPackage ../development/python-modules/django_nose { }; - django_modelcluster = buildPythonPackage rec { - name = "django-modelcluster-${version}"; - version = "0.6.2"; - - src = pkgs.fetchurl { - url = "mirror://pypi/d/django-modelcluster/django-modelcluster-${version}.tar.gz"; - sha256 = "1plsdi44dvsj2sfx79lsrccjfg0ymajcsf5n0mln4cwd4qi5mwpx"; - }; - - doCheck = false; - - propagatedBuildInputs = with self; [ pytz six ]; - - meta = { - description = "Django extension to allow working with 'clusters' of models as a single unit, independently of the database"; - homepage = https://github.com/torchbox/django-modelcluster/; - license = licenses.bsd2; - maintainers = with maintainers; [ desiderius ]; - }; - }; + django_modelcluster = callPackage ../development/python-modules/django_modelcluster { }; djangorestframework = callPackage ../development/python-modules/djangorestframework { };