nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 async-interrupt,
4 bleak,
5 bleak-retry-connector,
6 buildPythonPackage,
7 cbor2,
8 fetchFromGitHub,
9 poetry-core,
10 pytest-cov-stub,
11 pytestCheckHook,
12 pythonOlder,
13}:
14
15buildPythonPackage rec {
16 pname = "airthings-ble";
17 version = "1.2.0";
18 pyproject = true;
19
20 src = fetchFromGitHub {
21 owner = "vincegio";
22 repo = "airthings-ble";
23 tag = version;
24 hash = "sha256-y6vpkq3u5JKImwxevMupUVVAclUcsyrqxoIOYRK0YGQ=";
25 };
26
27 build-system = [ poetry-core ];
28
29 dependencies = [
30 async-interrupt
31 bleak-retry-connector
32 cbor2
33 ]
34 ++ lib.optionals (pythonOlder "3.14") [
35 bleak
36 ];
37
38 nativeCheckInputs = [
39 pytest-cov-stub
40 pytestCheckHook
41 ];
42
43 pythonImportsCheck = [ "airthings_ble" ];
44
45 meta = {
46 description = "Library for Airthings BLE devices";
47 homepage = "https://github.com/vincegio/airthings-ble";
48 changelog = "https://github.com/vincegio/airthings-ble/releases/tag/${src.tag}";
49 license = lib.licenses.mit;
50 maintainers = with lib.maintainers; [ fab ];
51 };
52}