Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / airthings-ble / default.nix
blob1f94585410651bcd3396765f28730b25121ea899
1 { lib
2 , async-interrupt
3 , async-timeout
4 , bleak
5 , bleak-retry-connector
6 , buildPythonPackage
7 , fetchFromGitHub
8 , poetry-core
9 , pytestCheckHook
10 , pythonOlder
13 buildPythonPackage rec {
14   pname = "airthings-ble";
15   version = "0.7.1";
16   pyproject = true;
18   disabled = pythonOlder "3.9";
20   src = fetchFromGitHub {
21     owner = "vincegio";
22     repo = "airthings-ble";
23     rev = "refs/tags/${version}";
24     hash = "sha256-BeOrGRVxvfQR1xqIpOp4tOTvlqTKCZHUjVKDqVjVnYM=";
25   };
27   postPatch = ''
28     substituteInPlace pyproject.toml \
29       --replace-fail "-v -Wdefault --cov=airthings_ble --cov-report=term-missing:skip-covered" ""
30   '';
32   nativeBuildInputs = [
33     poetry-core
34   ];
36   propagatedBuildInputs = [
37     async-interrupt
38     bleak
39     bleak-retry-connector
40   ]  ++ lib.optionals (pythonOlder "3.11") [
41     async-timeout
42   ];
44   nativeCheckInputs = [
45     pytestCheckHook
46   ];
48   pythonImportsCheck = [
49     "airthings_ble"
50   ];
52   meta = with lib; {
53     description = "Library for Airthings BLE devices";
54     homepage = "https://github.com/vincegio/airthings-ble";
55     changelog = "https://github.com/vincegio/airthings-ble/releases/tag/v${version}";
56     license = with licenses; [ mit ];
57     maintainers = with maintainers; [ fab ];
58   };