lol
1{ stdenv, qt4, boost, protobuf, mumble
2, avahi, libcap, pkgconfig
3, iceSupport ? false
4, zeroc_ice ? null
5}:
6
7assert iceSupport -> zeroc_ice != null;
8
9let
10 optional = stdenv.lib.optional;
11 optionalString = stdenv.lib.optionalString;
12in
13stdenv.mkDerivation rec {
14 name = "murmur-${version}";
15
16 inherit (mumble) version src;
17
18 patchPhase = optional iceSupport ''
19 sed -i 's,/usr/share/Ice/,${zeroc_ice}/,g' src/murmur/murmur.pro
20 '';
21
22 configurePhase = ''
23 qmake CONFIG+=no-client CONFIG+=no-embed-qt \
24 ${optionalString (!iceSupport) "CONFIG+=no-ice"}
25 '';
26
27 buildInputs = [ qt4 boost protobuf avahi libcap pkgconfig ]
28 ++ optional iceSupport [ zeroc_ice ];
29
30 installPhase = ''
31 mkdir -p $out
32 cp -r ./release $out/bin
33 '';
34
35 meta = with stdenv.lib; {
36 homepage = "http://mumble.sourceforge.net/";
37 description = "Low-latency, high quality voice chat software";
38 license = licenses.bsd3;
39 platforms = platforms.linux;
40 maintainers = with maintainers; [ viric ];
41 };
42}