From c560f7954ec59cfb61c58021daadc16ec13ee481 Mon Sep 17 00:00:00 2001 From: Sandro Jäckel Date: Mon, 22 Feb 2021 08:25:35 +0100 Subject: mumble: cleanup ? null and assertion, remove not required enableParallelBuilding due to qmake --- pkgs/applications/networking/mumble/default.nix | 45 ++++++++++--------------- 1 file changed, 18 insertions(+), 27 deletions(-) (limited to 'pkgs/applications/networking/mumble/default.nix') diff --git a/pkgs/applications/networking/mumble/default.nix b/pkgs/applications/networking/mumble/default.nix index ba409223b648e..4432d9ddeece7 100644 --- a/pkgs/applications/networking/mumble/default.nix +++ b/pkgs/applications/networking/mumble/default.nix @@ -2,21 +2,14 @@ , avahi, boost, libopus, libsndfile, protobuf, speex, libcap , alsaLib, python3 , rnnoise -, jackSupport ? false, libjack2 ? null -, speechdSupport ? false, speechd ? null -, pulseSupport ? false, libpulseaudio ? null -, iceSupport ? false, zeroc-ice ? null -, grpcSupport ? false, grpc ? null, c-ares ? null, abseil-cpp ? null, which ? null +, jackSupport ? false, libjack2 +, speechdSupport ? false, speechd +, pulseSupport ? false, libpulseaudio +, iceSupport ? false, zeroc-ice +, grpcSupport ? false, grpc, c-ares, abseil-cpp, which , nixosTests }: -assert jackSupport -> libjack2 != null; -assert speechdSupport -> speechd != null; -assert pulseSupport -> libpulseaudio != null; -assert iceSupport -> zeroc-ice != null; -assert grpcSupport -> (grpc != null && c-ares != null && abseil-cpp != null && which != null); - -with lib; let generic = overrides: source: qt5.mkDerivation (source // overrides // { pname = overrides.type; @@ -42,8 +35,8 @@ let "CONFIG+=no-bundled-opus" "CONFIG+=no-bundled-speex" "DEFINES+=PLUGIN_PATH=${placeholder "out"}/lib/mumble" - ] ++ optional (!speechdSupport) "CONFIG+=no-speechd" - ++ optional jackSupport "CONFIG+=no-oss CONFIG+=no-alsa CONFIG+=jackaudio" + ] ++ lib.optional (!speechdSupport) "CONFIG+=no-speechd" + ++ lib.optional jackSupport "CONFIG+=no-oss CONFIG+=no-alsa CONFIG+=jackaudio" ++ (overrides.configureFlags or [ ]); preConfigure = '' @@ -64,11 +57,9 @@ let runHook postInstall ''; - enableParallelBuilding = true; - passthru.tests.connectivity = nixosTests.mumble; - meta = { + meta = with lib; { description = "Low-latency, high quality voice chat software"; homepage = "https://mumble.info"; license = licenses.bsd3; @@ -82,16 +73,16 @@ let nativeBuildInputs = [ qt5.qttools ]; buildInputs = [ libopus libsndfile speex qt5.qtsvg rnnoise ] - ++ optional stdenv.isLinux alsaLib - ++ optional jackSupport libjack2 - ++ optional speechdSupport speechd - ++ optional pulseSupport libpulseaudio; + ++ lib.optional stdenv.isLinux alsaLib + ++ lib.optional jackSupport libjack2 + ++ lib.optional speechdSupport speechd + ++ lib.optional pulseSupport libpulseaudio; configureFlags = [ "CONFIG+=no-server" ]; - NIX_CFLAGS_COMPILE = optional speechdSupport "-I${speechd}/include/speech-dispatcher"; + NIX_CFLAGS_COMPILE = lib.optional speechdSupport "-I${speechd}/include/speech-dispatcher"; installPhase = '' # bin stuff @@ -113,18 +104,18 @@ let server = source: generic { type = "murmur"; - postPatch = optional iceSupport '' + postPatch = lib.optional iceSupport '' grep -Rl '/usr/share/Ice' . | xargs sed -i 's,/usr/share/Ice/,${zeroc-ice.dev}/share/ice/,g' ''; configureFlags = [ "CONFIG+=no-client" - ] ++ optional (!iceSupport) "CONFIG+=no-ice" - ++ optional grpcSupport "CONFIG+=grpc"; + ] ++ lib.optional (!iceSupport) "CONFIG+=no-ice" + ++ lib.optional grpcSupport "CONFIG+=grpc"; buildInputs = [ libcap ] - ++ optional iceSupport zeroc-ice - ++ optionals grpcSupport [ grpc c-ares abseil-cpp which ]; + ++ lib.optional iceSupport zeroc-ice + ++ lib.optionals grpcSupport [ grpc c-ares abseil-cpp which ]; installPhase = '' # bin stuff -- cgit 1.4.1