From 90ef69cae942841c757390d5f0ab5c35b711c632 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 13 Oct 2021 20:16:17 +0200 Subject: [PATCH 1/2] hyperkitty: unstable-2021-10-08 -> 1.3.5 One dependency per line, some sorting, clean out some unused dependencies. --- pkgs/servers/mail/mailman/hyperkitty.nix | 70 +++++++++++++++++++----- 1 file changed, 56 insertions(+), 14 deletions(-) diff --git a/pkgs/servers/mail/mailman/hyperkitty.nix b/pkgs/servers/mail/mailman/hyperkitty.nix index a2f9ecd9fb0d..425f327f1fad 100644 --- a/pkgs/servers/mail/mailman/hyperkitty.nix +++ b/pkgs/servers/mail/mailman/hyperkitty.nix @@ -1,8 +1,31 @@ -{ lib, buildPythonPackage, fetchFromGitLab, isPy3k, isort, coverage, mock -, robot-detection, django_extensions, rjsmin, cssmin, django-mailman3 -, django-haystack, flufl_lock, mistune_2_0, networkx, python-dateutil, defusedxml -, django-paintstore, djangorestframework, django, django-q -, django_compressor, beautifulsoup4, six, psycopg2, whoosh, elasticsearch +{ lib +, buildPythonPackage +, fetchFromGitLab +, isPy3k + +# dependencies +, defusedxml +, django +, django-gravatar2 +, django-haystack +, django-mailman3 +, django-paintstore +, django-q +, django_compressor +, django_extensions +, djangorestframework +, flufl_lock +, mistune_2_0 +, networkx +, psycopg2 +, python-dateutil +, robot-detection + +# tests +, beautifulsoup4 +, elasticsearch +, mock +, whoosh }: buildPythonPackage rec { @@ -12,30 +35,49 @@ buildPythonPackage rec { # # Update to next stable version > 1.3.4 that has fixed tests, see # https://gitlab.com/mailman/django-mailman3/-/issues/48 - version = "unstable-2021-10-08"; + version = "1.3.5"; disabled = !isPy3k; src = fetchFromGitLab { domain = "gitlab.com"; owner = "mailman"; repo = "hyperkitty"; - rev = "ec9c8ed18798cf8f7e89dfaba0014dcdfa207f27"; - sha256 = "12kxb6pra31f51yxzx010jk2wlacdsbyf6fbl1cczjgxgb4cpy4i"; + rev = version; + sha256 = "0v70r0r6w0q56hk2hw1qp3ci0bwd9x8inf4gai6ybjqjfskqrxi4"; }; - nativeBuildInputs = [ isort ]; + postPatch = '' + # isort is a development dependency + sed -i '/isort/d' setup.py + ''; + propagatedBuildInputs = [ - robot-detection django_extensions rjsmin cssmin django-mailman3 - django-haystack flufl_lock mistune_2_0 networkx python-dateutil defusedxml - django-paintstore djangorestframework django django-q - django_compressor six psycopg2 isort + django + django-gravatar2 + django-haystack + django-mailman3 + django-q + django_compressor + django_extensions + djangorestframework + flufl_lock + mistune_2_0 + networkx + psycopg2 + python-dateutil + robot-detection ]; # Some of these are optional runtime dependencies that are not # listed as dependencies in setup.py. To use these, they should be # dependencies of the Django Python environment, but not of # HyperKitty so they're not included for people who don't need them. - checkInputs = [ beautifulsoup4 coverage elasticsearch mock whoosh ]; + checkInputs = [ + beautifulsoup4 + elasticsearch + mock + whoosh + ]; checkPhase = '' cd $NIX_BUILD_TOP/$sourceRoot From 808299482a9343767944b5e7504d1099e1553031 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 13 Oct 2021 21:52:23 +0200 Subject: [PATCH 2/2] python3Packages.django-haystack: cleanup, enable tests --- .../django-haystack/default.nix | 52 +++++++++++++++---- 1 file changed, 41 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/django-haystack/default.nix b/pkgs/development/python-modules/django-haystack/default.nix index c207a37ebf15..0f0f4a0a1174 100644 --- a/pkgs/development/python-modules/django-haystack/default.nix +++ b/pkgs/development/python-modules/django-haystack/default.nix @@ -1,30 +1,60 @@ -{ lib, buildPythonPackage, fetchPypi -, setuptools, setuptools-scm, django, python-dateutil, whoosh, pysolr -, coverage, mock, nose, geopy, requests }: +{ lib +, buildPythonPackage +, pythonOlder +, fetchPypi + +# build dependencies +, setuptools-scm + +# dependencies +, django + +# tests +, geopy +, nose +, pysolr +, python-dateutil +, requests +, whoosh +}: buildPythonPackage rec { pname = "django-haystack"; version = "3.1.1"; + format = "setuptools"; + disabled = pythonOlder "3.5"; src = fetchPypi { inherit pname version; sha256 = "6d05756b95d7d5ec1dbd4668eb999ced1504b47f588e2e54be53b1404c516a82"; }; - checkInputs = [ pysolr whoosh python-dateutil geopy coverage nose mock coverage requests ]; - propagatedBuildInputs = [ django setuptools ]; - nativeBuildInputs = [ setuptools-scm ]; - postPatch = '' - sed -i 's/geopy==/geopy>=/' setup.py + substituteInPlace setup.py \ + --replace "geopy==" "geopy>=" ''; - # ImportError: cannot import name django.contrib.gis.geos.prototypes - doCheck = false; + nativeBuildInputs = [ + setuptools-scm + ]; + + propagatedBuildInputs = [ + django + ]; + + checkInputs = [ + geopy + nose + pysolr + python-dateutil + requests + whoosh + ]; meta = with lib; { - description = "Modular search for Django"; + description = "Pluggable search for Django"; homepage = "http://haystacksearch.org/"; license = licenses.bsd3; + maintainers = with maintainers; [ ]; }; }