summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/marshmallow-dataclass/default.nix
blob: 1638fb33e17abcec37f9d2fb79b9845b1297d048 (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
54
55
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  marshmallow,
  pytestCheckHook,
  setuptools,
  typeguard,
  typing-inspect,
}:

buildPythonPackage rec {
  pname = "marshmallow-dataclass";
  version = "8.7.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "lovasoa";
    repo = "marshmallow_dataclass";
    tag = "v${version}";
    hash = "sha256-0OXP78oyNe/UcI05NHskPyXAuX3dwAW4Uz4dI4b8KV0=";
  };

  build-system = [ setuptools ];

  dependencies = [
    marshmallow
    typing-inspect
  ];

  nativeCheckInputs = [
    pytestCheckHook
    typeguard
  ];

  pytestFlags = [
    # DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12.
    "-Wignore::DeprecationWarning"
  ];

  disabledTests = [
    # TypeError: UserId is not a dataclass and cannot be turned into one.
    "test_newtype"
  ];

  pythonImportsCheck = [ "marshmallow_dataclass" ];

  meta = {
    description = "Automatic generation of marshmallow schemas from dataclasses";
    homepage = "https://github.com/lovasoa/marshmallow_dataclass";
    changelog = "https://github.com/lovasoa/marshmallow_dataclass/blob/v${version}/CHANGELOG.md";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ fab ];
  };
}