lol

Merge pull request #161663 from felixsinger/update/pkgs/mumble

authored by

Martin Weinelt and committed by
GitHub
308403c3 f1cf74f0

+48 -91
+1 -1
nixos/modules/services/networking/murmur.nix
··· 306 306 Type = if forking then "forking" else "simple"; 307 307 PIDFile = mkIf forking "/run/murmur/murmurd.pid"; 308 308 EnvironmentFile = mkIf (cfg.environmentFile != null) cfg.environmentFile; 309 - ExecStart = "${cfg.package}/bin/murmurd -ini /run/murmur/murmurd.ini"; 309 + ExecStart = "${cfg.package}/bin/mumble-server -ini /run/murmur/murmurd.ini"; 310 310 Restart = "always"; 311 311 RuntimeDirectory = "murmur"; 312 312 RuntimeDirectoryMode = "0700";
+47 -73
pkgs/applications/networking/mumble/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, pkg-config, qt5 1 + { lib, stdenv, fetchFromGitHub, pkg-config, qt5, cmake 2 2 , avahi, boost, libopus, libsndfile, protobuf, speex, libcap 3 3 , alsa-lib, python3 4 4 , rnnoise 5 + , nixosTests 6 + , poco 7 + , flac 8 + , libogg 9 + , libvorbis 10 + , grpcSupport ? false, grpc, which 11 + , iceSupport ? true, zeroc-ice 5 12 , jackSupport ? false, libjack2 13 + , pipewireSupport ? true, pipewire 14 + , pulseSupport ? true, libpulseaudio 6 15 , speechdSupport ? false, speechd 7 - , pulseSupport ? false, libpulseaudio 8 - , iceSupport ? false, zeroc-ice 9 - , grpcSupport ? false, grpc, which 10 - , nixosTests 11 16 }: 12 17 13 18 let 14 - generic = overrides: source: qt5.mkDerivation (source // overrides // { 19 + generic = overrides: source: stdenv.mkDerivation (source // overrides // { 15 20 pname = overrides.type; 16 21 version = source.version; 17 22 18 - patches = (source.patches or []) 19 - ++ [ ./fix-rnnoise-argument.patch ]; 20 - 21 - nativeBuildInputs = [ pkg-config python3 qt5.qmake ] 23 + nativeBuildInputs = [ cmake pkg-config python3 qt5.wrapQtAppsHook qt5.qttools ] 22 24 ++ (overrides.nativeBuildInputs or [ ]); 23 25 24 - buildInputs = [ boost protobuf avahi ] 26 + buildInputs = [ avahi boost poco protobuf ] 25 27 ++ (overrides.buildInputs or [ ]); 26 28 27 - qmakeFlags = [ 28 - "CONFIG+=c++11" 29 - "CONFIG+=shared" 30 - "CONFIG+=no-g15" 31 - "CONFIG+=packaged" 32 - "CONFIG+=no-update" 33 - "CONFIG+=no-embed-qt-translations" 34 - "CONFIG+=bundled-celt" 35 - "CONFIG+=no-bundled-opus" 36 - "CONFIG+=no-bundled-speex" 37 - "DEFINES+=PLUGIN_PATH=${placeholder "out"}/lib/mumble" 38 - ] ++ lib.optional (!speechdSupport) "CONFIG+=no-speechd" 39 - ++ lib.optional jackSupport "CONFIG+=no-oss CONFIG+=no-alsa CONFIG+=jackaudio" 40 - ++ (overrides.configureFlags or [ ]); 29 + cmakeFlags = [ 30 + "-D g15=OFF" 31 + ] ++ (overrides.configureFlags or [ ]); 41 32 42 33 preConfigure = '' 43 34 patchShebangs scripts 44 35 ''; 45 36 46 - makeFlags = [ "release" ]; 47 - 48 - installPhase = '' 49 - runHook preInstall 50 - 51 - ${overrides.installPhase} 52 - 53 - # doc stuff 54 - mkdir -p $out/share/man/man1 55 - install -Dm644 man/mum* $out/share/man/man1/ 56 - 57 - runHook postInstall 58 - ''; 59 - 60 37 passthru.tests.connectivity = nixosTests.mumble; 61 38 62 39 meta = with lib; { ··· 72 49 type = "mumble"; 73 50 74 51 nativeBuildInputs = [ qt5.qttools ]; 75 - buildInputs = [ libopus libsndfile speex qt5.qtsvg rnnoise ] 76 - ++ lib.optional stdenv.isLinux alsa-lib 52 + buildInputs = [ flac libogg libopus libsndfile libvorbis qt5.qtsvg rnnoise speex ] 53 + ++ lib.optional (!jackSupport) alsa-lib 77 54 ++ lib.optional jackSupport libjack2 78 55 ++ lib.optional speechdSupport speechd 79 - ++ lib.optional pulseSupport libpulseaudio; 56 + ++ lib.optional pulseSupport libpulseaudio 57 + ++ lib.optional pipewireSupport pipewire; 80 58 81 59 configureFlags = [ 82 - "CONFIG+=no-server" 83 - ]; 60 + "-D server=OFF" 61 + "-D bundled-celt=ON" 62 + "-D bundled-opus=OFF" 63 + "-D bundled-speex=OFF" 64 + "-D bundled-rnnoise=OFF" 65 + "-D bundle-qt-translations=OFF" 66 + "-D update=OFF" 67 + "-D overlay-xcompile=OFF" 68 + "-D oss=OFF" 69 + ] ++ lib.optional (!speechdSupport) "-D speechd=OFF" 70 + ++ lib.optional (!pulseSupport) "-D pulseaudio=OFF" 71 + ++ lib.optional (!pipewireSupport) "-D pipewire=OFF" 72 + ++ lib.optional jackSupport "-D alsa=OFF -D jackaudio=ON"; 84 73 85 74 NIX_CFLAGS_COMPILE = lib.optional speechdSupport "-I${speechd}/include/speech-dispatcher"; 86 75 87 - installPhase = '' 88 - # bin stuff 89 - install -Dm755 release/mumble $out/bin/mumble 90 - install -Dm755 scripts/mumble-overlay $out/bin/mumble-overlay 91 - 92 - # lib stuff 93 - mkdir -p $out/lib/mumble 94 - cp -P release/libmumble.so* $out/lib 95 - cp -P release/libcelt* $out/lib/mumble 96 - cp -P release/plugins/* $out/lib/mumble 97 - 98 - # icons 99 - install -Dm644 scripts/mumble.desktop $out/share/applications/mumble.desktop 100 - install -Dm644 icons/mumble.svg $out/share/icons/hicolor/scalable/apps/mumble.svg 76 + postFixup = '' 77 + wrapProgram $out/bin/mumble \ 78 + --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath (lib.optional pulseSupport libpulseaudio ++ lib.optional pipewireSupport pipewire)}" 101 79 ''; 102 80 } source; 103 81 104 82 server = source: generic { 105 83 type = "murmur"; 106 - 107 - postPatch = lib.optionalString iceSupport '' 108 - grep -Rl '/usr/share/Ice' . | xargs sed -i 's,/usr/share/Ice/,${zeroc-ice.dev}/share/ice/,g' 109 - ''; 110 84 111 85 configureFlags = [ 112 - "CONFIG+=no-client" 113 - ] ++ lib.optional (!iceSupport) "CONFIG+=no-ice" 114 - ++ lib.optional grpcSupport "CONFIG+=grpc"; 86 + "-D client=OFF" 87 + ] ++ lib.optional (!iceSupport) "-D ice=OFF" 88 + ++ lib.optionals iceSupport [ 89 + "-D Ice_HOME=${lib.getDev zeroc-ice};${lib.getLib zeroc-ice}" 90 + "-D CMAKE_PREFIX_PATH=${lib.getDev zeroc-ice};${lib.getLib zeroc-ice}" 91 + "-D Ice_SLICE_DIR=${lib.getDev zeroc-ice}/share/ice/slice" 92 + ] 93 + ++ lib.optional grpcSupport "-D grpc=ON"; 115 94 116 95 buildInputs = [ libcap ] 117 96 ++ lib.optional iceSupport zeroc-ice 118 97 ++ lib.optionals grpcSupport [ grpc which ]; 119 - 120 - installPhase = '' 121 - # bin stuff 122 - install -Dm755 release/murmurd $out/bin/murmurd 123 - ''; 124 98 } source; 125 99 126 100 source = rec { 127 - version = "1.3.4"; 101 + version = "unstable-1.4.231"; 128 102 129 103 # Needs submodules 130 104 src = fetchFromGitHub { 131 105 owner = "mumble-voip"; 132 106 repo = "mumble"; 133 - rev = version; 134 - sha256 = "sha256-njovShQpW0JNeeE8VugdmGzDk3fKG8/fcJoBgdyTZug="; 107 + rev = "9e0e274d6a9d8a9919267e747d05d0500d150560"; 108 + sha256 = "0whvb4nlf7gjf2v7wsaq0ir18mshhw5wi8c9q9qz43wnh42nn2qi"; 135 109 fetchSubmodules = true; 136 110 }; 137 111 };
-16
pkgs/applications/networking/mumble/fix-rnnoise-argument.patch
··· 1 - nixpkgs has a more recent rnnoise than the one used by mumble, and rnnoise 2 - changed the argument rnnoise_create[1], 3 - 4 - [1] https://github.com/xiph/rnnoise/commit/231b9c02d14a74cb449a98004cb7a2cf1bdeca2f 5 - 6 - --- old/src/mumble/AudioInput.cpp 2020-02-18 22:55:32.000000000 -0500 7 - +++ new/src/mumble/AudioInput.cpp 2020-02-18 22:58:08.000000000 -0500 8 - @@ -106,7 +106,7 @@ 9 - #endif 10 - 11 - #ifdef USE_RNNOISE 12 - - denoiseState = rnnoise_create(); 13 - + denoiseState = rnnoise_create(NULL); 14 - #endif 15 - 16 - qWarning("AudioInput: %d bits/s, %d hz, %d sample", iAudioQuality, iSampleRate, iFrameSize);
-1
pkgs/top-level/all-packages.nix
··· 27566 27566 avahi = avahi-compat; 27567 27567 jackSupport = config.mumble.jackSupport or false; 27568 27568 speechdSupport = config.mumble.speechdSupport or false; 27569 - pulseSupport = config.pulseaudio or stdenv.isLinux; 27570 27569 }).mumble; 27571 27570 27572 27571 mumble_overlay = callPackage ../applications/networking/mumble/overlay.nix {