2022-03-08 01:42:46 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pkg-config,
|
|
|
|
qt5,
|
|
|
|
avahi,
|
|
|
|
boost,
|
|
|
|
libopus,
|
|
|
|
libsndfile,
|
|
|
|
protobuf,
|
|
|
|
speex,
|
|
|
|
libcap,
|
|
|
|
alsaLib,
|
|
|
|
python3,
|
|
|
|
cmake,
|
|
|
|
poco,
|
|
|
|
pcre,
|
|
|
|
iceSupport ? false,
|
|
|
|
zeroc-ice,
|
|
|
|
rnnoise,
|
|
|
|
jackSupport ? false,
|
|
|
|
libjack2,
|
|
|
|
pulseSupport ? false,
|
|
|
|
libpulseaudio,
|
|
|
|
grpcSupport ? false,
|
|
|
|
grpc,
|
|
|
|
which,
|
|
|
|
speechdSupport ? false,
|
|
|
|
speechd,
|
|
|
|
nixosTests,
|
|
|
|
}: let
|
|
|
|
generic = overrides: source:
|
|
|
|
qt5.mkDerivation (source
|
|
|
|
// overrides
|
|
|
|
// {
|
|
|
|
pname = overrides.type;
|
2022-03-08 02:19:09 +00:00
|
|
|
inherit (source) version;
|
2022-03-08 01:42:46 +00:00
|
|
|
|
2022-03-08 02:19:09 +00:00
|
|
|
patches = source.patches or [];
|
2022-03-08 01:42:46 +00:00
|
|
|
nativeBuildInputs =
|
|
|
|
[pkg-config python3 cmake]
|
|
|
|
++ (overrides.nativeBuildInputs or []);
|
|
|
|
|
|
|
|
buildInputs =
|
|
|
|
[boost protobuf avahi]
|
|
|
|
++ (overrides.buildInputs or []);
|
|
|
|
|
|
|
|
passthru.tests.connectivity = nixosTests.mumble;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Low-latency, high quality voice chat software";
|
|
|
|
homepage = "https://mumble.info";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [petabyteboy infinisil];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
client = source:
|
|
|
|
generic
|
2021-07-12 20:12:24 +00:00
|
|
|
{
|
|
|
|
type = "mumble";
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
qt5.qttools
|
|
|
|
];
|
|
|
|
|
2022-03-08 01:42:46 +00:00
|
|
|
buildInputs =
|
|
|
|
[
|
|
|
|
libopus
|
|
|
|
libsndfile
|
|
|
|
speex
|
|
|
|
qt5.qtsvg
|
|
|
|
rnnoise
|
|
|
|
poco
|
|
|
|
pcre
|
|
|
|
speechd
|
|
|
|
zeroc-ice.all
|
|
|
|
libpulseaudio
|
|
|
|
]
|
|
|
|
++ lib.optional stdenv.isLinux alsaLib
|
|
|
|
++ lib.optional jackSupport libjack2;
|
2021-07-12 20:12:24 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"CONFIG+=no-server"
|
|
|
|
];
|
|
|
|
|
2021-11-17 22:50:41 +00:00
|
|
|
NIX_CFLAGS_COMPILE = "-w";
|
|
|
|
|
2021-07-12 20:12:24 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-Dice=off"
|
2021-07-28 16:18:34 +00:00
|
|
|
"-Dpulseaudio=on"
|
|
|
|
"-Dalsa=on"
|
2021-07-12 20:12:24 +00:00
|
|
|
"-Doverlay-xcompile=off"
|
|
|
|
"-DRELEASE_ID=${source.version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
# bin stuff
|
|
|
|
install -Dm755 mumble $out/bin/mumble
|
2021-07-28 16:18:34 +00:00
|
|
|
wrapProgram $out/bin/mumble \
|
|
|
|
--prefix LD_LIBRARY_PATH : "${libpulseaudio}/lib"
|
2021-07-12 20:12:24 +00:00
|
|
|
install -Dm755 $src/scripts/mumble-overlay $out/bin/mumble-overlay
|
|
|
|
|
|
|
|
# lib stuff
|
|
|
|
mkdir -p $out/lib/mumble
|
|
|
|
cp -P libcelt* $out/lib/mumble
|
|
|
|
cp -rP plugins/* $out/lib/mumble
|
|
|
|
|
|
|
|
# icons
|
|
|
|
install -Dm644 $src/scripts/org.mumble_voip.mumble.desktop $out/share/applications/mumble.desktop
|
|
|
|
install -Dm644 $src/icons/mumble.svg $out/share/icons/hicolor/scalable/apps/mumble.svg
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
source;
|
|
|
|
|
2022-03-08 02:19:09 +00:00
|
|
|
server = generic
|
|
|
|
{
|
|
|
|
type = "murmur";
|
2021-07-12 20:12:24 +00:00
|
|
|
|
2022-03-08 02:19:09 +00:00
|
|
|
configureFlags = [
|
|
|
|
"CONFIG+=no-client"
|
|
|
|
];
|
2021-07-12 20:12:24 +00:00
|
|
|
|
2022-03-08 02:19:09 +00:00
|
|
|
buildInputs =
|
|
|
|
[libcap]
|
|
|
|
++ lib.optionals grpcSupport [grpc which];
|
2021-07-12 20:12:24 +00:00
|
|
|
|
2022-03-08 02:19:09 +00:00
|
|
|
installPhase = ''
|
|
|
|
# bin stuff
|
|
|
|
install -Dm755 release/murmurd $out/bin/murmurd
|
|
|
|
'';
|
|
|
|
};
|
2021-07-12 20:12:24 +00:00
|
|
|
|
|
|
|
source = rec {
|
|
|
|
version = "1.4.0-development-snapshot-005";
|
|
|
|
|
|
|
|
# Needs submodules
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mumble-voip";
|
|
|
|
repo = "mumble";
|
|
|
|
rev = "${version}";
|
|
|
|
sha256 = "sha256:1w16j5idbvvbbisj1jlk5igym2n2f67ia61yynibqbmpvyq0bg3z";
|
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
};
|
2022-03-08 01:42:46 +00:00
|
|
|
in {
|
2021-07-12 20:12:24 +00:00
|
|
|
mumble = client source;
|
|
|
|
murmur = server source;
|
|
|
|
}
|