2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2024-01-02 11:29:13 +00:00
|
|
|
, ciso8601
|
2023-07-15 17:15:38 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, msgpack
|
2024-01-02 11:29:13 +00:00
|
|
|
, orjson
|
2023-07-15 17:15:38 +00:00
|
|
|
, pendulum
|
|
|
|
, pytest-mock
|
2024-01-02 11:29:13 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, pyyaml
|
|
|
|
, setuptools
|
|
|
|
, tomli
|
|
|
|
, tomli-w
|
|
|
|
, typing-extensions
|
2023-07-15 17:15:38 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mashumaro";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "3.11";
|
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Fatal1ty";
|
2024-01-02 11:29:13 +00:00
|
|
|
repo = "mashumaro";
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-7gRbTNNK8elWsL0ub7c/EeswIk4xxJOxKVk8HmvWMZA=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
typing-extensions
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
2024-01-02 11:29:13 +00:00
|
|
|
orjson = [
|
|
|
|
orjson
|
|
|
|
];
|
|
|
|
msgpack = [
|
|
|
|
msgpack
|
|
|
|
];
|
|
|
|
yaml = [
|
|
|
|
pyyaml
|
|
|
|
];
|
|
|
|
toml = [
|
|
|
|
tomli-w
|
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
|
|
|
tomli
|
|
|
|
];
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
ciso8601
|
|
|
|
pendulum
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"mashumaro"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-01-02 11:29:13 +00:00
|
|
|
description = "Serialization library on top of dataclasses";
|
2023-07-15 17:15:38 +00:00
|
|
|
homepage = "https://github.com/Fatal1ty/mashumaro";
|
|
|
|
changelog = "https://github.com/Fatal1ty/mashumaro/releases/tag/v${version}";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ tjni ];
|
|
|
|
};
|
|
|
|
}
|