diff options
author | Bert Moens <bert.moens@gmail.com> | 2017-12-22 15:35:33 +0100 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2018-03-19 14:07:33 +0100 |
commit | f97c4668abb630875318f057d452f8ebfe52f8e2 (patch) | |
tree | 72b8997f4306ebe539943e463a228f1952a57a93 /pkgs/applications/audio/rhvoice | |
parent | 80d0ccaaabf2bc093fdd71d0b35d415f04bcbf87 (diff) | |
download | nixlib-f97c4668abb630875318f057d452f8ebfe52f8e2.tar nixlib-f97c4668abb630875318f057d452f8ebfe52f8e2.tar.gz nixlib-f97c4668abb630875318f057d452f8ebfe52f8e2.tar.bz2 nixlib-f97c4668abb630875318f057d452f8ebfe52f8e2.tar.lz nixlib-f97c4668abb630875318f057d452f8ebfe52f8e2.tar.xz nixlib-f97c4668abb630875318f057d452f8ebfe52f8e2.tar.zst nixlib-f97c4668abb630875318f057d452f8ebfe52f8e2.zip |
rhvoice: init at unstable-2018-02-10
Diffstat (limited to 'pkgs/applications/audio/rhvoice')
-rw-r--r-- | pkgs/applications/audio/rhvoice/default.nix | 48 | ||||
-rw-r--r-- | pkgs/applications/audio/rhvoice/honor_nix_environment.patch | 14 |
2 files changed, 62 insertions, 0 deletions
diff --git a/pkgs/applications/audio/rhvoice/default.nix b/pkgs/applications/audio/rhvoice/default.nix new file mode 100644 index 000000000000..65cb7dab34a1 --- /dev/null +++ b/pkgs/applications/audio/rhvoice/default.nix @@ -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; + }; +} diff --git a/pkgs/applications/audio/rhvoice/honor_nix_environment.patch b/pkgs/applications/audio/rhvoice/honor_nix_environment.patch new file mode 100644 index 000000000000..ed180c92debc --- /dev/null +++ b/pkgs/applications/audio/rhvoice/honor_nix_environment.patch @@ -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\"'))) |