From 4906ff50a9751be2aed42c39b976d7c53aac66d4 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Tue, 16 Oct 2018 13:32:27 -0400 Subject: [PATCH] pythonPackages.django_1_8: refactor move to python-modules --- .../development/python-modules/django/1_8.nix | 31 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 24 +------------- 2 files changed, 32 insertions(+), 23 deletions(-) create mode 100644 pkgs/development/python-modules/django/1_8.nix diff --git a/pkgs/development/python-modules/django/1_8.nix b/pkgs/development/python-modules/django/1_8.nix new file mode 100644 index 000000000000..e87a9cbad027 --- /dev/null +++ b/pkgs/development/python-modules/django/1_8.nix @@ -0,0 +1,31 @@ +{ stdenv +, buildPythonPackage +, fetchurl +, pythonOlder +}: + +buildPythonPackage rec { + name = "Django-${version}"; + version = "1.8.18"; + disabled = pythonOlder "2.7"; + + src = fetchurl { + url = "http://www.djangoproject.com/m/releases/1.8/${name}.tar.gz"; + sha256 = "1ishvbihr9pain0486qafb18dnb7v2ppq34nnx1s8f95bvfiqqf7"; + }; + + # too complicated to setup + doCheck = false; + + # patch only $out/bin to avoid problems with starter templates (see #3134) + postFixup = '' + wrapPythonProgramsIn $out/bin "$out $pythonPath" + ''; + + meta = with stdenv.lib; { + description = "A high-level Python Web framework"; + homepage = https://www.djangoproject.com/; + license = licenses.bsd0; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ca104f8f686f..41e40486e157 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2235,29 +2235,7 @@ in { gdal = self.gdal; }; - django_1_8 = buildPythonPackage rec { - name = "Django-${version}"; - version = "1.8.18"; - disabled = pythonOlder "2.7"; - - src = pkgs.fetchurl { - url = "http://www.djangoproject.com/m/releases/1.8/${name}.tar.gz"; - sha256 = "1ishvbihr9pain0486qafb18dnb7v2ppq34nnx1s8f95bvfiqqf7"; - }; - - # too complicated to setup - doCheck = false; - - # patch only $out/bin to avoid problems with starter templates (see #3134) - postFixup = '' - wrapPythonProgramsIn $out/bin "$out $pythonPath" - ''; - - meta = { - description = "A high-level Python Web framework"; - homepage = https://www.djangoproject.com/; - }; - }; + django_1_8 = callPackage ../development/python-modules/django/1_8.nix { }; django-allauth = callPackage ../development/python-modules/django-allauth { };