1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, poetry-core
5, pydantic
6, pytestCheckHook
7, pythonOlder
8}:
9
10buildPythonPackage rec {
11 pname = "camel-converter";
12 version = "3.1.0";
13 pyproject = true;
14
15 disabled = pythonOlder "3.8";
16
17 src = fetchFromGitHub {
18 owner = "sanders41";
19 repo = "camel-converter";
20 rev = "refs/tags/v${version}";
21 hash = "sha256-ASUwSA63iUgeRfYdO6InZ8YzEbifQh1hr3fUbE3FYac=";
22 };
23
24 postPatch = ''
25 substituteInPlace pyproject.toml \
26 --replace "--cov=camel_converter --cov-report term-missing --no-cov-on-fail" ""
27 '';
28
29 nativeBuildInputs = [
30 poetry-core
31 ];
32
33 passthru.optional-dependencies = {
34 pydantic = [
35 pydantic
36 ];
37 };
38
39 nativeCheckInputs = [
40 pytestCheckHook
41 ] ++ passthru.optional-dependencies.pydantic;
42
43 pythonImportsCheck = [
44 "camel_converter"
45 ];
46
47 disabledTests = [
48 # AttributeError: 'Test' object has no attribute 'model_dump'
49 "test_camel_config"
50 ];
51
52 meta = with lib; {
53 description = "Client for the Meilisearch API";
54 homepage = "https://github.com/sanders41/camel-converter";
55 changelog = "https://github.com/sanders41/camel-converter/releases/tag/v${version}";
56 license = with licenses; [ mit ];
57 maintainers = with maintainers; [ fab ];
58 };
59}