2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
marshmallow,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonAtLeast,
|
|
|
|
pythonOlder,
|
|
|
|
typeguard,
|
|
|
|
typing-inspect,
|
2021-09-26 12:46:18 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "marshmallow-dataclass";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "8.6.1";
|
2021-09-26 12:46:18 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2021-09-26 12:46:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lovasoa";
|
|
|
|
repo = "marshmallow_dataclass";
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-IHHYYtQrdSAtZxbd/YV9J+c4B23HLr9gr01OE6Tgj94=";
|
2021-09-26 12:46:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
marshmallow
|
|
|
|
typing-inspect
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-09-26 12:46:18 +00:00
|
|
|
pytestCheckHook
|
|
|
|
typeguard
|
|
|
|
];
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
# DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12.
|
|
|
|
"-W"
|
|
|
|
"ignore::DeprecationWarning"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = lib.optionals (pythonAtLeast "3.10") [
|
|
|
|
# TypeError: UserId is not a dataclass and cannot be turned into one.
|
|
|
|
"test_newtype"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "marshmallow_dataclass" ];
|
2021-09-26 12:46:18 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Automatic generation of marshmallow schemas from dataclasses";
|
|
|
|
homepage = "https://github.com/lovasoa/marshmallow_dataclass";
|
2023-01-20 10:41:00 +00:00
|
|
|
changelog = "https://github.com/lovasoa/marshmallow_dataclass/blob/v${version}/CHANGELOG.md";
|
2021-09-26 12:46:18 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|