2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
marshmallow,
|
|
|
|
pythonOlder,
|
|
|
|
pytestCheckHook,
|
|
|
|
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" ""
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-01-25 14:12:00 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ marshmallow ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-09-26 12:46:18 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
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
|
|
|
}
|