depot/third_party/nixpkgs/pkgs/development/python-modules/airgradient/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

61 lines
1.1 KiB
Nix

{
lib,
aiohttp,
aioresponses,
buildPythonPackage,
fetchFromGitHub,
mashumaro,
orjson,
poetry-core,
pytest-asyncio,
pytestCheckHook,
pythonOlder,
syrupy,
yarl,
}:
buildPythonPackage rec {
pname = "airgradient";
version = "0.7.0";
pyproject = true;
disabled = pythonOlder "3.11";
src = fetchFromGitHub {
owner = "airgradienthq";
repo = "python-airgradient";
rev = "refs/tags/v${version}";
hash = "sha256-4bHo65ew5UVGUgoM9y6kxo1ocMtrxQ5Bn6Zn77qXJ7M=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "--cov" ""
'';
build-system = [ poetry-core ];
dependencies = [
aiohttp
mashumaro
orjson
yarl
];
nativeCheckInputs = [
aioresponses
pytest-asyncio
pytestCheckHook
syrupy
];
pythonImportsCheck = [ "airgradient" ];
meta = with lib; {
description = "Module for AirGradient";
homepage = "https://github.com/airgradienthq/python-airgradient";
changelog = "https://github.com/airgradienthq/python-airgradient/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}