472aeafc57
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
60 lines
1.3 KiB
Nix
60 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
ciso8601,
|
|
fetchFromGitHub,
|
|
msgpack,
|
|
orjson,
|
|
pendulum,
|
|
pytest-mock,
|
|
pytestCheckHook,
|
|
pythonOlder,
|
|
pyyaml,
|
|
setuptools,
|
|
tomli,
|
|
tomli-w,
|
|
typing-extensions,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "mashumaro";
|
|
version = "3.13.1";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Fatal1ty";
|
|
repo = "mashumaro";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-Km3RuDU77L3N2RQBhpcEztOjYtQhTXFZoGKu70g5EPU=";
|
|
};
|
|
|
|
nativeBuildInputs = [ setuptools ];
|
|
|
|
propagatedBuildInputs = [ typing-extensions ];
|
|
|
|
optional-dependencies = {
|
|
orjson = [ orjson ];
|
|
msgpack = [ msgpack ];
|
|
yaml = [ pyyaml ];
|
|
toml = [ tomli-w ] ++ lib.optionals (pythonOlder "3.11") [ tomli ];
|
|
};
|
|
|
|
nativeCheckInputs = [
|
|
ciso8601
|
|
pendulum
|
|
pytest-mock
|
|
pytestCheckHook
|
|
] ++ lib.flatten (lib.attrValues optional-dependencies);
|
|
|
|
pythonImportsCheck = [ "mashumaro" ];
|
|
|
|
meta = with lib; {
|
|
description = "Serialization library on top of dataclasses";
|
|
homepage = "https://github.com/Fatal1ty/mashumaro";
|
|
changelog = "https://github.com/Fatal1ty/mashumaro/releases/tag/v${version}";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ tjni ];
|
|
};
|
|
}
|