about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/django-filter/default.nix
blob: 9cfb6493e577c7a415f1ea1dda27aa87982ee4a0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{ lib
, buildPythonPackage
, fetchPypi
, flit-core
, django
, djangorestframework
, pytestCheckHook
, pytest-django
, python
}:

buildPythonPackage rec {
  pname = "django-filter";
  version = "23.4";
  format = "pyproject";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-vtBws4NZ3OfS2+BXsWXVl3MFeYY1bLgJ3tmDs2x3qXY=";
  };

  nativeBuildInputs = [ flit-core ];

  propagatedBuildInputs = [ django ];

  pythonImportsCheck = [
    "django_filters"
  ];

  nativeCheckInputs = [
    djangorestframework
    pytestCheckHook
    pytest-django
  ];

  env.DJANGO_SETTINGS_MODULE = "tests.settings";

  meta = with lib; {
    description = "Reusable Django application for allowing users to filter querysets dynamically";
    homepage = "https://github.com/carltongibson/django-filter";
    changelog = "https://github.com/carltongibson/django-filter/blob/v${version}/CHANGES.rst";
    license = licenses.bsd3;
    maintainers = with maintainers; [ mmai ];
  };
}