2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
cython,
|
|
|
|
fetchFromGitHub,
|
|
|
|
msgpack,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
pyyaml,
|
|
|
|
ruamel-yaml,
|
|
|
|
setuptools,
|
|
|
|
toml,
|
|
|
|
tomli,
|
|
|
|
tomli-w,
|
2021-04-05 15:23:46 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-box";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "7.2.0";
|
2023-03-04 12:14:45 +00:00
|
|
|
format = "setuptools";
|
2022-03-30 09:31:56 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2021-04-05 15:23:46 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cdgriffith";
|
|
|
|
repo = "Box";
|
2022-11-02 22:02:43 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-5aORpuh0ezA3mUEpAPANDkdeN8ujNRfCUCV5qamMk68=";
|
2021-04-05 15:23:46 +00:00
|
|
|
};
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
nativeBuildInputs = [
|
2024-04-21 15:54:59 +00:00
|
|
|
cython
|
2023-02-09 11:40:11 +00:00
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
optional-dependencies = {
|
2022-11-02 22:02:43 +00:00
|
|
|
all = [
|
|
|
|
msgpack
|
|
|
|
ruamel-yaml
|
|
|
|
toml
|
|
|
|
];
|
2024-06-05 15:53:02 +00:00
|
|
|
yaml = [ ruamel-yaml ];
|
|
|
|
ruamel-yaml = [ ruamel-yaml ];
|
|
|
|
PyYAML = [ pyyaml ];
|
|
|
|
tomli = [ tomli-w ] ++ lib.optionals (pythonOlder "3.11") [ tomli ];
|
|
|
|
toml = [ toml ];
|
|
|
|
msgpack = [ msgpack ];
|
2022-11-02 22:02:43 +00:00
|
|
|
};
|
2021-04-05 15:23:46 +00:00
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ] ++ optional-dependencies.all;
|
2021-04-05 15:23:46 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "box" ];
|
2021-04-05 15:23:46 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python dictionaries with advanced dot notation access";
|
|
|
|
homepage = "https://github.com/cdgriffith/Box";
|
2023-02-09 11:40:11 +00:00
|
|
|
changelog = "https://github.com/cdgriffith/Box/blob/${version}/CHANGES.rst";
|
2021-04-05 15:23:46 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|