2015-10-04 06:21:11 +01:00
|
|
|
{ stdenv, fetchurl, fetchgit, pkgconfig
|
2016-04-17 00:38:29 +01:00
|
|
|
, qt4, qmake4Hook, qt5, avahi, boost, libopus, libsndfile, protobuf, speex, libcap
|
2015-10-04 06:21:11 +01:00
|
|
|
, alsaLib
|
2015-04-26 07:32:04 +01:00
|
|
|
, jackSupport ? false, libjack2 ? null
|
2015-04-08 12:49:23 +01:00
|
|
|
, speechdSupport ? false, speechd ? null
|
2015-04-26 07:32:04 +01:00
|
|
|
, pulseSupport ? false, libpulseaudio ? null
|
2015-10-04 06:21:11 +01:00
|
|
|
, iceSupport ? false, zeroc_ice ? null
|
2014-01-31 01:01:22 +00:00
|
|
|
}:
|
|
|
|
|
2015-04-26 07:32:04 +01:00
|
|
|
assert jackSupport -> libjack2 != null;
|
2014-01-31 01:01:22 +00:00
|
|
|
assert speechdSupport -> speechd != null;
|
2015-04-26 07:32:04 +01:00
|
|
|
assert pulseSupport -> libpulseaudio != null;
|
2015-10-04 06:21:11 +01:00
|
|
|
assert iceSupport -> zeroc_ice != null;
|
2014-01-31 01:01:22 +00:00
|
|
|
|
2015-10-04 06:21:11 +01:00
|
|
|
with stdenv.lib;
|
2014-01-31 01:01:22 +00:00
|
|
|
let
|
2015-10-04 06:21:11 +01:00
|
|
|
generic = overrides: source: stdenv.mkDerivation (source // overrides // {
|
|
|
|
name = "${overrides.type}-${source.version}";
|
|
|
|
|
|
|
|
patches = optional jackSupport ./mumble-jack-support.patch;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgconfig ]
|
2016-04-17 00:38:29 +01:00
|
|
|
++ { qt4 = [ qmake4Hook ]; qt5 = [ qt5.qmakeHook ]; }."qt${toString source.qtVersion}"
|
2015-10-04 06:21:11 +01:00
|
|
|
++ (overrides.nativeBuildInputs or [ ]);
|
|
|
|
buildInputs = [ boost protobuf avahi ]
|
2015-11-11 04:08:58 +00:00
|
|
|
++ { qt4 = [ qt4 ]; qt5 = [ qt5.qtbase ]; }."qt${toString source.qtVersion}"
|
2015-10-04 06:21:11 +01:00
|
|
|
++ (overrides.buildInputs or [ ]);
|
|
|
|
|
2016-04-17 00:38:29 +01:00
|
|
|
qmakeFlags = [
|
2015-10-04 06:21:11 +01:00
|
|
|
"CONFIG+=shared"
|
|
|
|
"CONFIG+=no-g15"
|
|
|
|
"CONFIG+=packaged"
|
|
|
|
"CONFIG+=no-update"
|
|
|
|
"CONFIG+=no-embed-qt-translations"
|
2015-10-12 15:04:49 +01:00
|
|
|
"CONFIG+=bundled-celt"
|
2015-10-04 06:21:11 +01:00
|
|
|
"CONFIG+=no-bundled-opus"
|
|
|
|
"CONFIG+=no-bundled-speex"
|
|
|
|
] ++ optional (!speechdSupport) "CONFIG+=no-speechd"
|
|
|
|
++ optional jackSupport "CONFIG+=no-oss CONFIG+=no-alsa CONFIG+=jackaudio"
|
2016-09-25 10:24:43 +01:00
|
|
|
++ optional (!iceSupport) "CONFIG+=no-ice"
|
2015-10-04 06:21:11 +01:00
|
|
|
++ (overrides.configureFlags or [ ]);
|
|
|
|
|
2016-04-17 00:38:29 +01:00
|
|
|
preConfigure = ''
|
|
|
|
qmakeFlags="$qmakeFlags DEFINES+=PLUGIN_PATH=$out/lib"
|
2015-10-04 06:21:11 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
makeFlags = [ "release" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/{lib,bin}
|
|
|
|
find release -type f -not -name \*.\* -exec cp {} $out/bin \;
|
|
|
|
find release -type f -name \*.\* -exec cp {} $out/lib \;
|
|
|
|
|
|
|
|
mkdir -p $out/share/man/man1
|
|
|
|
cp man/mum* $out/share/man/man1
|
|
|
|
'' + (overrides.installPhase or "");
|
|
|
|
|
2016-01-03 00:30:32 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2015-10-04 06:21:11 +01:00
|
|
|
meta = {
|
|
|
|
description = "Low-latency, high quality voice chat software";
|
|
|
|
homepage = "http://mumble.sourceforge.net/";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ viric jgeerds wkennington ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
client = source: generic {
|
|
|
|
type = "mumble";
|
|
|
|
|
2017-03-31 16:33:08 +01:00
|
|
|
nativeBuildInputs = optionals (source.qtVersion == 5) [ qt5.qttools qt5.makeQtWrapper ];
|
2015-10-12 15:04:49 +01:00
|
|
|
buildInputs = [ libopus libsndfile speex ]
|
2015-11-11 04:08:58 +00:00
|
|
|
++ optional (source.qtVersion == 5) qt5.qtsvg
|
2015-10-04 06:21:11 +01:00
|
|
|
++ optional stdenv.isLinux alsaLib
|
|
|
|
++ optional jackSupport libjack2
|
|
|
|
++ optional speechdSupport speechd
|
|
|
|
++ optional pulseSupport libpulseaudio;
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"CONFIG+=no-server"
|
|
|
|
];
|
|
|
|
|
2016-04-23 00:21:34 +01:00
|
|
|
NIX_CFLAGS_COMPILE = optional speechdSupport "-I${speechd}/include/speech-dispatcher";
|
|
|
|
|
2015-10-04 06:21:11 +01:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share/applications
|
|
|
|
cp scripts/mumble.desktop $out/share/applications
|
|
|
|
|
|
|
|
mkdir -p $out/share/icons{,/hicolor/scalable/apps}
|
|
|
|
cp icons/mumble.svg $out/share/icons
|
|
|
|
ln -s $out/share/icon/mumble.svg $out/share/icons/hicolor/scalable/apps
|
2017-03-31 16:33:08 +01:00
|
|
|
|
|
|
|
${optionalString (source.qtVersion == 5) ''
|
|
|
|
wrapQtProgram $out/bin/mumble
|
|
|
|
''}
|
2015-10-04 06:21:11 +01:00
|
|
|
'';
|
|
|
|
} source;
|
|
|
|
|
|
|
|
server = generic {
|
|
|
|
type = "murmur";
|
|
|
|
|
|
|
|
postPatch = optional iceSupport ''
|
2015-12-31 19:01:41 +00:00
|
|
|
grep -Rl '/usr/share/Ice' . | xargs sed -i 's,/usr/share/Ice/,${zeroc_ice}/,g'
|
2015-10-04 06:21:11 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"CONFIG+=no-client"
|
|
|
|
];
|
|
|
|
|
2016-10-01 21:38:06 +01:00
|
|
|
buildInputs = [ libcap ] ++ optional iceSupport zeroc_ice;
|
2015-10-04 06:21:11 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
stableSource = rec {
|
2017-02-23 22:28:06 +00:00
|
|
|
version = "1.2.19";
|
2015-10-04 06:21:11 +01:00
|
|
|
qtVersion = 4;
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/mumble-voip/mumble/releases/download/${version}/mumble-${version}.tar.gz";
|
2017-02-23 22:28:06 +00:00
|
|
|
sha256 = "1s60vaici3v034jzzi20x23hsj6mkjlc0glipjq4hffrg9qgnizh";
|
2015-10-04 06:21:11 +01:00
|
|
|
};
|
2011-02-10 19:23:27 +00:00
|
|
|
};
|
|
|
|
|
2015-10-04 06:21:11 +01:00
|
|
|
gitSource = rec {
|
2016-04-23 00:22:03 +01:00
|
|
|
version = "1.3.0-git-2016-04-10";
|
2015-10-04 06:21:11 +01:00
|
|
|
qtVersion = 5;
|
|
|
|
|
2016-04-23 00:22:03 +01:00
|
|
|
# Needs submodules
|
2015-10-04 06:21:11 +01:00
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/mumble-voip/mumble";
|
2016-04-23 00:22:03 +01:00
|
|
|
rev = "0502fa67b036bae9f07a586d9f05a8bf74c24291";
|
2016-06-02 12:26:44 +01:00
|
|
|
sha256 = "07c1r26i0b5z7i787nr4mc60799skdzsh764ckk3gdi76agp2r2z";
|
2015-10-04 06:21:11 +01:00
|
|
|
};
|
2011-02-10 19:23:27 +00:00
|
|
|
};
|
2015-10-04 06:21:11 +01:00
|
|
|
in {
|
|
|
|
mumble = client stableSource;
|
|
|
|
mumble_git = client gitSource;
|
|
|
|
murmur = server stableSource;
|
2017-03-30 14:42:26 +01:00
|
|
|
murmur_git = (server gitSource).overrideAttrs (old: {
|
|
|
|
meta = old.meta // { broken = true; };
|
|
|
|
});
|
2011-02-10 19:23:27 +00:00
|
|
|
}
|