rhvoice: init at unstable-2018-02-10

This commit is contained in:
Bert Moens 2017-12-22 15:35:33 +01:00 committed by Jan Tojnar
parent 80d0ccaaab
commit f97c4668ab
No known key found for this signature in database
GPG Key ID: 7FAB2A15F7A607A4
3 changed files with 64 additions and 0 deletions

View File

@ -0,0 +1,48 @@
{ stdenv, lib, pkgconfig, fetchFromGitHub, scons, python, glibmm, libpulseaudio, libao
}:
let
version = "unstable-2018-02-10";
in stdenv.mkDerivation rec {
name = "rhvoice-${version}";
src = fetchFromGitHub {
owner = "Olga-Yakovleva";
repo = "RHVoice";
rev = "7a25a881b0465e47a12d8029b56f3b71a1d02312";
sha256 = "1gkrlmv7msh9qlm0gkjqpl9gswghpclfdwszr1p85v8vk6m63v0b";
};
nativeBuildInputs = [
scons pkgconfig
];
buildInputs = [
python glibmm libpulseaudio libao
];
# 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
patches = [ ./honor_nix_environment.patch ];
buildPhase = ''
scons prefix=$out
'';
installPhase = ''
scons install
'';
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;
};
}

View File

@ -0,0 +1,14 @@
diff --git a/SConstruct b/SConstruct
index 2421399..ba39254 100644
--- a/SConstruct
+++ b/SConstruct
@@ -147,6 +147,9 @@ def create_base_env(vars):
env_args["package_name"]="RHVoice"
env_args["CPPDEFINES"]=[("RHVOICE","1")]
env=Environment(**env_args)
+ env.PrependENVPath("PATH", os.environ["PATH"])
+ env["ENV"]["PKG_CONFIG_PATH"]=os.environ["PKG_CONFIG_PATH"]
+ env["RPATH"]=env["libdir"]
env["package_version"]=get_version(env["release"])
env.Append(CPPDEFINES=("PACKAGE",env.subst(r'\"$package_name\"')))
env.Append(CPPDEFINES=("VERSION",env.subst(r'\"$package_version\"')))

View File

@ -15836,6 +15836,8 @@ with pkgs;
quvi_scripts = callPackage ../applications/video/quvi/scripts.nix { };
rhvoice = callPackage ../applications/audio/rhvoice { };
svox = callPackage ../applications/audio/svox { };
gkrellm = callPackage ../applications/misc/gkrellm {