depot/third_party/nixpkgs/pkgs/development/python-modules/mashumaro/default.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

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 ];
};
}