diff options
author | Martin Weinelt <mweinelt@users.noreply.github.com> | 2023-10-22 16:53:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-22 16:53:03 +0200 |
commit | 410ccec99c39e131c0f0263f3ef4aceb2f2dbab8 (patch) | |
tree | 0a18e052a8ddd50deeb16515c7caf13c73c8db3d /pkgs | |
parent | f3a3ac36138136faa6f338e72d30487c7c073e09 (diff) | |
parent | 95856e526efd96e33cc021eb939e0529a0caa74d (diff) |
Merge pull request #261931 from mweinelt/homeassistant-satellite
homeassistant-satellite: init at 2.3.0
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/by-name/ho/homeassistant-satellite/package.nix | 56 | ||||
-rw-r--r-- | pkgs/development/python-modules/pasimple/default.nix | 44 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 2 |
3 files changed, 102 insertions, 0 deletions
diff --git a/pkgs/by-name/ho/homeassistant-satellite/package.nix b/pkgs/by-name/ho/homeassistant-satellite/package.nix new file mode 100644 index 0000000000000..26f90237f5218 --- /dev/null +++ b/pkgs/by-name/ho/homeassistant-satellite/package.nix @@ -0,0 +1,56 @@ +{ lib +, python3 +, fetchFromGitHub +}: + +python3.pkgs.buildPythonApplication rec { + pname = "homeassistant-satellite"; + version = "2.3.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "synesthesiam"; + repo = "homeassistant-satellite"; + rev = "v${version}"; + hash = "sha256-iosutOpkpt0JJIMyALuQSDLj4jk57ITShVyPYlQgMFg="; + }; + + nativeBuildInputs = with python3.pkgs; [ + setuptools + wheel + ]; + + propagatedBuildInputs = with python3.pkgs; [ + aiohttp + ]; + + passthru.optional-dependencies = { + pulseaudio = with python3.pkgs; [ + pasimple + pulsectl + ]; + silerovad = with python3.pkgs; [ + numpy + onnxruntime + ]; + webrtc = with python3.pkgs; [ + webrtc-noise-gain + ]; + }; + + pythonImportsCheck = [ + "homeassistant_satellite" + ]; + + # no tests + doCheck = false; + + meta = with lib; { + changelog = "https://github.com/synesthesiam/homeassistant-satellite/blob/v${version}/CHANGELOG.md"; + description = "Streaming audio satellite for Home Assistant"; + homepage = "https://github.com/synesthesiam/homeassistant-satellite"; + license = licenses.mit; + maintainers = with maintainers; [ hexa ]; + mainProgram = "homeassistant-satellite"; + }; +} diff --git a/pkgs/development/python-modules/pasimple/default.nix b/pkgs/development/python-modules/pasimple/default.nix new file mode 100644 index 0000000000000..6dc52b2101580 --- /dev/null +++ b/pkgs/development/python-modules/pasimple/default.nix @@ -0,0 +1,44 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, setuptools +, pulseaudio +}: + +buildPythonPackage rec { + pname = "pasimple"; + version = "0.0.2"; + pyproject = true; + + src = fetchFromGitHub { + owner = "henrikschnor"; + repo = "pasimple"; + rev = "v${version}"; + hash = "sha256-Z271FdBCqPFcQzVqGidL74nO85rO9clNvP4czAHmdEw="; + }; + + postPatch = '' + substituteInPlace pasimple/pa_simple.py --replace \ + "_libpulse_simple = ctypes.CDLL('libpulse-simple.so.0')" \ + "_libpulse_simple = ctypes.CDLL('${lib.getLib pulseaudio}/lib/libpulse-simple.so.0')" + ''; + + nativeBuildInputs = [ + setuptools + ]; + + pythonImportsCheck = [ + "pasimple" + "pasimple.pa_simple" + ]; + + # no tests + doCheck = false; + + meta = with lib; { + description = "A python wrapper for the \"PulseAudio simple API\". Supports playing and recording audio via PulseAudio and PipeWire"; + homepage = "https://github.com/henrikschnor/pasimple"; + license = licenses.mit; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9363e66873d53..99940a04a703b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8732,6 +8732,8 @@ self: super: with self; { parver = callPackage ../development/python-modules/parver { }; arpeggio = callPackage ../development/python-modules/arpeggio { }; + pasimple = callPackage ../development/python-modules/pasimple { }; + passlib = callPackage ../development/python-modules/passlib { }; paste = callPackage ../development/python-modules/paste { }; |