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

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