about summary refs log tree commit diff
path: root/pkgs/applications/audio/rhvoice/default.nix
blob: bf7791ca555a6185856688325bc987dbf75e53ad (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
, stdenv
, fetchFromGitHub
, ensureNewerSourcesForZipFilesHook
, pkg-config
, scons
, glibmm
, libpulseaudio
, libao
, speechd
}:

stdenv.mkDerivation rec {
  pname = "rhvoice";
  version = "1.8.0";

  src = fetchFromGitHub {
    owner = "RHVoice";
    repo = "RHVoice";
    rev = version;
    fetchSubmodules = true;
    hash = "sha256-G5886rjBaAp0AXcr07O0q7K1OXTayfIbd4zniKwDiLw=";
  };

  patches = [
    # SConstruct patch
    #     Scons creates an independent environment that assumes standard POSIX paths.
    #     The patch is needed to push the nix environment.
    #     - PATH
    #     - PKG_CONFIG_PATH, to find available (sound) libraries
    #     - RPATH, to link to the newly built libraries
    ./honor_nix_environment.patch
  ];

  nativeBuildInputs = [
    ensureNewerSourcesForZipFilesHook
    pkg-config
    scons
  ];

  buildInputs = [
    glibmm
    libpulseaudio
    libao
    speechd
  ];

  meta = {
    description = "A free and open source speech synthesizer for Russian language and others";
    homepage = "https://github.com/Olga-Yakovleva/RHVoice/wiki";
    license = lib.licenses.gpl3;
    maintainers = with lib.maintainers; [ berce ];
    platforms = with lib.platforms; all;
    mainProgram = "RHVoice-test";
  };
}