Files
nixpkgs/pkgs/development/python-modules/foobot-async/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

53 lines
1.0 KiB
Nix

{
lib,
buildPythonPackage,
pythonOlder,
fetchPypi,
aiohttp,
async-timeout,
aioresponses,
pytestCheckHook,
setuptools,
}:
buildPythonPackage rec {
pname = "foobot-async";
version = "1.0.1";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchPypi {
pname = "foobot_async";
inherit version;
hash = "sha256-QQjysk2m8QkOpLBdC8kfuoA9PcljgEwzKyrIAhxHB4c=";
};
postPatch = ''
# https://github.com/reefab/foobot_async/issues/7
substituteInPlace foobot_async/__init__.py \
--replace-fail "with async_timeout.timeout" "async with async_timeout.timeout"
'';
build-system = [ setuptools ];
dependencies = [
aiohttp
async-timeout
];
nativeCheckInputs = [
aioresponses
pytestCheckHook
];
pythonImportsCheck = [ "foobot_async" ];
meta = {
description = "API Client for Foobot Air Quality Monitoring devices";
homepage = "https://github.com/reefab/foobot_async";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ dotlambda ];
};
}