summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/django-tree-queries/default.nix
blob: 6484ff054d24e30824439534e18045289d792381 (plain)
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
46
47
48
49
50
51
52
53
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  hatchling,
  django,
  pytest-django,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "django-tree-queries";
  version = "0.19";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "feincms";
    repo = "django-tree-queries";
    tag = version;
    hash = "sha256-0RSmwgyXaLCp2GcUZ0l7zkyofd5qemd/er+7KfGsoGM=";
  };

  build-system = [
    hatchling
  ];

  nativeCheckInputs = [
    django
    pytest-django
    pytestCheckHook
  ];

  preCheck = ''
    pushd tests
    export DJANGO_SETTINGS_MODULE=testapp.settings
  '';

  postCheck = ''
    popd
  '';

  pythonImportsCheck = [
    "tree_queries"
  ];

  meta = {
    description = "Adjacency-list trees for Django using recursive common table expressions. Supports PostgreSQL, sqlite, MySQL and MariaDB";
    homepage = "https://github.com/feincms/django-tree-queries";
    changelog = "https://github.com/feincms/django-tree-queries/blob/${src.tag}/CHANGELOG.rst";
    license = lib.licenses.bsd3;
    maintainers = [ ];
  };
}