about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/model-bakery/default.nix
blob: 005efb6c686d37f4d8c85404d1dc24e15c8c9ffc (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
{ lib
, buildPythonPackage
, fetchFromGitHub
, hatchling
, django
, pytestCheckHook
, pythonOlder
, pytest-django
}:

buildPythonPackage rec {
  pname = "model-bakery";
  version = "1.14.0";
  format = "pyproject";

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "model-bakers";
    repo = "model_bakery";
    rev = "refs/tags/${version}";
    hash = "sha256-eiCbx15lY8H+xS2HhDCpsqwsuZGxou8aHgaktd/+65U=";
  };

  nativeBuildInputs = [
    hatchling
  ];

  propagatedBuildInputs = [
    django
  ];

  nativeCheckInputs = [
    pytest-django
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "model_bakery"
  ];

  meta = with lib; {
    description = "Object factory for Django";
    homepage = "https://github.com/model-bakers/model_bakery";
    changelog = "https://github.com/model-bakers/model_bakery/blob/${version}/CHANGELOG.md";
    license = licenses.asl20;
    maintainers = with maintainers; [ fab ];
  };
}