2022-11-08 09:44:09 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, 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
|
|
|
|
, 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
|
|
|
|
2023-05-12 19:26:57 +00:00
|
|
|
patches = [
|
|
|
|
./0001-BUILD-crypto-Migrate-to-OpenSSL-3.0-compatible-API.patch
|
2023-05-19 20:59:31 +00:00
|
|
|
# fix crash caused by openssl3 thread unsafe evp implementation
|
|
|
|
# see https://github.com/mumble-voip/mumble/issues/5361#issuecomment-1173001440
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/mumble-voip/mumble/commit/f8d47db318f302f5a7d343f15c9936c7030c49c4.patch";
|
|
|
|
hash = "sha256-xk8vBrPwvQxHCY8I6WQJAyaBGHmlH9NCixweP6FyakU=";
|
|
|
|
})
|
2023-05-17 00:12:21 +00:00
|
|
|
./0002-FIX-positional-audio-Force-8-bytes-alignment-for-CCa.patch
|
2023-05-12 19:26:57 +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;
|
2022-06-22 22:51:46 +00:00
|
|
|
maintainers = with maintainers; [ 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
|
|
|
|
2023-02-20 15:26:44 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = lib.optionalString 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"
|
2023-08-18 05:49:06 +00:00
|
|
|
];
|
2015-10-04 05:21:11 +00:00
|
|
|
|
2020-08-28 20:11:27 +00:00
|
|
|
buildInputs = [ libcap ]
|
2023-08-18 05:49:06 +00:00
|
|
|
++ lib.optional iceSupport zeroc-ice;
|
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 {
|
2022-09-16 20:37:27 +00:00
|
|
|
version = "1.4.287";
|
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";
|
2022-09-16 20:37:27 +00:00
|
|
|
rev = "5d808e287e99b402b724e411a7a0848e00956a24";
|
|
|
|
sha256 = "sha256-SYsGCuj3HeyAQRUecGLaRdJR9Rm7lbaM54spY/zx0jU=";
|
2018-07-07 15:53:35 +00:00
|
|
|
fetchSubmodules = true;
|
2015-10-04 05:21:11 +00:00
|
|
|
};
|
2022-11-08 09:44:09 +00:00
|
|
|
|
|
|
|
patches = [
|
|
|
|
# fixes 'static assertion failed: static_assert(sizeof(CCameraAngles) == 0x408, "");'
|
|
|
|
# when compiling pkgsi686Linux.mumble, which is a dependency of x64 mumble_overlay
|
|
|
|
# https://github.com/mumble-voip/mumble/pull/5850
|
|
|
|
# Remove with next version update
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/mumble-voip/mumble/commit/13c051b36b387356815cff5d685bc628b74ba136.patch";
|
|
|
|
hash = "sha256-Rq8fb6NFd4DCNWm6OOMYIP7tBllufmQcB5CSxPU4qqg=";
|
|
|
|
})
|
|
|
|
];
|
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
|
|
|
}
|