1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 hatchling,
6 pydantic,
7 pytestCheckHook,
8 pytest-cov-stub,
9 pythonOlder,
10}:
11
12buildPythonPackage rec {
13 pname = "camel-converter";
14 version = "4.0.1";
15 pyproject = true;
16
17 disabled = pythonOlder "3.9";
18
19 src = fetchFromGitHub {
20 owner = "sanders41";
21 repo = "camel-converter";
22 tag = "v${version}";
23 hash = "sha256-cHrMaf5PyFWacoi4t+Clow9qFAxbdn71p8ckuYMt27w=";
24 };
25
26 build-system = [ hatchling ];
27
28 optional-dependencies = {
29 pydantic = [ pydantic ];
30 };
31
32 nativeCheckInputs = [
33 pytestCheckHook
34 pytest-cov-stub
35 ]
36 ++ optional-dependencies.pydantic;
37
38 pythonImportsCheck = [ "camel_converter" ];
39
40 disabledTests = [
41 # AttributeError: 'Test' object has no attribute 'model_dump'
42 "test_camel_config"
43 ];
44
45 meta = with lib; {
46 description = "Module to convert strings from snake case to camel case or camel case to snake case";
47 homepage = "https://github.com/sanders41/camel-converter";
48 changelog = "https://github.com/sanders41/camel-converter/releases/tag/v${version}";
49 license = licenses.mit;
50 maintainers = with maintainers; [ fab ];
51 };
52}