nixpkgs/pkgs/development/python-modules/renault-api/default.nix

68 lines
1.3 KiB
Nix

{
lib,
aiohttp,
aioresponses,
buildPythonPackage,
click,
cryptography,
dateparser,
fetchFromGitHub,
marshmallow-dataclass,
poetry-core,
pyjwt,
pytest-asyncio,
pytestCheckHook,
syrupy,
tabulate,
typeguard,
}:
buildPythonPackage (finalAttrs: {
pname = "renault-api";
version = "0.5.12";
pyproject = true;
src = fetchFromGitHub {
owner = "hacf-fr";
repo = "renault-api";
tag = "v${finalAttrs.version}";
hash = "sha256-XUrI03gr3U0wfEXLNGaxGil2tOfXrmeUUuH5lVKF0e0=";
};
build-system = [ poetry-core ];
dependencies = [
aiohttp
cryptography
marshmallow-dataclass
pyjwt
];
optional-dependencies = {
cli = [
click
dateparser
tabulate
];
};
nativeCheckInputs = [
aioresponses
pytest-asyncio
pytestCheckHook
syrupy
typeguard
]
++ lib.flatten (builtins.attrValues finalAttrs.passthru.optional-dependencies);
pythonImportsCheck = [ "renault_api" ];
meta = {
description = "Python library to interact with the Renault API";
homepage = "https://github.com/hacf-fr/renault-api";
changelog = "https://github.com/hacf-fr/renault-api/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "renault-api";
};
})