From 9059ba30824b6e0c3a122c5721a977f082d937c1 Mon Sep 17 00:00:00 2001 From: Janik H Date: Mon, 5 Jun 2023 18:06:12 +0200 Subject: [PATCH 1/2] python3Packages.django-leaflet: init at 0.29.0 --- .../python-modules/django-leaflet/default.nix | 38 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 40 insertions(+) create mode 100644 pkgs/development/python-modules/django-leaflet/default.nix diff --git a/pkgs/development/python-modules/django-leaflet/default.nix b/pkgs/development/python-modules/django-leaflet/default.nix new file mode 100644 index 000000000000..59c56b2b0a50 --- /dev/null +++ b/pkgs/development/python-modules/django-leaflet/default.nix @@ -0,0 +1,38 @@ +{ pkgs +, buildPythonPackage +, django +, fetchPypi +, pythonOlder +}: + +buildPythonPackage rec { + pname = "django-leaflet"; + version = "0.29.0"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-L23Ixxh/0i5itvK3tC7thpIPgb7DEqplSYHr5byOCGY="; + }; + + propagatedBuildInputs = [ + django + ]; + + # The tests seem to be impure. + # They are throwing a error about unset configs: + # > django.core.exceptions.ImproperlyConfigured: Requested setting LEAFLET_CONFIG, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. + doCheck = false; + + # This dosn't work either because of the same exception as above + # pythonImportsCheck = [ "leaflet" ]; + + meta = with pkgs.lib; { + description = "Allows you to use Leaflet in your Django projects"; + homepage = "https://github.com/makinacorpus/django-leaflet"; + license = licenses.lgpl3Only; + maintainers = with maintainers; [ janik ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3d9f828e8366..debb0125d63b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2741,6 +2741,8 @@ self: super: with self; { django-libsass = callPackage ../development/python-modules/django-libsass { }; + django-leaflet = callPackage ../development/python-modules/django-leaflet { }; + django-logentry-admin = callPackage ../development/python-modules/django-logentry-admin { }; django-login-required-middleware = callPackage ../development/python-modules/django-login-required-middleware { }; From 7d5ddf8b1d1215502bcc6b56fdd42f2351f19e3f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 18 Jun 2023 09:43:28 +0200 Subject: [PATCH 2/2] python3Packages.django-leaflet: add changelog to meta --- pkgs/development/python-modules/django-leaflet/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/django-leaflet/default.nix b/pkgs/development/python-modules/django-leaflet/default.nix index 59c56b2b0a50..7ea1ba4a58d9 100644 --- a/pkgs/development/python-modules/django-leaflet/default.nix +++ b/pkgs/development/python-modules/django-leaflet/default.nix @@ -23,7 +23,7 @@ buildPythonPackage rec { # The tests seem to be impure. # They are throwing a error about unset configs: - # > django.core.exceptions.ImproperlyConfigured: Requested setting LEAFLET_CONFIG, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. + # > django.core.exceptions.ImproperlyConfigured: Requested setting LEAFLET_CONFIG, but settings are not configured. doCheck = false; # This dosn't work either because of the same exception as above @@ -32,6 +32,7 @@ buildPythonPackage rec { meta = with pkgs.lib; { description = "Allows you to use Leaflet in your Django projects"; homepage = "https://github.com/makinacorpus/django-leaflet"; + changelog = "https://github.com/makinacorpus/django-leaflet/blob/${version}/CHANGES"; license = licenses.lgpl3Only; maintainers = with maintainers; [ janik ]; };