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