Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / led-ble / default.nix
blob653d75a46da47d39137c29243d4a80193bebad35
1 { lib
2 , async-timeout
3 , bleak
4 , bleak-retry-connector
5 , buildPythonPackage
6 , fetchFromGitHub
7 , flux-led
8 , poetry-core
9 , pytestCheckHook
10 , pythonOlder
13 buildPythonPackage rec {
14   pname = "led-ble";
15   version = "1.0.1";
16   format = "pyproject";
18   disabled = pythonOlder "3.9";
20   src = fetchFromGitHub {
21     owner = "Bluetooth-Devices";
22     repo = pname;
23     rev = "refs/tags/v${version}";
24     hash = "sha256-8DBA01QjW99OVYI9zC1Q+utnwzc10idUG7y+lmUbO4A=";
25   };
27   postPatch = ''
28     substituteInPlace pyproject.toml \
29       --replace " --cov=led_ble --cov-report=term-missing:skip-covered" ""
30   '';
32   nativeBuildInputs = [
33     poetry-core
34   ];
36   propagatedBuildInputs = [
37     bleak
38     bleak-retry-connector
39     flux-led
40   ] ++ lib.optionals (pythonOlder "3.11") [
41     async-timeout
42   ];
44   nativeCheckInputs = [
45     pytestCheckHook
46   ];
48   pythonImportsCheck = [
49     "led_ble"
50   ];
52   meta = with lib; {
53     description = "Library for LED BLE devices";
54     homepage = "https://github.com/Bluetooth-Devices/led-ble";
55     changelog = "https://github.com/Bluetooth-Devices/led-ble/blob/v${version}/CHANGELOG.md";
56     license = with licenses; [ mit ];
57     maintainers = with maintainers; [ fab ];
58   };