1{ 2 lib, 3 buildPythonPackage, 4 cython, 5 fetchFromGitHub, 6 msgpack, 7 poetry-core, 8 pytestCheckHook, 9 pythonOlder, 10 pyyaml, 11 ruamel-yaml, 12 setuptools, 13 toml, 14 tomli, 15 tomli-w, 16}: 17 18buildPythonPackage rec { 19 pname = "python-box"; 20 version = "7.1.1"; 21 format = "setuptools"; 22 23 disabled = pythonOlder "3.8"; 24 25 src = fetchFromGitHub { 26 owner = "cdgriffith"; 27 repo = "Box"; 28 rev = "refs/tags/${version}"; 29 hash = "sha256-oxT2y3um6BZ3bwYa+LWBoTgU+9b+V7XtQdCdECU3Gu0="; 30 }; 31 32 nativeBuildInputs = [ 33 cython 34 setuptools 35 ]; 36 37 passthru.optional-dependencies = { 38 all = [ 39 msgpack 40 ruamel-yaml 41 toml 42 ]; 43 yaml = [ ruamel-yaml ]; 44 ruamel-yaml = [ ruamel-yaml ]; 45 PyYAML = [ pyyaml ]; 46 tomli = [ tomli-w ] ++ lib.optionals (pythonOlder "3.11") [ tomli ]; 47 toml = [ toml ]; 48 msgpack = [ msgpack ]; 49 }; 50 51 nativeCheckInputs = [ pytestCheckHook ] ++ passthru.optional-dependencies.all; 52 53 pythonImportsCheck = [ "box" ]; 54 55 meta = with lib; { 56 description = "Python dictionaries with advanced dot notation access"; 57 homepage = "https://github.com/cdgriffith/Box"; 58 changelog = "https://github.com/cdgriffith/Box/blob/${version}/CHANGES.rst"; 59 license = with licenses; [ mit ]; 60 maintainers = with maintainers; [ fab ]; 61 }; 62}