about summary refs log tree commit diff
path: root/pkgs/development/python-modules/webrtc-noise-gain/default.nix
blob: 63b02a1bfd0d2fb278544ced82c97a7f5f87d6db (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{ lib
, buildPythonPackage
, fetchFromGitHub
, stdenv

# build-system
, pybind11
, setuptools

# native dependencies
, abseil-cpp
, darwin

# tests
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "webrtc-noise-gain";
  version = "1.2.3";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "rhasspy";
    repo = "webrtc-noise-gain";
    rev = "v${version}";
    hash = "sha256-DFEtuO49zXNixLwBjQ/WOiARDhMAXVH+5hfc3eSdPIo=";
  };

  nativeBuildInputs = [
    pybind11
    setuptools
  ];

  buildInputs = [
    abseil-cpp
  ] ++ lib.optionals (stdenv.isDarwin) [
    darwin.apple_sdk.frameworks.CoreServices
  ];

  pythonImportsCheck = [
    "webrtc_noise_gain"
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  meta = with lib; {
    description = "Tiny wrapper around webrtc-audio-processing for noise suppression/auto gain only";
    homepage = "https://github.com/rhasspy/webrtc-noise-gain";
    changelog = "https://github.com/rhasspy/webrtc-noise-gain/blob/${src.rev}/CHANGELOG.md";
    license = licenses.mit;
    maintainers = with maintainers; [ hexa ];
  };
}