From 344ccc7faaee7116125e717a7bed419ee3929072 Mon Sep 17 00:00:00 2001 From: codyopel Date: Wed, 8 Apr 2015 07:49:23 -0400 Subject: [PATCH] mumble: refactor, add desktop file & add icon --- .../networking/mumble/default.nix | 55 +++++++++++-------- 1 file changed, 33 insertions(+), 22 deletions(-) diff --git a/pkgs/applications/networking/mumble/default.nix b/pkgs/applications/networking/mumble/default.nix index bf03fe3267d2..358a0bb12288 100644 --- a/pkgs/applications/networking/mumble/default.nix +++ b/pkgs/applications/networking/mumble/default.nix @@ -1,11 +1,8 @@ -{ stdenv, fetchurl, qt4, boost, protobuf, libsndfile -, speex, libopus, avahi, pkgconfig -, jackSupport ? false -, jack2 ? null -, speechdSupport ? false -, speechd ? null -, pulseSupport ? false -, pulseaudio ? null +{ stdenv, fetchurl, pkgconfig +, avahi, boost, libopus, libsndfile, protobuf, qt4, speex +, jackSupport ? false, jack2 ? null +, speechdSupport ? false, speechd ? null +, pulseSupport ? false, pulseaudio ? null }: assert jackSupport -> jack2 != null; @@ -27,32 +24,46 @@ stdenv.mkDerivation rec { patches = optional jackSupport ./mumble-jack-support.patch; + configureFlags = [ + "CONFIG+=shared" + "CONFIG+=no-g15" + "CONFIG+=packaged" + "CONFIG+=no-update" + "CONFIG+=no-server" + "CONFIG+=no-embed-qt-translations" + "CONFIG+=bundled-celt" + "CONFIG+=no-bundled-opus" + "CONFIG+=no-bundled-speex" + ] ++ optional (!speechdSupport) "CONFIG+=no-speechd" + ++ optional jackSupport "CONFIG+=no-oss CONFIG+=no-alsa CONFIG+=jackaudio"; + configurePhase = '' - qmake CONFIG+=no-g15 CONFIG+=no-update CONFIG+=no-server \ - CONFIG+=no-embed-qt-translations CONFIG+=packaged \ - CONFIG+=bundled-celt CONFIG+=no-bundled-opus \ - ${optionalString (!speechdSupport) "CONFIG+=no-speechd"} \ - ${optionalString jackSupport "CONFIG+=no-oss CONFIG+=no-alsa CONFIG+=jackaudio"} \ - CONFIG+=no-bundled-speex + qmake $configureFlags ''; + nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ qt4 boost protobuf libsndfile speex - libopus avahi pkgconfig ] - ++ (optional jackSupport jack2) - ++ (optional speechdSupport speechd) - ++ (optional pulseSupport pulseaudio); + buildInputs = [ avahi boost libopus libsndfile protobuf qt4 speex ] + ++ optional jackSupport jack2 + ++ optional speechdSupport speechd + ++ optional pulseSupport pulseaudio; installPhase = '' mkdir -p $out cp -r ./release $out/bin + + mkdir -p $out/share/applications + cp scripts/mumble.desktop $out/share/applications + + mkdir -p $out/share/icons + cp icons/mumble.svg $out/share/icons ''; - meta = with stdenv.lib; { - homepage = "http://mumble.sourceforge.net/"; + meta = with stdenv.lib; { description = "Low-latency, high quality voice chat software"; + homepage = "http://mumble.sourceforge.net/"; license = licenses.bsd3; - platforms = platforms.linux; maintainers = with maintainers; [ viric ]; + platforms = platforms.linux; }; }