depot/third_party/nixpkgs/pkgs/development/python-modules/mashumaro/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +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";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "Fatal1ty";
repo = "mashumaro";
rev = "refs/tags/v${version}";
hash = "sha256-ETK1rHKlByQkqibejiZmXF6c4eIiMazLa8XY2OH30q4=";
};
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [ typing-extensions ];
passthru.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 passthru.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 ];
};
}