summary refs log tree commit diff
path: root/pkgs/applications/networking/mumble
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@gmail.com>2021-02-22 08:25:35 +0100
committerSandro Jäckel <sandro.jaeckel@gmail.com>2021-02-23 15:58:29 +0100
commitc560f7954ec59cfb61c58021daadc16ec13ee481 (patch)
tree8dd7005ce3ddfaf0d31612a04dc07a076764f7aa /pkgs/applications/networking/mumble
parentba0626eb7c8618ca7ce3404a6f533b4f3672b8fd (diff)
downloadnixpkgs-c560f7954ec59cfb61c58021daadc16ec13ee481.tar
nixpkgs-c560f7954ec59cfb61c58021daadc16ec13ee481.tar.gz
nixpkgs-c560f7954ec59cfb61c58021daadc16ec13ee481.tar.bz2
nixpkgs-c560f7954ec59cfb61c58021daadc16ec13ee481.tar.lz
nixpkgs-c560f7954ec59cfb61c58021daadc16ec13ee481.tar.xz
nixpkgs-c560f7954ec59cfb61c58021daadc16ec13ee481.tar.zst
nixpkgs-c560f7954ec59cfb61c58021daadc16ec13ee481.zip
mumble: cleanup ? null and assertion, remove not required enableParallelBuilding due to qmake
Diffstat (limited to 'pkgs/applications/networking/mumble')
-rw-r--r--pkgs/applications/networking/mumble/default.nix45
1 files changed, 18 insertions, 27 deletions
diff --git a/pkgs/applications/networking/mumble/default.nix b/pkgs/applications/networking/mumble/default.nix
index ba409223b64..4432d9ddeec 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