nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 poetry-core,
8 setuptools,
9
10 # dependencies
11 habluetooth,
12
13 # tests
14 bleak,
15 pytest-cov-stub,
16 pytestCheckHook,
17}:
18
19buildPythonPackage rec {
20 pname = "home-assistant-bluetooth";
21 version = "2.0.0";
22 pyproject = true;
23
24 src = fetchFromGitHub {
25 owner = "home-assistant-libs";
26 repo = "home-assistant-bluetooth";
27 tag = "v${version}";
28 hash = "sha256-A29Jezj9kQ/v4irvpcpCiZlrNQBQwByrSJOx4HaXTdc=";
29 };
30
31 build-system = [
32 poetry-core
33 setuptools
34 ];
35
36 dependencies = [ habluetooth ];
37
38 doCheck = false; # broken with habluetooth>=4.0
39
40 nativeCheckInputs = [
41 bleak
42 pytest-cov-stub
43 pytestCheckHook
44 ];
45
46 pythonImportsCheck = [ "home_assistant_bluetooth" ];
47
48 meta = {
49 description = "Basic bluetooth models used by Home Assistant";
50 changelog = "https://github.com/home-assistant-libs/home-assistant-bluetooth/blob/${src.tag}/CHANGELOG.md";
51 homepage = "https://github.com/home-assistant-libs/home-assistant-bluetooth";
52 license = lib.licenses.asl20;
53 teams = [ lib.teams.home-assistant ];
54 };
55}