diff --git a/nixos/modules/services/networking/murmur.nix b/nixos/modules/services/networking/murmur.nix index 992678c43eb..06ec04dbbf1 100644 --- a/nixos/modules/services/networking/murmur.nix +++ b/nixos/modules/services/networking/murmur.nix @@ -306,7 +306,7 @@ in Type = if forking then "forking" else "simple"; PIDFile = mkIf forking "/run/murmur/murmurd.pid"; EnvironmentFile = mkIf (cfg.environmentFile != null) cfg.environmentFile; - ExecStart = "${cfg.package}/bin/murmurd -ini /run/murmur/murmurd.ini"; + ExecStart = "${cfg.package}/bin/mumble-server -ini /run/murmur/murmurd.ini"; Restart = "always"; RuntimeDirectory = "murmur"; RuntimeDirectoryMode = "0700"; diff --git a/pkgs/applications/networking/mumble/default.nix b/pkgs/applications/networking/mumble/default.nix index c7500d90328..fefa884c2a6 100644 --- a/pkgs/applications/networking/mumble/default.nix +++ b/pkgs/applications/networking/mumble/default.nix @@ -1,62 +1,39 @@ -{ lib, stdenv, fetchFromGitHub, pkg-config, qt5 +{ lib, stdenv, fetchFromGitHub, pkg-config, qt5, cmake , avahi, boost, libopus, libsndfile, protobuf, speex, libcap , alsa-lib, python3 , rnnoise -, jackSupport ? false, libjack2 -, speechdSupport ? false, speechd -, pulseSupport ? false, libpulseaudio -, iceSupport ? false, zeroc-ice -, grpcSupport ? false, grpc, which , nixosTests +, poco +, flac +, libogg +, libvorbis +, grpcSupport ? false, grpc, which +, iceSupport ? true, zeroc-ice +, jackSupport ? false, libjack2 +, pipewireSupport ? true, pipewire +, pulseSupport ? true, libpulseaudio +, speechdSupport ? false, speechd }: let - generic = overrides: source: qt5.mkDerivation (source // overrides // { + generic = overrides: source: stdenv.mkDerivation (source // overrides // { pname = overrides.type; version = source.version; - patches = (source.patches or []) - ++ [ ./fix-rnnoise-argument.patch ]; - - nativeBuildInputs = [ pkg-config python3 qt5.qmake ] + nativeBuildInputs = [ cmake pkg-config python3 qt5.wrapQtAppsHook qt5.qttools ] ++ (overrides.nativeBuildInputs or [ ]); - buildInputs = [ boost protobuf avahi ] + buildInputs = [ avahi boost poco protobuf ] ++ (overrides.buildInputs or [ ]); - qmakeFlags = [ - "CONFIG+=c++11" - "CONFIG+=shared" - "CONFIG+=no-g15" - "CONFIG+=packaged" - "CONFIG+=no-update" - "CONFIG+=no-embed-qt-translations" - "CONFIG+=bundled-celt" - "CONFIG+=no-bundled-opus" - "CONFIG+=no-bundled-speex" - "DEFINES+=PLUGIN_PATH=${placeholder "out"}/lib/mumble" - ] ++ lib.optional (!speechdSupport) "CONFIG+=no-speechd" - ++ lib.optional jackSupport "CONFIG+=no-oss CONFIG+=no-alsa CONFIG+=jackaudio" - ++ (overrides.configureFlags or [ ]); + cmakeFlags = [ + "-D g15=OFF" + ] ++ (overrides.configureFlags or [ ]); preConfigure = '' patchShebangs scripts ''; - makeFlags = [ "release" ]; - - installPhase = '' - runHook preInstall - - ${overrides.installPhase} - - # doc stuff - mkdir -p $out/share/man/man1 - install -Dm644 man/mum* $out/share/man/man1/ - - runHook postInstall - ''; - passthru.tests.connectivity = nixosTests.mumble; meta = with lib; { @@ -72,66 +49,63 @@ let type = "mumble"; nativeBuildInputs = [ qt5.qttools ]; - buildInputs = [ libopus libsndfile speex qt5.qtsvg rnnoise ] - ++ lib.optional stdenv.isLinux alsa-lib + buildInputs = [ flac libogg libopus libsndfile libvorbis qt5.qtsvg rnnoise speex ] + ++ lib.optional (!jackSupport) alsa-lib ++ lib.optional jackSupport libjack2 ++ lib.optional speechdSupport speechd - ++ lib.optional pulseSupport libpulseaudio; + ++ lib.optional pulseSupport libpulseaudio + ++ lib.optional pipewireSupport pipewire; configureFlags = [ - "CONFIG+=no-server" - ]; + "-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"; NIX_CFLAGS_COMPILE = lib.optional speechdSupport "-I${speechd}/include/speech-dispatcher"; - installPhase = '' - # bin stuff - install -Dm755 release/mumble $out/bin/mumble - install -Dm755 scripts/mumble-overlay $out/bin/mumble-overlay - - # lib stuff - mkdir -p $out/lib/mumble - cp -P release/libmumble.so* $out/lib - cp -P release/libcelt* $out/lib/mumble - cp -P release/plugins/* $out/lib/mumble - - # icons - install -Dm644 scripts/mumble.desktop $out/share/applications/mumble.desktop - install -Dm644 icons/mumble.svg $out/share/icons/hicolor/scalable/apps/mumble.svg + postFixup = '' + wrapProgram $out/bin/mumble \ + --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath (lib.optional pulseSupport libpulseaudio ++ lib.optional pipewireSupport pipewire)}" ''; } source; server = source: generic { type = "murmur"; - postPatch = lib.optionalString iceSupport '' - grep -Rl '/usr/share/Ice' . | xargs sed -i 's,/usr/share/Ice/,${zeroc-ice.dev}/share/ice/,g' - ''; - configureFlags = [ - "CONFIG+=no-client" - ] ++ lib.optional (!iceSupport) "CONFIG+=no-ice" - ++ lib.optional grpcSupport "CONFIG+=grpc"; + "-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"; buildInputs = [ libcap ] ++ lib.optional iceSupport zeroc-ice ++ lib.optionals grpcSupport [ grpc which ]; - - installPhase = '' - # bin stuff - install -Dm755 release/murmurd $out/bin/murmurd - ''; } source; source = rec { - version = "1.3.4"; + version = "unstable-1.4.231"; # Needs submodules src = fetchFromGitHub { owner = "mumble-voip"; repo = "mumble"; - rev = version; - sha256 = "sha256-njovShQpW0JNeeE8VugdmGzDk3fKG8/fcJoBgdyTZug="; + rev = "9e0e274d6a9d8a9919267e747d05d0500d150560"; + sha256 = "0whvb4nlf7gjf2v7wsaq0ir18mshhw5wi8c9q9qz43wnh42nn2qi"; fetchSubmodules = true; }; }; diff --git a/pkgs/applications/networking/mumble/fix-rnnoise-argument.patch b/pkgs/applications/networking/mumble/fix-rnnoise-argument.patch deleted file mode 100644 index 78e8ed24d58..00000000000 --- a/pkgs/applications/networking/mumble/fix-rnnoise-argument.patch +++ /dev/null @@ -1,16 +0,0 @@ -nixpkgs has a more recent rnnoise than the one used by mumble, and rnnoise -changed the argument rnnoise_create[1], - -[1] https://github.com/xiph/rnnoise/commit/231b9c02d14a74cb449a98004cb7a2cf1bdeca2f - ---- old/src/mumble/AudioInput.cpp 2020-02-18 22:55:32.000000000 -0500 -+++ new/src/mumble/AudioInput.cpp 2020-02-18 22:58:08.000000000 -0500 -@@ -106,7 +106,7 @@ - #endif - - #ifdef USE_RNNOISE -- denoiseState = rnnoise_create(); -+ denoiseState = rnnoise_create(NULL); - #endif - - qWarning("AudioInput: %d bits/s, %d hz, %d sample", iAudioQuality, iSampleRate, iFrameSize); diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 247298df58e..41290cc6954 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -27552,7 +27552,6 @@ with pkgs; avahi = avahi-compat; jackSupport = config.mumble.jackSupport or false; speechdSupport = config.mumble.speechdSupport or false; - pulseSupport = config.pulseaudio or stdenv.isLinux; }).mumble; mumble_overlay = callPackage ../applications/networking/mumble/overlay.nix {