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