2019-07-05 16:42:08 +01:00
|
|
|
{ stdenv, fetchurl, fetchFromGitHub, fetchpatch, pkgconfig
|
2019-04-22 22:48:14 +01:00
|
|
|
, qt4, qmake4Hook, qt5, avahi, boost, libopus, libsndfile, protobuf3_6, speex, libcap
|
2017-03-31 21:11:16 +01:00
|
|
|
, alsaLib, python
|
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
|
2019-09-06 17:09:28 +01:00
|
|
|
, iceSupport ? false, zeroc-ice ? null, zeroc-ice-36 ? 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;
|
2019-09-06 17:09:28 +01:00
|
|
|
assert iceSupport -> zeroc-ice != null && zeroc-ice-36 != 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
|
2019-07-31 22:12:51 +01:00
|
|
|
generic = overrides: source: (if source.qtVersion == 5 then qt5.mkDerivation else stdenv.mkDerivation) (source // overrides // {
|
2015-10-04 06:21:11 +01:00
|
|
|
name = "${overrides.type}-${source.version}";
|
|
|
|
|
2018-01-31 15:41:15 +00:00
|
|
|
patches = (source.patches or []) ++ optional jackSupport ./mumble-jack-support.patch;
|
2015-10-04 06:21:11 +01:00
|
|
|
|
2017-03-31 21:11:16 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig python ]
|
2017-06-02 16:40:19 +01:00
|
|
|
++ { qt4 = [ qmake4Hook ]; qt5 = [ qt5.qmake ]; }."qt${toString source.qtVersion}"
|
2015-10-04 06:21:11 +01:00
|
|
|
++ (overrides.nativeBuildInputs or [ ]);
|
2019-04-22 22:48:14 +01:00
|
|
|
|
|
|
|
# protobuf is freezed to 3.6 because of this bug: https://github.com/mumble-voip/mumble/issues/3617
|
|
|
|
# this could be reverted to the latest version in a future release of mumble as it is already fixed in master
|
|
|
|
buildInputs = [ boost protobuf3_6 avahi ]
|
2019-07-31 22:12:51 +01:00
|
|
|
++ optional (source.qtVersion == 4) qt4
|
2015-10-04 06:21:11 +01:00
|
|
|
++ (overrides.buildInputs or [ ]);
|
|
|
|
|
2016-04-17 00:38:29 +01:00
|
|
|
qmakeFlags = [
|
2018-09-25 11:43:44 +01:00
|
|
|
"CONFIG+=c++11"
|
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"
|
|
|
|
++ (overrides.configureFlags or [ ]);
|
|
|
|
|
2016-04-17 00:38:29 +01:00
|
|
|
preConfigure = ''
|
2019-07-31 22:12:51 +01:00
|
|
|
qmakeFlags="$qmakeFlags DEFINES+=PLUGIN_PATH=$out/lib/mumble"
|
2017-03-31 21:11:16 +01:00
|
|
|
patchShebangs scripts
|
2015-10-04 06:21:11 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
makeFlags = [ "release" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
2019-07-31 22:12:51 +01:00
|
|
|
runHook preInstall
|
2015-10-04 06:21:11 +01:00
|
|
|
|
2019-07-31 22:12:51 +01:00
|
|
|
${overrides.installPhase}
|
|
|
|
|
|
|
|
# doc stuff
|
2015-10-04 06:21:11 +01:00
|
|
|
mkdir -p $out/share/man/man1
|
2019-07-31 22:12:51 +01:00
|
|
|
install -Dm644 man/mum* $out/share/man/man1/
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
2015-10-04 06:21:11 +01:00
|
|
|
|
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";
|
2017-09-04 00:48:44 +01:00
|
|
|
homepage = https://mumble.info;
|
2015-10-04 06:21:11 +01:00
|
|
|
license = licenses.bsd3;
|
2019-03-12 22:45:33 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2015-10-04 06:21:11 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
client = source: generic {
|
|
|
|
type = "mumble";
|
|
|
|
|
2019-07-31 22:12:51 +01:00
|
|
|
nativeBuildInputs = optional (source.qtVersion == 5) qt5.qttools;
|
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 = ''
|
2019-07-31 22:12:51 +01:00
|
|
|
# bin stuff
|
|
|
|
install -Dm755 release/mumble $out/bin/mumble
|
|
|
|
install -Dm755 scripts/mumble-overlay $out/bin/mumble-overlay
|
|
|
|
|
|
|
|
# lib stuff
|
|
|
|
mkdir -p $out/lib/mumble
|
|
|
|
cp -P release/libmumble.so* $out/lib
|
|
|
|
cp -P release/libcelt* $out/lib/mumble
|
|
|
|
cp -P release/plugins/* $out/lib/mumble
|
|
|
|
|
|
|
|
# icons
|
|
|
|
install -Dm644 scripts/mumble.desktop $out/share/applications/mumble.desktop
|
|
|
|
install -Dm644 icons/mumble.svg $out/share/icons/hicolor/scalable/apps/mumble.svg
|
2015-10-04 06:21:11 +01:00
|
|
|
'';
|
|
|
|
} source;
|
|
|
|
|
2019-09-06 17:09:28 +01:00
|
|
|
server = source: let ice = if source.qtVersion == 4 then zeroc-ice-36 else zeroc-ice; in generic {
|
2015-10-04 06:21:11 +01:00
|
|
|
type = "murmur";
|
|
|
|
|
|
|
|
postPatch = optional iceSupport ''
|
2019-09-06 17:09:28 +01:00
|
|
|
grep -Rl '/usr/share/Ice' . | xargs sed -i 's,/usr/share/Ice/,${ice.dev}/share/ice/,g'
|
2015-10-04 06:21:11 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"CONFIG+=no-client"
|
2019-09-06 17:09:28 +01:00
|
|
|
] ++ optional (!iceSupport) "CONFIG+=no-ice";
|
2015-10-04 06:21:11 +01:00
|
|
|
|
2019-09-06 17:09:28 +01:00
|
|
|
buildInputs = [ libcap ] ++ optional iceSupport ice;
|
2019-07-31 22:12:51 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
# bin stuff
|
|
|
|
install -Dm755 release/murmurd $out/bin/murmurd
|
|
|
|
'';
|
2019-09-06 17:09:28 +01:00
|
|
|
} source;
|
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
|
|
|
};
|
2018-01-31 15:41:15 +00:00
|
|
|
|
2018-10-21 13:21:34 +01:00
|
|
|
patches = [
|
|
|
|
# Fix compile error against boost 1.66 (#33655):
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/mumble-voip/mumble/commit/"
|
|
|
|
+ "ea861fe86743c8402bbad77d8d1dd9de8dce447e.patch";
|
|
|
|
sha256 = "1r50dc8dcl6jmbj4abhnay9div7y56kpmajzqd7ql0pm853agwbh";
|
|
|
|
})
|
|
|
|
# Fixes hang on reconfiguring audio (often including startup)
|
|
|
|
# https://github.com/mumble-voip/mumble/pull/3418
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/mumble-voip/mumble/commit/"
|
|
|
|
+ "fbbdf2e8ab7d93ed6f7680268ad0689b7eaa71ad.patch";
|
|
|
|
sha256 = "1yhj62mlwm6q42i4aclbia645ha97d3j4ycxhgafr46dbjs0gani";
|
|
|
|
})
|
|
|
|
];
|
2011-02-10 19:23:27 +00:00
|
|
|
};
|
|
|
|
|
2019-07-31 22:12:51 +01:00
|
|
|
rcSource = rec {
|
|
|
|
version = "1.3.0-rc2";
|
2015-10-04 06:21:11 +01:00
|
|
|
qtVersion = 5;
|
|
|
|
|
2016-04-23 00:22:03 +01:00
|
|
|
# Needs submodules
|
2018-07-07 16:53:35 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mumble-voip";
|
|
|
|
repo = "mumble";
|
2019-07-31 22:12:51 +01:00
|
|
|
rev = version;
|
2019-06-24 05:29:00 +01:00
|
|
|
sha256 = "00irlzz5q4drmsfbwrkyy7p7w8a5fc1ip5vyicq3g3cy58dprpqr";
|
2018-07-07 16:53:35 +01:00
|
|
|
fetchSubmodules = true;
|
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;
|
2019-07-31 22:12:51 +01:00
|
|
|
mumble_rc = client rcSource;
|
2015-10-04 06:21:11 +01:00
|
|
|
murmur = server stableSource;
|
2019-09-06 17:09:28 +01:00
|
|
|
murmur_rc = server rcSource;
|
2011-02-10 19:23:27 +00:00
|
|
|
}
|