summary refs log tree commit diff
path: root/pkgs/development/python-modules/django-model-utils/default.nix
blob: dc2bd2fbc34fa68f27db09f7cc439515506488d9 (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
46
47
48
49
50
51
52
53
{ lib
, buildPythonPackage
, fetchFromGitHub
, django
, freezegun
, psycopg2
, pytest-django
, pytestCheckHook
, pythonOlder
, setuptools-scm
}:

buildPythonPackage rec {
  pname = "django-model-utils";
  version = "4.2.0";
  disabled = pythonOlder "3.6";

  src = fetchFromGitHub {
    owner = "jazzband";
    repo = "django-model-utils";
    rev = version;
    sha256 = "sha256-TLqvpP/ZaGGFdqnN+UHbhXv1K1YVYTYBkCiWCjYrFh8=";
  };

  SETUPTOOLS_SCM_PRETEND_VERSION = version;

  nativeBuildInputs = [
    setuptools-scm
  ];

  propagatedBuildInputs = [
    django
  ];

  # requires postgres database
  doCheck = false;

  checkInputs = [
    freezegun
    psycopg2
    pytest-django
    pytestCheckHook
  ];

  pythonImportsCheck = [ "model_utils" ];

  meta = with lib; {
    homepage = "https://github.com/jazzband/django-model-utils";
    description = "Django model mixins and utilities";
    license = licenses.bsd3;
    maintainers = with maintainers; [ SuperSandro2000 ];
  };
}