Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / sensorpush-ble / default.nix
blobd51f6d7d64470eb712f81672a312e96fc3025f22
1 { lib
2 , bluetooth-sensor-state-data
3 , buildPythonPackage
4 , fetchFromGitHub
5 , home-assistant-bluetooth
6 , poetry-core
7 , pytestCheckHook
8 , pythonOlder
9 , sensor-state-data
12 buildPythonPackage rec {
13   pname = "sensorpush-ble";
14   version = "1.5.5";
15   format = "pyproject";
17   disabled = pythonOlder "3.9";
19   src = fetchFromGitHub {
20     owner = "Bluetooth-Devices";
21     repo = pname;
22     rev = "refs/tags/v${version}";
23     hash = "sha256-17Yzpbcy/r+GlkLktgghehfAEboZHMbB/Dze1no4I80=";
24   };
26   nativeBuildInputs = [
27     poetry-core
28   ];
30   propagatedBuildInputs = [
31     bluetooth-sensor-state-data
32     home-assistant-bluetooth
33     sensor-state-data
34   ];
36   nativeCheckInputs = [
37     pytestCheckHook
38   ];
40   postPatch = ''
41     substituteInPlace pyproject.toml \
42       --replace " --cov=sensorpush_ble --cov-report=term-missing:skip-covered" ""
43   '';
45   pythonImportsCheck = [
46     "sensorpush_ble"
47   ];
49   meta = with lib; {
50     description = "Library for SensorPush BLE devices";
51     homepage = "https://github.com/Bluetooth-Devices/sensorpush-ble";
52     changelog = "https://github.com/Bluetooth-Devices/sensorpush-ble/releases/tag/v${version}";
53     license = with licenses; [ mit ];
54     maintainers = with maintainers; [ fab ];
55   };