Files
nixpkgs/pkgs/development/python-modules/aioesphomeapi/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

87 lines
1.6 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
# build-system
cython,
setuptools,
# dependencies
aiohappyeyeballs,
async-interrupt,
chacha20poly1305-reuseable,
cryptography,
noiseprotocol,
protobuf,
tzlocal,
zeroconf,
# tests
mock,
pytest-asyncio,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "aioesphomeapi";
version = "42.10.0";
pyproject = true;
src = fetchFromGitHub {
owner = "esphome";
repo = "aioesphomeapi";
tag = "v${version}";
hash = "sha256-My61UXXOe7YNuq7eBltXqXmX6OqnDWUk7HJofAgR2I8=";
};
build-system = [
setuptools
cython
];
pythonRelaxDeps = [ "cryptography" ];
dependencies = [
aiohappyeyeballs
async-interrupt
chacha20poly1305-reuseable
cryptography
noiseprotocol
protobuf
tzlocal
zeroconf
];
nativeCheckInputs = [
mock
pytest-asyncio
pytestCheckHook
];
# Lack of network sandboxing leads to conflicting listeners when testing
# this package e.g. in nixpkgs-review on the two suppoted python package sets.
doCheck = !stdenv.hostPlatform.isDarwin;
disabledTestPaths = [
# benchmarking requires pytest-codespeed
"tests/benchmarks"
];
__darwinAllowLocalNetworking = true;
pythonImportsCheck = [ "aioesphomeapi" ];
meta = {
description = "Python Client for ESPHome native API";
homepage = "https://github.com/esphome/aioesphomeapi";
changelog = "https://github.com/esphome/aioesphomeapi/releases/tag/${src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
fab
hexa
];
};
}