about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/marshmallow-polyfield/default.nix
blob: d54b070fbf14e923205758aa0e90f515245557e0 (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
, fetchFromGitHub
, marshmallow
, pythonOlder
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "marshmallow-polyfield";
  version = "5.10";

  disabled = pythonOlder "3.6";

  src = fetchFromGitHub {
    owner = "Bachmann1234";
    repo = pname;
    rev = "v${version}";
    hash = "sha256-oF5LBuDK4kqsAcKwidju+wFjigjy4CNbJ6bfWpGO1yQ=";
  };

  propagatedBuildInputs = [
    marshmallow
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  postPatch = ''
    substituteInPlace setup.cfg \
      --replace "--cov=marshmallow_polyfield" ""
  '';

  pythonImportsCheck = [
    "marshmallow"
  ];

  meta = with lib; {
    description = "Extension to Marshmallow to allow for polymorphic fields";
    homepage = "https://github.com/Bachmann1234/marshmallow-polyfield";
    license = licenses.asl20;
    maintainers = with maintainers; [ drewrisinger ];
  };
}