2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
pydantic,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2022-12-17 10:02:37 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "camel-converter";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "3.1.2";
|
2023-11-16 04:20:00 +00:00
|
|
|
pyproject = true;
|
2022-12-17 10:02:37 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
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-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-CJbflRI3wfUmPoVuLwZDYcobESmySvnS99PdpSDhDLk=";
|
2022-12-17 10:02:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-04-21 15:54:59 +00:00
|
|
|
--replace-fail "--cov=camel_converter --cov-report term-missing --no-cov-on-fail" ""
|
2022-12-17 10:02:37 +00:00
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [ poetry-core ];
|
2022-12-17 10:02:37 +00:00
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
2024-04-21 15:54:59 +00:00
|
|
|
pydantic = [ pydantic ];
|
2022-12-17 10:02:37 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ] ++ passthru.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; {
|
|
|
|
description = "Client for the Meilisearch API";
|
|
|
|
homepage = "https://github.com/sanders41/camel-converter";
|
|
|
|
changelog = "https://github.com/sanders41/camel-converter/releases/tag/v${version}";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|