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
|
2024-01-25 14:12:00 +00:00
|
|
|
, setuptools
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "marshmallow-polyfield";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "5.11";
|
|
|
|
pyproject = true;
|
2021-09-26 12:46:18 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Bachmann1234";
|
2024-01-25 14:12:00 +00:00
|
|
|
repo = "marshmallow-polyfield";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-jbpeyih2Ccw1Rk+QcXRO9AfN5B/DhZmxa/M6FzXHqqs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "--cov=marshmallow_polyfield" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
marshmallow
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-09-26 12:46:18 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
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
|
|
|
}
|