Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / python-box / default.nix
blob3145debc745c411a8369977bddf5e41311349cc7
1 { lib
2 , buildPythonPackage
3 , cython_3
4 , fetchFromGitHub
5 , msgpack
6 , poetry-core
7 , pytestCheckHook
8 , pythonOlder
9 , pyyaml
10 , ruamel-yaml
11 , setuptools
12 , toml
13 , tomli
14 , tomli-w
17 buildPythonPackage rec {
18   pname = "python-box";
19   version = "7.1.1";
20   format = "setuptools";
22   disabled = pythonOlder "3.8";
24   src = fetchFromGitHub {
25     owner = "cdgriffith";
26     repo = "Box";
27     rev = "refs/tags/${version}";
28     hash = "sha256-oxT2y3um6BZ3bwYa+LWBoTgU+9b+V7XtQdCdECU3Gu0=";
29   };
31   nativeBuildInputs = [
32     cython_3
33     setuptools
34   ];
36   passthru.optional-dependencies = {
37     all = [
38       msgpack
39       ruamel-yaml
40       toml
41     ];
42     yaml = [
43       ruamel-yaml
44     ];
45     ruamel-yaml = [
46       ruamel-yaml
47     ];
48     PyYAML = [
49       pyyaml
50     ];
51     tomli = [
52       tomli-w
53     ] ++ lib.optionals (pythonOlder "3.11") [
54       tomli
55     ];
56     toml = [
57       toml
58     ];
59     msgpack = [
60       msgpack
61     ];
62   };
64   nativeCheckInputs = [
65     pytestCheckHook
66   ] ++ passthru.optional-dependencies.all;
68   pythonImportsCheck = [
69     "box"
70   ];
72   meta = with lib; {
73     description = "Python dictionaries with advanced dot notation access";
74     homepage = "https://github.com/cdgriffith/Box";
75     changelog = "https://github.com/cdgriffith/Box/blob/${version}/CHANGES.rst";
76     license = with licenses; [ mit ];
77     maintainers = with maintainers; [ fab ];
78   };