2021-09-26 12:46:18 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, marshmallow
|
2021-09-26 12:46:18 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "marshmallow-polyfield";
|
2021-09-26 12:46:18 +00:00
|
|
|
version = "5.10";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Bachmann1234";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-09-26 12:46:18 +00:00
|
|
|
sha256 = "sha256-oF5LBuDK4kqsAcKwidju+wFjigjy4CNbJ6bfWpGO1yQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
marshmallow
|
|
|
|
];
|
|
|
|
|
2021-09-26 12:46:18 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "--cov=marshmallow_polyfield" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"marshmallow"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-09-26 12:46:18 +00:00
|
|
|
description = "Extension to Marshmallow to allow for polymorphic fields";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/Bachmann1234/marshmallow-polyfield";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ drewrisinger ];
|
|
|
|
};
|
2020-09-25 04:45:31 +00:00
|
|
|
}
|