2015-04-08 13:49:23 +02:00
|
|
|
{ stdenv, fetchurl, pkgconfig
|
2015-07-31 12:41:43 +02:00
|
|
|
, avahi, boost, libopus, celt, libsndfile, protobuf, qt4, speex
|
2015-04-26 08:32:04 +02:00
|
|
|
, jackSupport ? false, libjack2 ? null
|
2015-04-08 13:49:23 +02:00
|
|
|
, speechdSupport ? false, speechd ? null
|
2015-04-26 08:32:04 +02:00
|
|
|
, pulseSupport ? false, libpulseaudio ? null
|
2014-01-31 02:01:22 +01:00
|
|
|
}:
|
|
|
|
|
2015-04-26 08:32:04 +02:00
|
|
|
assert jackSupport -> libjack2 != null;
|
2014-01-31 02:01:22 +01:00
|
|
|
assert speechdSupport -> speechd != null;
|
2015-04-26 08:32:04 +02:00
|
|
|
assert pulseSupport -> libpulseaudio != null;
|
2014-01-31 02:01:22 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
optional = stdenv.lib.optional;
|
|
|
|
optionalString = stdenv.lib.optionalString;
|
|
|
|
in
|
2011-02-10 20:23:27 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2015-04-26 08:32:04 +02:00
|
|
|
name = "mumble-${version}";
|
2015-07-10 20:18:04 +02:00
|
|
|
version = "1.2.10";
|
2011-02-10 20:23:27 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-07-10 20:18:04 +02:00
|
|
|
url = "https://github.com/mumble-voip/mumble/releases/download/${version}/${name}.tar.gz";
|
|
|
|
sha256 = "012vm0xf84x13414jlsx964c5a1nwnbn41jnspkciajlxxipldn6";
|
2011-02-10 20:23:27 +01:00
|
|
|
};
|
|
|
|
|
2014-01-31 02:01:22 +01:00
|
|
|
patches = optional jackSupport ./mumble-jack-support.patch;
|
2011-02-10 20:23:27 +01:00
|
|
|
|
2015-04-08 13:49:23 +02:00
|
|
|
configureFlags = [
|
|
|
|
"CONFIG+=shared"
|
|
|
|
"CONFIG+=no-g15"
|
|
|
|
"CONFIG+=packaged"
|
|
|
|
"CONFIG+=no-update"
|
|
|
|
"CONFIG+=no-server"
|
|
|
|
"CONFIG+=no-embed-qt-translations"
|
2015-07-31 12:41:43 +02:00
|
|
|
"CONFIG+=no-bundled-celt"
|
2015-04-08 13:49:23 +02:00
|
|
|
"CONFIG+=no-bundled-opus"
|
|
|
|
"CONFIG+=no-bundled-speex"
|
|
|
|
] ++ optional (!speechdSupport) "CONFIG+=no-speechd"
|
|
|
|
++ optional jackSupport "CONFIG+=no-oss CONFIG+=no-alsa CONFIG+=jackaudio";
|
|
|
|
|
2011-02-12 21:31:25 +01:00
|
|
|
configurePhase = ''
|
2015-04-08 13:49:23 +02:00
|
|
|
qmake $configureFlags
|
2011-02-12 21:31:25 +01:00
|
|
|
'';
|
2011-02-10 20:23:27 +01:00
|
|
|
|
2015-04-08 13:49:23 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2011-05-10 09:07:35 +02:00
|
|
|
|
2015-07-31 12:41:43 +02:00
|
|
|
NIX_CFLAGS_COMPILE = [ "-I${celt}/include/celt" ];
|
|
|
|
|
|
|
|
buildInputs = [ avahi boost libopus celt libsndfile protobuf qt4 speex ]
|
2015-04-26 08:32:04 +02:00
|
|
|
++ optional jackSupport libjack2
|
2015-04-08 13:49:23 +02:00
|
|
|
++ optional speechdSupport speechd
|
2015-04-26 08:32:04 +02:00
|
|
|
++ optional pulseSupport libpulseaudio;
|
2011-02-10 20:23:27 +01:00
|
|
|
|
2011-04-17 10:27:04 +02:00
|
|
|
installPhase = ''
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out
|
2011-04-17 10:27:04 +02:00
|
|
|
cp -r ./release $out/bin
|
2015-04-08 13:49:23 +02:00
|
|
|
|
|
|
|
mkdir -p $out/share/applications
|
|
|
|
cp scripts/mumble.desktop $out/share/applications
|
|
|
|
|
|
|
|
mkdir -p $out/share/icons
|
|
|
|
cp icons/mumble.svg $out/share/icons
|
2011-04-17 10:27:04 +02:00
|
|
|
'';
|
|
|
|
|
2015-04-08 13:49:23 +02:00
|
|
|
meta = with stdenv.lib; {
|
2011-02-10 20:23:27 +01:00
|
|
|
description = "Low-latency, high quality voice chat software";
|
2015-04-08 13:49:23 +02:00
|
|
|
homepage = "http://mumble.sourceforge.net/";
|
2014-01-31 02:01:22 +01:00
|
|
|
license = licenses.bsd3;
|
2015-06-22 08:25:07 +02:00
|
|
|
maintainers = with maintainers; [ viric jgeerds ];
|
2015-04-08 13:49:23 +02:00
|
|
|
platforms = platforms.linux;
|
2011-02-10 20:23:27 +01:00
|
|
|
};
|
|
|
|
}
|