nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 aiohttp,
4 aresponses,
5 buildPythonPackage,
6 certifi,
7 fetchFromGitHub,
8 numpy,
9 poetry-core,
10 pygments,
11 pysmb,
12 pytest-aiohttp,
13 pytest-asyncio,
14 pytestCheckHook,
15}:
16
17buildPythonPackage rec {
18 pname = "pyairvisual";
19 version = "2023.12.0";
20 pyproject = true;
21
22 src = fetchFromGitHub {
23 owner = "bachya";
24 repo = "pyairvisual";
25 tag = version;
26 hash = "sha256-uN31LeHYmg4V6Ln3EQp765nOsN5v56TxjYSS/g6TUCY=";
27 };
28
29 nativeBuildInputs = [ poetry-core ];
30
31 propagatedBuildInputs = [
32 aiohttp
33 certifi
34 numpy
35 pygments
36 pysmb
37 ];
38
39 # this lets tests bind to localhost in sandbox mode on macOS
40 __darwinAllowLocalNetworking = true;
41
42 nativeCheckInputs = [
43 aresponses
44 pytest-aiohttp
45 pytest-asyncio
46 pytestCheckHook
47 pytestCheckHook
48 ];
49
50 disabledTestPaths = [
51 # Ignore the examples directory as the files are prefixed with test_.
52 "examples/"
53 ];
54
55 pythonImportsCheck = [ "pyairvisual" ];
56
57 meta = {
58 description = "Python library for interacting with AirVisual";
59 homepage = "https://github.com/bachya/pyairvisual";
60 changelog = "https://github.com/bachya/pyairvisual/releases/tag/${version}";
61 license = with lib.licenses; [ mit ];
62 maintainers = with lib.maintainers; [ fab ];
63 };
64}