Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / pysnooz / default.nix
blob4ff2513685f6a42331d79a00a555af0a6a331c31
1 { lib
2 , bleak
3 , bleak-retry-connector
4 , bluetooth-sensor-state-data
5 , buildPythonPackage
6 , events
7 , fetchFromGitHub
8 , freezegun
9 , home-assistant-bluetooth
10 , poetry-core
11 , pytest-asyncio
12 , pytest-mock
13 , pytestCheckHook
14 , pythonOlder
15 , transitions
18 buildPythonPackage rec {
19   pname = "pysnooz";
20   version = "0.10.0";
21   format = "pyproject";
23   disabled = pythonOlder "3.9";
25   src = fetchFromGitHub {
26     owner = "AustinBrunkhorst";
27     repo = pname;
28     rev = "refs/tags/v${version}";
29     hash = "sha256-jOXmaJprU35sdNRrBBx/YUyiDyyaE1qodWksXkTSEe0=";
30   };
32   postPatch = ''
33     substituteInPlace pyproject.toml \
34       --replace 'transitions = "^0.8.11"' 'transitions = ">=0.8.11"' \
35       --replace 'Events = "^0.4"' 'Events = ">=0.4"' \
36       --replace " --cov=pysnooz --cov-report=term-missing:skip-covered" ""
37   '';
39   nativeBuildInputs = [
40     poetry-core
41   ];
43   propagatedBuildInputs = [
44     bleak
45     bleak-retry-connector
46     bluetooth-sensor-state-data
47     events
48     home-assistant-bluetooth
49     transitions
50   ];
52   nativeCheckInputs = [
53     freezegun
54     pytest-asyncio
55     pytest-mock
56     pytestCheckHook
57   ];
59   pythonImportsCheck = [
60     "pysnooz"
61   ];
63   meta = with lib; {
64     description = "Library to control SNOOZ white noise machines";
65     homepage = "https://github.com/AustinBrunkhorst/pysnooz";
66     changelog = "https://github.com/AustinBrunkhorst/pysnooz/blob/v${version}/CHANGELOG.md";
67     license = with licenses; [ mit ];
68     maintainers = with maintainers; [ fab ];
69   };