Files
nixpkgs/pkgs/development/python-modules/demetriek/default.nix

68 lines
1.3 KiB
Nix

{
lib,
aiohttp,
aresponses,
awesomeversion,
backoff,
buildPythonPackage,
fetchFromGitHub,
mashumaro,
orjson,
poetry-core,
pytest-asyncio,
pytest-cov-stub,
pytestCheckHook,
syrupy,
yarl,
}:
buildPythonPackage rec {
pname = "demetriek";
version = "1.4.1";
pyproject = true;
src = fetchFromGitHub {
owner = "frenck";
repo = "python-demetriek";
tag = "v${version}";
hash = "sha256-dd6BoaUUz84nf3g3v4E78t0mDC+ZhXKe0ld2gCNurZs=";
};
postPatch = ''
# Upstream doesn't set a version for the pyproject.toml
substituteInPlace pyproject.toml \
--replace-fail "0.0.0" "${version}"
'';
build-system = [ poetry-core ];
dependencies = [
aiohttp
awesomeversion
backoff
mashumaro
orjson
yarl
];
nativeCheckInputs = [
aresponses
pytest-asyncio
pytest-cov-stub
pytestCheckHook
syrupy
];
pythonImportsCheck = [ "demetriek" ];
__darwinAllowLocalNetworking = true;
meta = {
description = "Python client for LaMetric TIME devices";
homepage = "https://github.com/frenck/python-demetriek";
changelog = "https://github.com/frenck/python-demetriek/releases/tag/${src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}