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