depot/third_party/nixpkgs/pkgs/development/python-modules/django-ipware/default.nix
Default email 60f07311b9 Project import generated by Copybara.
GitOrigin-RevId: f8e2ebd66d097614d51a56a755450d4ae1632df1
2024-02-06 17:22:34 -08:00

35 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
, django
, pythonOlder
}:
buildPythonPackage rec {
pname = "django-ipware";
version = "6.0.4";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-YU0PCpEfinZeVbbTWLFxW7he62PR67d0R9CdZF8TQ+g=";
};
propagatedBuildInputs = [ django ];
# django.core.exceptions.ImproperlyConfigured: Requested setting IPWARE_TRUSTED_PROXY_LIST, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
doCheck = false;
# pythonImportsCheck fails with:
# django.core.exceptions.ImproperlyConfigured: Requested setting IPWARE_META_PRECEDENCE_ORDER, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
meta = with lib; {
description = "A Django application to retrieve user's IP address";
homepage = "https://github.com/un33k/django-ipware";
changelog = "https://github.com/un33k/django-ipware/blob/v${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}