summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pocketsphinx/default.nix
blob: c532ea90bb5b7bd353c232eb94249ad6d0b4ed10 (plain)
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
{
  lib,
  buildPythonPackage,
  cmake,
  cython,
  memory-profiler,
  ninja,
  pathspec,
  pocketsphinx,
  pytestCheckHook,
  scikit-build-core,
  sounddevice,
}:

buildPythonPackage rec {
  inherit (pocketsphinx) version src;
  pname = "pocketsphinx";
  pyproject = true;

  dontUseCmakeConfigure = true;

  env.CMAKE_ARGS = lib.cmakeBool "USE_INSTALLED_POCKETSPHINX" true;

  buildInputs = [ pocketsphinx ];

  build-system = [
    cmake
    cython
    ninja
    pathspec
    scikit-build-core
  ];

  dependencies = [ sounddevice ];

  nativeCheckInputs = [
    memory-profiler
    pytestCheckHook
  ];

  pythonImportsCheck = [ "pocketsphinx" ];

  meta = {
    description = "Small speech recognizer";
    homepage = "https://github.com/cmusphinx/pocketsphinx";
    changelog = "https://github.com/cmusphinx/pocketsphinx/blob/v${version}/NEWS";
    license = with lib.licenses; [
      bsd2
      bsd3
      mit
    ];
    maintainers = with lib.maintainers; [ jopejoe1 ];
  };
}