2021-10-01 12:39:21 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, pkg-config, qt5, cmake
|
2019-10-07 23:44:48 +00:00
|
|
|
, avahi, boost, libopus, libsndfile, protobuf, speex, libcap
|
2021-06-10 02:57:09 +00:00
|
|
|
, alsa-lib, python3
|
2019-11-06 02:20:09 +00:00
|
|
|
, rnnoise
|
2021-10-01 12:39:21 +00:00
|
|
|
, nixosTests
|
|
|
|
, poco
|
|
|
|
, flac
|
|
|
|
, libogg
|
|
|
|
, libvorbis
|
|
|
|
, grpcSupport ? false, grpc, which
|
|
|
|
, iceSupport ? true, zeroc-ice
|
2021-02-22 07:25:35 +00:00
|
|
|
, jackSupport ? false, libjack2
|
2021-10-01 12:39:21 +00:00
|
|
|
, pipewireSupport ? true, pipewire
|
|
|
|
, pulseSupport ? true, libpulseaudio
|
2021-02-22 07:25:35 +00:00
|
|
|
, speechdSupport ? false, speechd
|
2014-01-31 01:01:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2021-10-01 12:39:21 +00:00
|
|
|
generic = overrides: source: stdenv.mkDerivation (source // overrides // {
|
2019-12-09 12:18:39 +00:00
|
|
|
pname = overrides.type;
|
|
|
|
version = source.version;
|
2015-10-04 05:21:11 +00:00
|
|
|
|
2021-10-01 12:39:21 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config python3 qt5.wrapQtAppsHook qt5.qttools ]
|
2015-10-04 05:21:11 +00:00
|
|
|
++ (overrides.nativeBuildInputs or [ ]);
|
2019-04-22 21:48:14 +00:00
|
|
|
|
2021-10-01 12:39:21 +00:00
|
|
|
buildInputs = [ avahi boost poco protobuf ]
|
2015-10-04 05:21:11 +00:00
|
|
|
++ (overrides.buildInputs or [ ]);
|
|
|
|
|
2021-10-01 12:39:21 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-D g15=OFF"
|
|
|
|
] ++ (overrides.configureFlags or [ ]);
|
2015-10-04 05:21:11 +00:00
|
|
|
|
2016-04-16 23:38:29 +00:00
|
|
|
preConfigure = ''
|
2017-03-31 20:11:16 +00:00
|
|
|
patchShebangs scripts
|
2015-10-04 05:21:11 +00:00
|
|
|
'';
|
|
|
|
|
2020-04-16 07:21:21 +00:00
|
|
|
passthru.tests.connectivity = nixosTests.mumble;
|
|
|
|
|
2021-02-22 07:25:35 +00:00
|
|
|
meta = with lib; {
|
2015-10-04 05:21:11 +00:00
|
|
|
description = "Low-latency, high quality voice chat software";
|
2019-12-09 12:18:39 +00:00
|
|
|
homepage = "https://mumble.info";
|
2015-10-04 05:21:11 +00:00
|
|
|
license = licenses.bsd3;
|
2021-07-02 00:57:10 +00:00
|
|
|
maintainers = with maintainers; [ petabyteboy infinisil felixsinger ];
|
2015-10-04 05:21:11 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
client = source: generic {
|
|
|
|
type = "mumble";
|
|
|
|
|
2019-10-07 23:44:48 +00:00
|
|
|
nativeBuildInputs = [ qt5.qttools ];
|
2021-10-01 12:39:21 +00:00
|
|
|
buildInputs = [ flac libogg libopus libsndfile libvorbis qt5.qtsvg rnnoise speex ]
|
|
|
|
++ lib.optional (!jackSupport) alsa-lib
|
2021-02-22 07:25:35 +00:00
|
|
|
++ lib.optional jackSupport libjack2
|
|
|
|
++ lib.optional speechdSupport speechd
|
2021-10-01 12:39:21 +00:00
|
|
|
++ lib.optional pulseSupport libpulseaudio
|
|
|
|
++ lib.optional pipewireSupport pipewire;
|
2015-10-04 05:21:11 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
2021-10-01 12:39:21 +00:00
|
|
|
"-D server=OFF"
|
|
|
|
"-D bundled-celt=ON"
|
|
|
|
"-D bundled-opus=OFF"
|
|
|
|
"-D bundled-speex=OFF"
|
|
|
|
"-D bundled-rnnoise=OFF"
|
|
|
|
"-D bundle-qt-translations=OFF"
|
|
|
|
"-D update=OFF"
|
|
|
|
"-D overlay-xcompile=OFF"
|
|
|
|
"-D oss=OFF"
|
|
|
|
] ++ lib.optional (!speechdSupport) "-D speechd=OFF"
|
|
|
|
++ lib.optional (!pulseSupport) "-D pulseaudio=OFF"
|
|
|
|
++ lib.optional (!pipewireSupport) "-D pipewire=OFF"
|
|
|
|
++ lib.optional jackSupport "-D alsa=OFF -D jackaudio=ON";
|
2015-10-04 05:21:11 +00:00
|
|
|
|
2021-02-22 07:25:35 +00:00
|
|
|
NIX_CFLAGS_COMPILE = lib.optional speechdSupport "-I${speechd}/include/speech-dispatcher";
|
2016-04-22 23:21:34 +00:00
|
|
|
|
2021-10-01 12:39:21 +00:00
|
|
|
postFixup = ''
|
|
|
|
wrapProgram $out/bin/mumble \
|
|
|
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath (lib.optional pulseSupport libpulseaudio ++ lib.optional pipewireSupport pipewire)}"
|
2015-10-04 05:21:11 +00:00
|
|
|
'';
|
|
|
|
} source;
|
|
|
|
|
2019-09-14 08:49:38 +00:00
|
|
|
server = source: generic {
|
2015-10-04 05:21:11 +00:00
|
|
|
type = "murmur";
|
|
|
|
|
|
|
|
configureFlags = [
|
2021-10-01 12:39:21 +00:00
|
|
|
"-D client=OFF"
|
|
|
|
] ++ lib.optional (!iceSupport) "-D ice=OFF"
|
|
|
|
++ lib.optionals iceSupport [
|
|
|
|
"-D Ice_HOME=${lib.getDev zeroc-ice};${lib.getLib zeroc-ice}"
|
|
|
|
"-D CMAKE_PREFIX_PATH=${lib.getDev zeroc-ice};${lib.getLib zeroc-ice}"
|
|
|
|
"-D Ice_SLICE_DIR=${lib.getDev zeroc-ice}/share/ice/slice"
|
|
|
|
]
|
|
|
|
++ lib.optional grpcSupport "-D grpc=ON";
|
2015-10-04 05:21:11 +00:00
|
|
|
|
2020-08-28 20:11:27 +00:00
|
|
|
buildInputs = [ libcap ]
|
2021-02-22 07:25:35 +00:00
|
|
|
++ lib.optional iceSupport zeroc-ice
|
2021-03-13 23:15:33 +00:00
|
|
|
++ lib.optionals grpcSupport [ grpc which ];
|
2019-09-06 16:09:28 +00:00
|
|
|
} source;
|
2015-10-04 05:21:11 +00:00
|
|
|
|
2019-09-14 08:49:38 +00:00
|
|
|
source = rec {
|
2021-10-01 12:39:21 +00:00
|
|
|
version = "unstable-1.4.231";
|
2015-10-04 05:21:11 +00:00
|
|
|
|
2016-04-22 23:22:03 +00:00
|
|
|
# Needs submodules
|
2018-07-07 15:53:35 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mumble-voip";
|
|
|
|
repo = "mumble";
|
2021-10-01 12:39:21 +00:00
|
|
|
rev = "9e0e274d6a9d8a9919267e747d05d0500d150560";
|
|
|
|
sha256 = "0whvb4nlf7gjf2v7wsaq0ir18mshhw5wi8c9q9qz43wnh42nn2qi";
|
2018-07-07 15:53:35 +00:00
|
|
|
fetchSubmodules = true;
|
2015-10-04 05:21:11 +00:00
|
|
|
};
|
2011-02-10 19:23:27 +00:00
|
|
|
};
|
2015-10-04 05:21:11 +00:00
|
|
|
in {
|
2019-09-14 08:49:38 +00:00
|
|
|
mumble = client source;
|
|
|
|
murmur = server source;
|
2011-02-10 19:23:27 +00:00
|
|
|
}
|