nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 aiohttp,
4 aresponses,
5 buildPythonPackage,
6 certifi,
7 fetchFromGitHub,
8 poetry-core,
9 pydantic,
10 pytest-aiohttp,
11 pytest-asyncio,
12 pytestCheckHook,
13}:
14
15buildPythonPackage rec {
16 pname = "aiopurpleair";
17 version = "2025.08.1";
18 pyproject = true;
19
20 src = fetchFromGitHub {
21 owner = "bachya";
22 repo = "aiopurpleair";
23 tag = version;
24 hash = "sha256-VmKIIgfZFk9z8WORDHA4ibL4FZchiRrT6L0rCkxosoc=";
25 };
26
27 build-system = [ poetry-core ];
28
29 dependencies = [
30 aiohttp
31 pydantic
32 certifi
33 ];
34
35 __darwinAllowLocalNetworking = true;
36
37 nativeCheckInputs = [
38 aresponses
39 pytest-aiohttp
40 pytest-asyncio
41 pytestCheckHook
42 ];
43
44 disabledTestPaths = [
45 # Ignore the examples directory as the files are prefixed with test_.
46 "examples/"
47 ];
48
49 pythonImportsCheck = [ "aiopurpleair" ];
50
51 meta = {
52 description = "Python library for interacting with the PurpleAir API";
53 homepage = "https://github.com/bachya/aiopurpleair";
54 changelog = "https://github.com/bachya/aiopurpleair/releases/tag/${src.tag}";
55 license = lib.licenses.mit;
56 maintainers = with lib.maintainers; [ fab ];
57 };
58}