2022-12-17 10:02:37 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, poetry-core
|
|
|
|
, pydantic
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "camel-converter";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "3.1.1";
|
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-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-xrdk5Y3H8KlQaGtJYdJNHq16Qfos2p+93uIAfIl098c=";
|
2022-12-17 10:02:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2023-11-16 04:20:00 +00:00
|
|
|
--replace "--cov=camel_converter --cov-report term-missing --no-cov-on-fail" ""
|
2022-12-17 10:02:37 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
|
|
|
pydantic = [
|
|
|
|
pydantic
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-12-17 10:02:37 +00:00
|
|
|
pytestCheckHook
|
|
|
|
] ++ passthru.optional-dependencies.pydantic;
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"camel_converter"
|
|
|
|
];
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|