nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 aiohttp,
4 orjson,
5 faust-cchardet,
6 aiodns,
7 brotli,
8 buildPythonPackage,
9 fetchFromGitHub,
10 setuptools,
11}:
12
13buildPythonPackage rec {
14 pname = "aiosonos";
15 version = "0.1.9";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "music-assistant";
20 repo = "aiosonos";
21 tag = version;
22 hash = "sha256-15zGeYspuWR5w1yGHXfXhmUeV4p+/jhXrnkZ98XW/LI=";
23 };
24
25 postPatch = ''
26 substituteInPlace pyproject.toml \
27 --replace-fail 'version = "0.0.0"' 'version = "${version}"'
28 '';
29
30 build-system = [ setuptools ];
31
32 dependencies = [
33 aiohttp
34 orjson
35 faust-cchardet
36 aiodns
37 brotli
38 ];
39
40 doCheck = false; # no tests
41
42 pythonImportsCheck = [
43 "aiosonos"
44 "aiosonos.api"
45 ];
46
47 meta = {
48 description = "Async python library to communicate with Sonos devices ";
49 homepage = "https://github.com/music-assistant/aiosonos";
50 changelog = "https://github.com/music-assistant/aiosonos/releases/tag/${version}";
51 license = [ lib.licenses.asl20 ];
52 maintainers = [ lib.maintainers.autrimpo ];
53 };
54}