1 { lib, stdenv, fetchFromGitHub, fetchpatch, pkg-config, qt5, cmake
2 , avahi, boost, libopus, libsndfile, protobuf, speex, libcap
10 , iceSupport ? true, zeroc-ice
11 , jackSupport ? false, libjack2
12 , pipewireSupport ? true, pipewire
13 , pulseSupport ? true, libpulseaudio
14 , speechdSupport ? false, speechd
18 generic = overrides: source: stdenv.mkDerivation (source // overrides // {
19 pname = overrides.type;
20 version = source.version;
23 ./0001-BUILD-crypto-Migrate-to-OpenSSL-3.0-compatible-API.patch
24 # fix crash caused by openssl3 thread unsafe evp implementation
25 # see https://github.com/mumble-voip/mumble/issues/5361#issuecomment-1173001440
27 url = "https://github.com/mumble-voip/mumble/commit/f8d47db318f302f5a7d343f15c9936c7030c49c4.patch";
28 hash = "sha256-xk8vBrPwvQxHCY8I6WQJAyaBGHmlH9NCixweP6FyakU=";
30 ./0002-FIX-positional-audio-Force-8-bytes-alignment-for-CCa.patch
33 nativeBuildInputs = [ cmake pkg-config python3 qt5.wrapQtAppsHook qt5.qttools ]
34 ++ (overrides.nativeBuildInputs or [ ]);
36 buildInputs = [ avahi boost poco protobuf ]
37 ++ (overrides.buildInputs or [ ]);
41 ] ++ (overrides.configureFlags or [ ]);
47 passthru.tests.connectivity = nixosTests.mumble;
50 description = "Low-latency, high quality voice chat software";
51 homepage = "https://mumble.info";
52 license = licenses.bsd3;
53 maintainers = with maintainers; [ infinisil felixsinger ];
54 platforms = platforms.linux;
58 client = source: generic {
61 nativeBuildInputs = [ qt5.qttools ];
62 buildInputs = [ flac libogg libopus libsndfile libvorbis qt5.qtsvg rnnoise speex ]
63 ++ lib.optional (!jackSupport) alsa-lib
64 ++ lib.optional jackSupport libjack2
65 ++ lib.optional speechdSupport speechd
66 ++ lib.optional pulseSupport libpulseaudio
67 ++ lib.optional pipewireSupport pipewire;
73 "-D bundled-speex=OFF"
74 "-D bundled-rnnoise=OFF"
75 "-D bundle-qt-translations=OFF"
77 "-D overlay-xcompile=OFF"
79 ] ++ lib.optional (!speechdSupport) "-D speechd=OFF"
80 ++ lib.optional (!pulseSupport) "-D pulseaudio=OFF"
81 ++ lib.optional (!pipewireSupport) "-D pipewire=OFF"
82 ++ lib.optional jackSupport "-D alsa=OFF -D jackaudio=ON";
84 env.NIX_CFLAGS_COMPILE = lib.optionalString speechdSupport "-I${speechd}/include/speech-dispatcher";
87 wrapProgram $out/bin/mumble \
88 --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath (lib.optional pulseSupport libpulseaudio ++ lib.optional pipewireSupport pipewire)}"
92 server = source: generic {
97 ] ++ lib.optional (!iceSupport) "-D ice=OFF"
98 ++ lib.optionals iceSupport [
99 "-D Ice_HOME=${lib.getDev zeroc-ice};${lib.getLib zeroc-ice}"
100 "-D CMAKE_PREFIX_PATH=${lib.getDev zeroc-ice};${lib.getLib zeroc-ice}"
101 "-D Ice_SLICE_DIR=${lib.getDev zeroc-ice}/share/ice/slice"
104 buildInputs = [ libcap ]
105 ++ lib.optional iceSupport zeroc-ice;
112 src = fetchFromGitHub {
113 owner = "mumble-voip";
115 rev = "5d808e287e99b402b724e411a7a0848e00956a24";
116 sha256 = "sha256-SYsGCuj3HeyAQRUecGLaRdJR9Rm7lbaM54spY/zx0jU=";
117 fetchSubmodules = true;
121 # fixes 'static assertion failed: static_assert(sizeof(CCameraAngles) == 0x408, "");'
122 # when compiling pkgsi686Linux.mumble, which is a dependency of x64 mumble_overlay
123 # https://github.com/mumble-voip/mumble/pull/5850
124 # Remove with next version update
126 url = "https://github.com/mumble-voip/mumble/commit/13c051b36b387356815cff5d685bc628b74ba136.patch";
127 hash = "sha256-Rq8fb6NFd4DCNWm6OOMYIP7tBllufmQcB5CSxPU4qqg=";
132 mumble = client source;
133 murmur = server source;