depot/third_party/nixpkgs/pkgs/development/python-modules/camel-converter/default.nix
Default email 555cd8a8f9 Project import generated by Copybara.
GitOrigin-RevId: 5633bcff0c6162b9e4b5f1264264611e950c8ec7
2024-10-09 18:51:18 +02:00

51 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
hatchling,
pydantic,
pytestCheckHook,
pytest-cov-stub,
pythonOlder,
}:
buildPythonPackage rec {
pname = "camel-converter";
version = "4.0.1";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "sanders41";
repo = "camel-converter";
rev = "refs/tags/v${version}";
hash = "sha256-cHrMaf5PyFWacoi4t+Clow9qFAxbdn71p8ckuYMt27w=";
};
build-system = [ hatchling ];
optional-dependencies = {
pydantic = [ pydantic ];
};
nativeCheckInputs = [
pytestCheckHook
pytest-cov-stub
] ++ optional-dependencies.pydantic;
pythonImportsCheck = [ "camel_converter" ];
disabledTests = [
# AttributeError: 'Test' object has no attribute 'model_dump'
"test_camel_config"
];
meta = with lib; {
description = "Module to convert strings from snake case to camel case or camel case to snake case";
homepage = "https://github.com/sanders41/camel-converter";
changelog = "https://github.com/sanders41/camel-converter/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}