Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / mashumaro / default.nix
blob6cfa517cc386a224b5eb8cbdb03d4432b90356f0
1 { lib
2 , buildPythonPackage
3 , ciso8601
4 , fetchFromGitHub
5 , msgpack
6 , orjson
7 , pendulum
8 , pytest-mock
9 , pytestCheckHook
10 , pythonOlder
11 , pyyaml
12 , setuptools
13 , tomli
14 , tomli-w
15 , typing-extensions
18 buildPythonPackage rec {
19   pname = "mashumaro";
20   version = "3.12";
21   pyproject = true;
23   disabled = pythonOlder "3.8";
25   src = fetchFromGitHub {
26     owner = "Fatal1ty";
27     repo = "mashumaro";
28     rev = "refs/tags/v${version}";
29     hash = "sha256-sSwj/8j+vPX7M8l2h4bPs8WnjzIN2WIpyd7/NcGaExg=";
30   };
32   nativeBuildInputs = [
33     setuptools
34   ];
36   propagatedBuildInputs = [
37     typing-extensions
38   ];
40   passthru.optional-dependencies = {
41     orjson = [
42       orjson
43     ];
44     msgpack = [
45       msgpack
46     ];
47     yaml = [
48       pyyaml
49     ];
50     toml = [
51       tomli-w
52     ] ++ lib.optionals (pythonOlder "3.11") [
53       tomli
54     ];
55   };
57   nativeCheckInputs = [
58     ciso8601
59     pendulum
60     pytest-mock
61     pytestCheckHook
62   ] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);
64   pythonImportsCheck = [
65     "mashumaro"
66   ];
68   meta = with lib; {
69     description = "Serialization library on top of dataclasses";
70     homepage = "https://github.com/Fatal1ty/mashumaro";
71     changelog = "https://github.com/Fatal1ty/mashumaro/releases/tag/v${version}";
72     license = licenses.asl20;
73     maintainers = with maintainers; [ tjni ];
74   };