1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchFromGitHub
5, poetry-core
6, aiohttp
7, setuptools
8}:
9
10buildPythonPackage rec {
11 pname = "aiomusiccast";
12 version = "0.14.5";
13
14 format = "pyproject";
15 disabled = pythonOlder "3.8";
16
17 src = fetchFromGitHub {
18 owner = "vigonotion";
19 repo = "aiomusiccast";
20 rev = "refs/tags/${version}";
21 hash = "sha256-YssBrG4sFtQtrzKU/O/tWEVL9eq8dpszejY/1So5Mec=";
22 };
23
24 postPatch = ''
25 substituteInPlace pyproject.toml \
26 --replace '"0.0.0"' '"${version}"'
27 '';
28
29 nativeBuildInputs = [
30 poetry-core
31 ];
32
33 propagatedBuildInputs = [
34 aiohttp
35 setuptools
36 ];
37
38 # upstream has no tests
39 doCheck = false;
40
41 pythonImportsCheck = [
42 "aiomusiccast"
43 ];
44
45 meta = with lib; {
46 description = "Companion library for musiccast devices intended for the Home Assistant integration";
47 homepage = "https://github.com/vigonotion/aiomusiccast";
48 license = licenses.mit;
49 maintainers = with maintainers; [ dotlambda ];
50 };
51}