From 9e8a6a24f06a0ed175b05198839376d4ce79f390 Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Thu, 30 Jan 2014 22:34:21 -0600 Subject: [PATCH] murmur: Add ice support and small fixes This patch adds optional ICE support to murmur which is enabled by default. Additionally, it cleans up some of the expression similar to the fixes added the mumble. --- .../applications/networking/mumble/murmur.nix | 34 ++++++++++++++----- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/networking/mumble/murmur.nix b/pkgs/applications/networking/mumble/murmur.nix index b40632384c2..4b074b0708e 100644 --- a/pkgs/applications/networking/mumble/murmur.nix +++ b/pkgs/applications/networking/mumble/murmur.nix @@ -1,5 +1,15 @@ -{ stdenv, fetchurl, qt4, boost, protobuf, avahi, libcap, pkgconfig }: +{ stdenv, fetchurl, qt4, boost, protobuf +, avahi, libcap, pkgconfig +, iceSupport ? false +, zeroc_ice ? null +}: +assert iceSupport -> zeroc_ice != null; + +let + optional = stdenv.lib.optional; + optionalString = stdenv.lib.optionalString; +in stdenv.mkDerivation rec { name = "murmur-" + version; version = "1.2.4"; @@ -9,22 +19,28 @@ stdenv.mkDerivation rec { sha256 = "16wwj6gwcnyjlnzh7wk0l255ldxmbwx0wi652sdp20lsv61q7kx1"; }; - configurePhase = '' - qmake CONFIG+=no-client CONFIG+=no-ice CONFIG+=no-embed-qt + patchPhase = optional iceSupport '' + sed -i 's,/usr/share/Ice/,${zeroc_ice}/,g' src/murmur/murmur.pro ''; - buildInputs = [ qt4 boost protobuf avahi libcap pkgconfig ]; + configurePhase = '' + qmake CONFIG+=no-client CONFIG+=no-embed-qt \ + ${optionalString (!iceSupport) "CONFIG+=no-ice"} + ''; + + buildInputs = [ qt4 boost protobuf avahi libcap pkgconfig ] + ++ optional iceSupport [ zeroc_ice ]; installPhase = '' mkdir -p $out cp -r ./release $out/bin ''; - meta = { - homepage = http://mumble.sourceforge.net/; + meta = with stdenv.lib; { + homepage = "http://mumble.sourceforge.net/"; description = "Low-latency, high quality voice chat software"; - license = "BSD"; - platforms = with stdenv.lib.platforms; linux; - maintainers = with stdenv.lib.maintainers; [viric]; + license = licenses.bsd3; + platforms = platforms.linux; + maintainers = with maintainers; [ viric ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b707f1cc633..978a67d232e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8384,6 +8384,7 @@ let avahi = avahi.override { withLibdnssdCompat = true; }; + iceSupport = config.murmur.iceSupport or true; }; mutt = callPackage ../applications/networking/mailreaders/mutt { };