2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2024-10-04 16:56:33 +00:00
|
|
|
hatchling,
|
2024-04-21 15:54:59 +00:00
|
|
|
pydantic,
|
|
|
|
pytestCheckHook,
|
2024-09-19 14:19:46 +00:00
|
|
|
pytest-cov-stub,
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonOlder,
|
2022-12-17 10:02:37 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "camel-converter";
|
2024-10-09 16:51:18 +00:00
|
|
|
version = "4.0.1";
|
2023-11-16 04:20:00 +00:00
|
|
|
pyproject = true;
|
2022-12-17 10:02:37 +00:00
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2022-12-17 10:02:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sanders41";
|
2023-11-16 04:20:00 +00:00
|
|
|
repo = "camel-converter";
|
2022-12-17 10:02:37 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-10-09 16:51:18 +00:00
|
|
|
hash = "sha256-cHrMaf5PyFWacoi4t+Clow9qFAxbdn71p8ckuYMt27w=";
|
2022-12-17 10:02:37 +00:00
|
|
|
};
|
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
build-system = [ hatchling ];
|
2022-12-17 10:02:37 +00:00
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
optional-dependencies = {
|
2024-04-21 15:54:59 +00:00
|
|
|
pydantic = [ pydantic ];
|
2022-12-17 10:02:37 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-cov-stub
|
2024-10-04 16:56:33 +00:00
|
|
|
] ++ optional-dependencies.pydantic;
|
2022-12-17 10:02:37 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonImportsCheck = [ "camel_converter" ];
|
2022-12-17 10:02:37 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
disabledTests = [
|
|
|
|
# AttributeError: 'Test' object has no attribute 'model_dump'
|
|
|
|
"test_camel_config"
|
|
|
|
];
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
meta = with lib; {
|
2024-10-04 16:56:33 +00:00
|
|
|
description = "Module to convert strings from snake case to camel case or camel case to snake case";
|
2022-12-17 10:02:37 +00:00
|
|
|
homepage = "https://github.com/sanders41/camel-converter";
|
|
|
|
changelog = "https://github.com/sanders41/camel-converter/releases/tag/v${version}";
|
2024-10-04 16:56:33 +00:00
|
|
|
license = licenses.mit;
|
2022-12-17 10:02:37 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|