about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/audio/soco-cli/default.nix
blob: 068f916e4ef01e7d156c9ffbdda810b37ded5136 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{ lib
, fetchFromGitHub
, python3
}:

python3.pkgs.buildPythonApplication rec {
  pname = "soco-cli";
  version = "0.4.55";
  format = "setuptools";

  disabled = python3.pythonOlder "3.6";

  src = fetchFromGitHub rec {
    owner = "avantrec";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-zdu1eVtVBTYa47KjGc5fqKN6olxp98RoLGT2sNCfG9E=";
  };

  propagatedBuildInputs = with python3.pkgs; [
    fastapi
    rangehttpserver
    soco
    tabulate
    uvicorn
  ];

  # Tests wants to communicate with hardware
  doCheck = false;

  pythonImportsCheck = [
    "soco_cli"
  ];

  meta = with lib; {
    description = "Command-line interface to control Sonos sound systems";
    homepage = "https://github.com/avantrec/soco-cli";
    license = with licenses; [ asl20 ];
    maintainers = with maintainers; [ fab ];
    mainProgram = "sonos";
  };
}