1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 marshmallow,
6 pythonOlder,
7 pytestCheckHook,
8 setuptools,
9}:
10
11buildPythonPackage rec {
12 pname = "marshmallow-polyfield";
13 version = "5.11";
14 pyproject = true;
15
16 disabled = pythonOlder "3.6";
17
18 src = fetchFromGitHub {
19 owner = "Bachmann1234";
20 repo = "marshmallow-polyfield";
21 rev = "refs/tags/v${version}";
22 hash = "sha256-jbpeyih2Ccw1Rk+QcXRO9AfN5B/DhZmxa/M6FzXHqqs=";
23 };
24
25 postPatch = ''
26 substituteInPlace setup.cfg \
27 --replace "--cov=marshmallow_polyfield" ""
28 '';
29
30 nativeBuildInputs = [ setuptools ];
31
32 propagatedBuildInputs = [ marshmallow ];
33
34 nativeCheckInputs = [ pytestCheckHook ];
35
36 pythonImportsCheck = [ "marshmallow" ];
37
38 meta = with lib; {
39 description = "Extension to Marshmallow to allow for polymorphic fields";
40 homepage = "https://github.com/Bachmann1234/marshmallow-polyfield";
41 license = licenses.asl20;
42 maintainers = with maintainers; [ drewrisinger ];
43 };
44}