mumble: cleanup ? null and assertion, remove not required enableParallelBuilding due to qmake

+18 -27
+18 -27
pkgs/applications/networking/mumble/default.nix
··· 2 , avahi, boost, libopus, libsndfile, protobuf, speex, libcap 3 , alsaLib, python3 4 , rnnoise 5 - , jackSupport ? false, libjack2 ? null 6 - , speechdSupport ? false, speechd ? null 7 - , pulseSupport ? false, libpulseaudio ? null 8 - , iceSupport ? false, zeroc-ice ? null 9 - , grpcSupport ? false, grpc ? null, c-ares ? null, abseil-cpp ? null, which ? null 10 , nixosTests 11 }: 12 13 - assert jackSupport -> libjack2 != null; 14 - assert speechdSupport -> speechd != null; 15 - assert pulseSupport -> libpulseaudio != null; 16 - assert iceSupport -> zeroc-ice != null; 17 - assert grpcSupport -> (grpc != null && c-ares != null && abseil-cpp != null && which != null); 18 - 19 - with lib; 20 let 21 generic = overrides: source: qt5.mkDerivation (source // overrides // { 22 pname = overrides.type; ··· 42 "CONFIG+=no-bundled-opus" 43 "CONFIG+=no-bundled-speex" 44 "DEFINES+=PLUGIN_PATH=${placeholder "out"}/lib/mumble" 45 - ] ++ optional (!speechdSupport) "CONFIG+=no-speechd" 46 - ++ optional jackSupport "CONFIG+=no-oss CONFIG+=no-alsa CONFIG+=jackaudio" 47 ++ (overrides.configureFlags or [ ]); 48 49 preConfigure = '' ··· 63 64 runHook postInstall 65 ''; 66 - 67 - enableParallelBuilding = true; 68 69 passthru.tests.connectivity = nixosTests.mumble; 70 71 - meta = { 72 description = "Low-latency, high quality voice chat software"; 73 homepage = "https://mumble.info"; 74 license = licenses.bsd3; ··· 82 83 nativeBuildInputs = [ qt5.qttools ]; 84 buildInputs = [ libopus libsndfile speex qt5.qtsvg rnnoise ] 85 - ++ optional stdenv.isLinux alsaLib 86 - ++ optional jackSupport libjack2 87 - ++ optional speechdSupport speechd 88 - ++ optional pulseSupport libpulseaudio; 89 90 configureFlags = [ 91 "CONFIG+=no-server" 92 ]; 93 94 - NIX_CFLAGS_COMPILE = optional speechdSupport "-I${speechd}/include/speech-dispatcher"; 95 96 installPhase = '' 97 # bin stuff ··· 113 server = source: generic { 114 type = "murmur"; 115 116 - postPatch = optional iceSupport '' 117 grep -Rl '/usr/share/Ice' . | xargs sed -i 's,/usr/share/Ice/,${zeroc-ice.dev}/share/ice/,g' 118 ''; 119 120 configureFlags = [ 121 "CONFIG+=no-client" 122 - ] ++ optional (!iceSupport) "CONFIG+=no-ice" 123 - ++ optional grpcSupport "CONFIG+=grpc"; 124 125 buildInputs = [ libcap ] 126 - ++ optional iceSupport zeroc-ice 127 - ++ optionals grpcSupport [ grpc c-ares abseil-cpp which ]; 128 129 installPhase = '' 130 # bin stuff
··· 2 , avahi, boost, libopus, libsndfile, protobuf, speex, libcap 3 , alsaLib, python3 4 , rnnoise 5 + , jackSupport ? false, libjack2 6 + , speechdSupport ? false, speechd 7 + , pulseSupport ? false, libpulseaudio 8 + , iceSupport ? false, zeroc-ice 9 + , grpcSupport ? false, grpc, c-ares, abseil-cpp, which 10 , nixosTests 11 }: 12 13 let 14 generic = overrides: source: qt5.mkDerivation (source // overrides // { 15 pname = overrides.type; ··· 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 [ ]); 41 42 preConfigure = '' ··· 56 57 runHook postInstall 58 ''; 59 60 passthru.tests.connectivity = nixosTests.mumble; 61 62 + meta = with lib; { 63 description = "Low-latency, high quality voice chat software"; 64 homepage = "https://mumble.info"; 65 license = licenses.bsd3; ··· 73 74 nativeBuildInputs = [ qt5.qttools ]; 75 buildInputs = [ libopus libsndfile speex qt5.qtsvg rnnoise ] 76 + ++ lib.optional stdenv.isLinux alsaLib 77 + ++ lib.optional jackSupport libjack2 78 + ++ lib.optional speechdSupport speechd 79 + ++ lib.optional pulseSupport libpulseaudio; 80 81 configureFlags = [ 82 "CONFIG+=no-server" 83 ]; 84 85 + NIX_CFLAGS_COMPILE = lib.optional speechdSupport "-I${speechd}/include/speech-dispatcher"; 86 87 installPhase = '' 88 # bin stuff ··· 104 server = source: generic { 105 type = "murmur"; 106 107 + postPatch = lib.optional iceSupport '' 108 grep -Rl '/usr/share/Ice' . | xargs sed -i 's,/usr/share/Ice/,${zeroc-ice.dev}/share/ice/,g' 109 ''; 110 111 configureFlags = [ 112 "CONFIG+=no-client" 113 + ] ++ lib.optional (!iceSupport) "CONFIG+=no-ice" 114 + ++ lib.optional grpcSupport "CONFIG+=grpc"; 115 116 buildInputs = [ libcap ] 117 + ++ lib.optional iceSupport zeroc-ice 118 + ++ lib.optionals grpcSupport [ grpc c-ares abseil-cpp which ]; 119 120 installPhase = '' 121 # bin stuff