diff --git a/pkgs/development/python-modules/rangehttpserver/default.nix b/pkgs/development/python-modules/rangehttpserver/default.nix new file mode 100644 index 000000000000..217bffb174b8 --- /dev/null +++ b/pkgs/development/python-modules/rangehttpserver/default.nix @@ -0,0 +1,41 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, nose +, requests +}: + +buildPythonPackage rec { + pname = "rangehttpserver"; + version = "1.2.0"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "danvk"; + repo = "RangeHTTPServer"; + rev = version; + sha256 = "1sy9j6y8kp5jiwv2vd652v94kspp1yd4dwxrfqfn6zwnfyv2mzv5"; + }; + + checkInputs = [ + nose + requests + ]; + + checkPhase = '' + runHook preCheck + nosetests + runHook postCheck + ''; + + pythonImportsCheck = [ + "RangeHTTPServer" + ]; + + meta = with lib; { + description = "SimpleHTTPServer with support for Range requests"; + homepage = "https://github.com/danvk/RangeHTTPServer"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/tools/audio/soco-cli/default.nix b/pkgs/tools/audio/soco-cli/default.nix new file mode 100644 index 000000000000..52614a8dc220 --- /dev/null +++ b/pkgs/tools/audio/soco-cli/default.nix @@ -0,0 +1,41 @@ +{ lib +, fetchFromGitHub +, python3 +}: + +python3.pkgs.buildPythonApplication rec { + pname = "soco-cli"; + version = "0.4.21"; + format = "setuptools"; + + disabled = python3.pythonOlder "3.6"; + + src = fetchFromGitHub rec { + owner = "avantrec"; + repo = pname; + rev = "v${version}"; + sha256 = "1kz2zx59gjfs01jiyzmps8j6yca06yqn6wkidvdk4s3izdm0rarw"; + }; + + 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 58dca6479b84..04c3fe0c06bc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19276,6 +19276,8 @@ with pkgs; socket_wrapper = callPackage ../development/libraries/socket_wrapper { }; + soco-cli = callPackage ../tools/audio/soco-cli { }; + sofia_sip = callPackage ../development/libraries/sofia-sip { inherit (darwin.apple_sdk.frameworks) SystemConfiguration; }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9fe2c10dc4b8..d1293a07887b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7829,6 +7829,8 @@ in { random2 = callPackage ../development/python-modules/random2 { }; + rangehttpserver = callPackage ../development/python-modules/rangehttpserver { }; + rapidfuzz = callPackage ../development/python-modules/rapidfuzz { }; rarfile = callPackage ../development/python-modules/rarfile {