mumble: Small Fixups and add support for disabling speechd

This patch adds a collection of changes to clean up the mumble
expression as well as add support for disabling the external speech
dispatcher from being compiled in.
This commit is contained in:
William A. Kennington III 2014-01-30 19:01:22 -06:00
parent 1dd0e05866
commit 2ec67167d9
2 changed files with 25 additions and 17 deletions

View File

@ -1,9 +1,18 @@
{ stdenv, fetchurl, qt4, boost, speechd, protobuf, libsndfile, { stdenv, fetchurl, qt4, boost, protobuf, libsndfile
speex, libopus, avahi, pkgconfig, , speex, libopus, avahi, pkgconfig
jackSupport ? false, , jackSupport ? false
jackaudio ? null }: , jackaudio ? null
, speechdSupport ? false
, speechd ? null
}:
assert jackSupport -> jackaudio != null;
assert speechdSupport -> speechd != null;
let
optional = stdenv.lib.optional;
optionalString = stdenv.lib.optionalString;
in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "mumble-" + version; name = "mumble-" + version;
version = "1.2.4"; version = "1.2.4";
@ -13,35 +22,33 @@ stdenv.mkDerivation rec {
sha256 = "16wwj6gwcnyjlnzh7wk0l255ldxmbwx0wi652sdp20lsv61q7kx1"; sha256 = "16wwj6gwcnyjlnzh7wk0l255ldxmbwx0wi652sdp20lsv61q7kx1";
}; };
patchPhase = '' patches = optional jackSupport ./mumble-jack-support.patch;
patch -p1 < ${ ./mumble-jack-support.patch }
'';
configurePhase = '' configurePhase = ''
qmake CONFIG+=no-g15 CONFIG+=no-update CONFIG+=no-server \ qmake CONFIG+=no-g15 CONFIG+=no-update CONFIG+=no-server \
CONFIG+=no-embed-qt-translations CONFIG+=packaged \ CONFIG+=no-embed-qt-translations CONFIG+=packaged \
CONFIG+=bundled-celt CONFIG+=no-bundled-opus \ CONFIG+=bundled-celt CONFIG+=no-bundled-opus \
${optionalString (!speechdSupport) "CONFIG+=no-speechd"} \
${optionalString jackSupport "CONFIG+=no-oss CONFIG+=no-alsa CONFIG+=jackaudio"} \
CONFIG+=no-bundled-speex CONFIG+=no-bundled-speex
''
+ stdenv.lib.optionalString jackSupport ''
CONFIG+=no-oss CONFIG+=no-alsa CONFIG+=jackaudio
''; '';
buildInputs = [ qt4 boost speechd protobuf libsndfile speex buildInputs = [ qt4 boost protobuf libsndfile speex
libopus avahi pkgconfig ] libopus avahi pkgconfig ]
++ (stdenv.lib.optional jackSupport jackaudio); ++ (optional jackSupport jackaudio)
++ (optional speechdSupport speechd);
installPhase = '' installPhase = ''
mkdir -p $out mkdir -p $out
cp -r ./release $out/bin cp -r ./release $out/bin
''; '';
meta = { meta = with stdenv.lib; {
homepage = http://mumble.sourceforge.net/; homepage = "http://mumble.sourceforge.net/";
description = "Low-latency, high quality voice chat software"; description = "Low-latency, high quality voice chat software";
license = "BSD"; license = licenses.bsd3;
platforms = with stdenv.lib.platforms; linux; platforms = platforms.linux;
maintainers = with stdenv.lib.maintainers; [viric]; maintainers = with maintainers; [ viric ];
}; };
} }

View File

@ -8371,6 +8371,7 @@ let
withLibdnssdCompat = true; withLibdnssdCompat = true;
}; };
jackSupport = config.mumble.jackSupport or false; jackSupport = config.mumble.jackSupport or false;
speechdSupport = config.mumble.speechdSupport or false;
}; };
murmur = callPackage ../applications/networking/mumble/murmur.nix { murmur = callPackage ../applications/networking/mumble/murmur.nix {