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 15}: 16 17buildPythonPackage rec { 18 pname = "python-box"; 19 version = "7.1.1"; 20 format = "setuptools"; 21 22 disabled = pythonOlder "3.8"; 23 24 src = fetchFromGitHub { 25 owner = "cdgriffith"; 26 repo = "Box"; 27 rev = "refs/tags/${version}"; 28 hash = "sha256-oxT2y3um6BZ3bwYa+LWBoTgU+9b+V7XtQdCdECU3Gu0="; 29 }; 30 31 nativeBuildInputs = [ 32 cython_3 33 setuptools 34 ]; 35 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 }; 63 64 nativeCheckInputs = [ 65 pytestCheckHook 66 ] ++ passthru.optional-dependencies.all; 67 68 pythonImportsCheck = [ 69 "box" 70 ]; 71 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 }; 79}