about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/audio/rhvoice
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/applications/audio/rhvoice
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs
git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a
git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/applications/audio/rhvoice')
-rw-r--r--nixpkgs/pkgs/applications/audio/rhvoice/default.nix40
-rw-r--r--nixpkgs/pkgs/applications/audio/rhvoice/honor_nix_environment.patch14
2 files changed, 54 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/audio/rhvoice/default.nix b/nixpkgs/pkgs/applications/audio/rhvoice/default.nix
new file mode 100644
index 000000000000..6516532df33f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/rhvoice/default.nix
@@ -0,0 +1,40 @@
+{ 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 ];
+
+  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/nixpkgs/pkgs/applications/audio/rhvoice/honor_nix_environment.patch b/nixpkgs/pkgs/applications/audio/rhvoice/honor_nix_environment.patch
new file mode 100644
index 000000000000..ed180c92debc
--- /dev/null
+++ b/nixpkgs/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\"')))