3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #107773 from marsam/fix-sonic-darwin

espeak-ng: enable on darwin
This commit is contained in:
Mario Rodas 2020-12-28 06:58:43 -05:00 committed by GitHub
commit 814464a239
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 16 deletions

View file

@ -21,15 +21,16 @@ stdenv.mkDerivation rec {
preConfigure = "./autogen.sh";
postInstall = ''
postInstall = lib.optionalString stdenv.isLinux ''
patchelf --set-rpath "$(patchelf --print-rpath $out/bin/espeak-ng)" $out/bin/speak-ng
'';
meta = with stdenv.lib; {
description = "Open source speech synthesizer that supports over 70 languages, based on eSpeak";
homepage = src.meta.homepage;
homepage = "https://github.com/espeak-ng/espeak-ng";
changelog = "https://github.com/espeak-ng/espeak-ng/blob/${version}/CHANGELOG.md";
license = licenses.gpl3;
maintainers = with maintainers; [ aske ];
platforms = platforms.linux;
platforms = platforms.all;
};
}

View file

@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
version = "1.1";
src = fetchFromGitHub {
owner = "rhdunn";
owner = "espeak-ng";
repo = "pcaudiolib";
rev = version;
sha256 = "0c55hlqqh0m7bcb3nlgv1s4a22s5bgczr1cakjh3767rjb10khi0";
@ -16,15 +16,17 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoconf automake which libtool pkgconfig ];
buildInputs = [ portaudio alsaLib ] ++ lib.optional pulseaudioSupport libpulseaudio;
buildInputs = [ portaudio ]
++ lib.optionals stdenv.isLinux [ alsaLib ]
++ lib.optionals pulseaudioSupport [ libpulseaudio ];
preConfigure = "./autogen.sh";
meta = with stdenv.lib; {
description = "Provides a C API to different audio devices";
homepage = "https://github.com/rhdunn/pcaudiolib";
homepage = "https://github.com/espeak-ng/pcaudiolib";
license = licenses.gpl3;
maintainers = with maintainers; [ aske ];
platforms = platforms.linux;
platforms = platforms.all;
};
}

View file

@ -1,27 +1,33 @@
{ stdenv, fetchFromGitHub, fftw }:
{ stdenv, fetchFromGitHub, fftw, installShellFiles }:
stdenv.mkDerivation {
pname = "sonic";
version = "2018-07-06";
pname = "sonic-unstable";
version = "2020-12-27";
src = fetchFromGitHub {
owner = "waywardgeek";
repo = "sonic";
rev = "71c51195de71627d7443d05378c680ba756545e8";
sha256 = "1z9qdk3pk507hdg39v2z1hanlw2wv7mhn8br4cb8qry9z9qwi87i";
rev = "4a052d9774387a9d9b4af627f6a74e1694419960";
sha256 = "0ah54nizb6iwcx277w104wsfnx05vrp4sh56d2pfxhf8xghg54m6";
};
postPatch = ''
sed -i "s,^PREFIX=.*,PREFIX=$out," Makefile
'';
makeFlags = [ "PREFIX=${placeholder "out"}" "CC=cc" ];
nativeBuildInputs = [ installShellFiles ];
buildInputs = [ fftw ];
postInstall = ''
installManPage sonic.1
'' + stdenv.lib.optionalString stdenv.isDarwin ''
install_name_tool -id $out/lib/libsonic.so.0.3.0 $out/lib/libsonic.so.0.3.0
'';
meta = with stdenv.lib; {
description = "Simple library to speed up or slow down speech";
homepage = "https://github.com/waywardgeek/sonic";
license = licenses.asl20;
maintainers = with maintainers; [ aske ];
platforms = platforms.linux;
platforms = platforms.all;
};
}