about summary refs log tree commit diff
path: root/pkgs/applications/audio/rhvoice
diff options
context:
space:
mode:
authorRobert Schütz <nix@dotlambda.de>2022-01-16 16:53:09 +0000
committerRobert Schütz <github@dotlambda.de>2022-05-14 19:03:52 -0700
commit62753a4f396a2b88ac86377e55306f823859462c (patch)
tree594e996edca413cf9040a069827561a280a5ed24 /pkgs/applications/audio/rhvoice
parent1d370bd07399fb52cea6badfbffbc90ac9b0f8f0 (diff)
rhvoice: unstable-2018-02-10 -> 1.6.0
Diffstat (limited to 'pkgs/applications/audio/rhvoice')
-rw-r--r--pkgs/applications/audio/rhvoice/default.nix54
-rw-r--r--pkgs/applications/audio/rhvoice/honor_nix_environment.patch20
2 files changed, 50 insertions, 24 deletions
diff --git a/pkgs/applications/audio/rhvoice/default.nix b/pkgs/applications/audio/rhvoice/default.nix
index ca51001dd62e1..f72b8404104a3 100644
--- a/pkgs/applications/audio/rhvoice/default.nix
+++ b/pkgs/applications/audio/rhvoice/default.nix
@@ -1,36 +1,50 @@
-{ stdenv, lib, pkg-config, fetchFromGitHub, sconsPackages
-, glibmm, libpulseaudio, libao }:
+{ lib
+, stdenv
+, fetchFromGitHub
+, ensureNewerSourcesForZipFilesHook
+, pkg-config
+, scons
+, glibmm
+, libpulseaudio
+, libao
+, speechd
+}:
 
-let
-  version = "unstable-2018-02-10";
-in stdenv.mkDerivation {
+stdenv.mkDerivation rec {
   pname = "rhvoice";
-  inherit version;
+  version = "1.6.0";
 
   src = fetchFromGitHub {
-    owner = "Olga-Yakovleva";
+    owner = "RHVoice";
     repo = "RHVoice";
-    rev = "7a25a881b0465e47a12d8029b56f3b71a1d02312";
-    sha256 = "1gkrlmv7msh9qlm0gkjqpl9gswghpclfdwszr1p85v8vk6m63v0b";
+    rev = version;
+    fetchSubmodules = true;
+    hash = "sha256-5iq+St/fqGMeJu2XaiCmgzBpxqE9IQLnKlfZErd1fPs=";
   };
 
+  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 = [
-    sconsPackages.scons_3_1_2 pkg-config
+    ensureNewerSourcesForZipFilesHook
+    pkg-config
+    scons
   ];
 
   buildInputs = [
-    glibmm libpulseaudio libao
+    glibmm
+    libpulseaudio
+    libao
+    speechd
   ];
 
-  # 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";
diff --git a/pkgs/applications/audio/rhvoice/honor_nix_environment.patch b/pkgs/applications/audio/rhvoice/honor_nix_environment.patch
index ed180c92debc3..1c0c9d3ee45ee 100644
--- a/pkgs/applications/audio/rhvoice/honor_nix_environment.patch
+++ b/pkgs/applications/audio/rhvoice/honor_nix_environment.patch
@@ -1,14 +1,26 @@
 diff --git a/SConstruct b/SConstruct
-index 2421399..ba39254 100644
+index b29168f..d507b95 100644
 --- a/SConstruct
 +++ b/SConstruct
-@@ -147,6 +147,9 @@ def create_base_env(vars):
+@@ -93,6 +93,8 @@ def CheckWiX(context):
+ 
+ def get_spd_module_dir():
+     env = Environment()
++    env.PrependENVPath("PATH", os.environ["PATH"])
++    env["ENV"]["PKG_CONFIG_PATH"]=os.environ["PKG_CONFIG_PATH"]
+     return env.ParseConfig("pkg-config speech-dispatcher --variable=modulebindir", passthru)
+ 
+ def validate_spd_version(key,val,env):
+@@ -202,9 +204,9 @@ def create_base_env(user_vars):
      env_args["package_name"]="RHVoice"
      env_args["CPPDEFINES"]=[("RHVOICE","1")]
      env=Environment(**env_args)
+-    if env["dev"]:
+-        env["prefix"]=os.path.abspath("local")
+-        env["RPATH"]=env.Dir("$libdir").abspath
 +    env.PrependENVPath("PATH", os.environ["PATH"])
 +    env["ENV"]["PKG_CONFIG_PATH"]=os.environ["PKG_CONFIG_PATH"]
-+    env["RPATH"]=env["libdir"]
++    env["RPATH"]=env.Dir("$libdir").abspath
      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\"')))
+     if env["PLATFORM"]=="win32":