anki-bin: 24.06.3 -> 24.11 (#360722)
[NixPkgs.git] / pkgs / development / python-modules / airthings-ble / default.nix
blob854ab37120a2ffcc04459f901fdc0d443664311e
2   lib,
3   async-interrupt,
4   async-timeout,
5   bleak,
6   bleak-retry-connector,
7   buildPythonPackage,
8   fetchFromGitHub,
9   poetry-core,
10   pytestCheckHook,
11   pythonOlder,
14 buildPythonPackage rec {
15   pname = "airthings-ble";
16   version = "0.9.2";
17   pyproject = true;
19   disabled = pythonOlder "3.9";
21   src = fetchFromGitHub {
22     owner = "vincegio";
23     repo = "airthings-ble";
24     rev = "refs/tags/${version}";
25     hash = "sha256-m2jsXLrj2yS2Wi2dSwyxBv/nXmU738gd5iJ1JVfakUg=";
26   };
28   postPatch = ''
29     substituteInPlace pyproject.toml \
30       --replace-fail "-v -Wdefault --cov=airthings_ble --cov-report=term-missing:skip-covered" ""
31   '';
33   build-system = [ poetry-core ];
35   dependencies = [
36     async-interrupt
37     bleak
38     bleak-retry-connector
39   ] ++ lib.optionals (pythonOlder "3.11") [ async-timeout ];
41   nativeCheckInputs = [ pytestCheckHook ];
43   pythonImportsCheck = [ "airthings_ble" ];
45   meta = with lib; {
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/${version}";
49     license = with licenses; [ mit ];
50     maintainers = with maintainers; [ fab ];
51   };