2015-07-24 05:03:02 +02:00
|
|
|
{ stdenv, fetchurl, makeWrapper, makeDesktopItem, zlib, glib, libpng, freetype
|
2015-12-20 05:22:52 +01:00
|
|
|
, xorg, fontconfig, qtbase, xkeyboard_config, alsaLib, libpulseaudio ? null
|
2016-05-07 01:51:30 +02:00
|
|
|
, libredirect, quazip, less, which, unzip, llvmPackages
|
2014-09-12 15:21:31 +02:00
|
|
|
}:
|
2010-10-28 19:45:18 +02:00
|
|
|
|
|
|
|
let
|
|
|
|
|
2013-11-20 06:46:55 +01:00
|
|
|
arch = if stdenv.is64bit then "amd64" else "x86";
|
2015-10-11 14:31:41 +02:00
|
|
|
|
2010-10-28 19:45:18 +02:00
|
|
|
libDir = if stdenv.is64bit then "lib64" else "lib";
|
|
|
|
|
|
|
|
deps =
|
|
|
|
[ zlib glib libpng freetype xorg.libSM xorg.libICE xorg.libXrender
|
2014-09-12 15:21:31 +02:00
|
|
|
xorg.libXrandr xorg.libXfixes xorg.libXcursor xorg.libXinerama
|
2015-12-20 05:22:52 +01:00
|
|
|
xorg.libxcb fontconfig xorg.libXext xorg.libX11 alsaLib qtbase libpulseaudio
|
2016-05-07 01:51:30 +02:00
|
|
|
llvmPackages.libcxx llvmPackages.libcxxabi
|
2010-10-28 19:45:18 +02:00
|
|
|
];
|
|
|
|
|
2015-07-24 05:03:02 +02:00
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "teamspeak";
|
|
|
|
exec = "ts3client";
|
|
|
|
icon = "teamspeak";
|
|
|
|
comment = "The TeamSpeak voice communication tool";
|
|
|
|
desktopName = "TeamSpeak";
|
|
|
|
genericName = "TeamSpeak";
|
|
|
|
categories = "Network";
|
|
|
|
};
|
|
|
|
|
2010-10-28 19:45:18 +02:00
|
|
|
in
|
|
|
|
|
2014-08-10 19:05:15 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2013-11-20 06:46:55 +01:00
|
|
|
name = "teamspeak-client-${version}";
|
2010-10-28 19:45:18 +02:00
|
|
|
|
2016-08-07 11:03:21 +02:00
|
|
|
version = "3.0.19.4";
|
2014-08-10 19:05:15 +02:00
|
|
|
|
2010-10-28 19:45:18 +02:00
|
|
|
src = fetchurl {
|
2013-11-20 06:46:55 +01:00
|
|
|
urls = [
|
2014-08-10 19:05:15 +02:00
|
|
|
"http://dl.4players.de/ts/releases/${version}/TeamSpeak3-Client-linux_${arch}-${version}.run"
|
2013-11-20 06:46:55 +01:00
|
|
|
"http://teamspeak.gameserver.gamed.de/ts3/releases/${version}/TeamSpeak3-Client-linux_${arch}-${version}.run"
|
|
|
|
];
|
2015-10-11 14:31:41 +02:00
|
|
|
sha256 = if stdenv.is64bit
|
2016-08-07 11:03:21 +02:00
|
|
|
then "f74617d2a2f5cb78e0ead345e6ee66c93e4a251355779018fd060828e212294a"
|
|
|
|
else "e11467dc1732ddc21ec0d86c2853c322af7a6b8307e3e8dfebc6b4b4d7404841";
|
2010-10-28 19:45:18 +02:00
|
|
|
};
|
|
|
|
|
2015-07-24 05:03:02 +02:00
|
|
|
# grab the plugin sdk for the desktop icon
|
|
|
|
pluginsdk = fetchurl {
|
2016-05-07 01:51:30 +02:00
|
|
|
url = "http://dl.4players.de/ts/client/pluginsdk/pluginsdk_3.0.19.1.zip";
|
|
|
|
sha256 = "1r1ss6zq5axr7h82inlp98zaz50041rizli5bwz3lfyipfr034ya";
|
2015-07-24 05:03:02 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ makeWrapper less which unzip ];
|
2014-08-10 19:05:15 +02:00
|
|
|
|
2010-10-28 19:45:18 +02:00
|
|
|
unpackPhase =
|
|
|
|
''
|
2014-11-27 11:34:47 +01:00
|
|
|
echo -e 'q\ny' | sh -xe $src
|
2010-10-28 19:45:18 +02:00
|
|
|
cd TeamSpeak*
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase =
|
|
|
|
''
|
2013-11-20 06:46:55 +01:00
|
|
|
mv ts3client_linux_${arch} ts3client
|
|
|
|
echo "patching ts3client..."
|
|
|
|
patchelf \
|
2014-12-17 19:11:30 +01:00
|
|
|
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
2015-03-04 22:15:10 +01:00
|
|
|
--set-rpath ${stdenv.lib.makeLibraryPath deps}:$(cat $NIX_CC/nix-support/orig-cc)/${libDir} \
|
2013-11-20 06:46:55 +01:00
|
|
|
--force-rpath \
|
|
|
|
ts3client
|
2010-10-28 19:45:18 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase =
|
|
|
|
''
|
2013-11-20 06:46:55 +01:00
|
|
|
# Delete unecessary libraries - these are provided by nixos.
|
2015-10-13 13:12:41 +02:00
|
|
|
rm *.so.* *.so
|
2014-08-16 10:34:09 +02:00
|
|
|
rm qt.conf
|
2013-11-20 06:46:55 +01:00
|
|
|
|
|
|
|
# Install files.
|
2010-10-28 19:45:18 +02:00
|
|
|
mkdir -p $out/lib/teamspeak
|
|
|
|
mv * $out/lib/teamspeak/
|
2013-11-20 06:46:55 +01:00
|
|
|
|
2015-07-24 05:03:02 +02:00
|
|
|
# Make a desktop item
|
|
|
|
mkdir -p $out/share/applications/ $out/share/icons/
|
|
|
|
unzip ${pluginsdk}
|
|
|
|
cp pluginsdk/docs/client_html/images/logo.png $out/share/icons/teamspeak.png
|
|
|
|
cp ${desktopItem}/share/applications/* $out/share/applications/
|
|
|
|
|
2013-11-20 06:46:55 +01:00
|
|
|
# Make a symlink to the binary from bin.
|
|
|
|
mkdir -p $out/bin/
|
|
|
|
ln -s $out/lib/teamspeak/ts3client $out/bin/ts3client
|
2014-08-10 19:05:15 +02:00
|
|
|
|
|
|
|
wrapProgram $out/bin/ts3client \
|
2015-10-13 13:12:41 +02:00
|
|
|
--set LD_LIBRARY_PATH "${quazip}/lib" \
|
|
|
|
--set LD_PRELOAD "${libredirect}/lib/libredirect.so" \
|
2014-08-10 19:05:15 +02:00
|
|
|
--set QT_PLUGIN_PATH "$out/lib/teamspeak/platforms" \
|
|
|
|
--set NIX_REDIRECTS /usr/share/X11/xkb=${xkeyboard_config}/share/X11/xkb
|
2010-10-28 19:45:18 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
dontStrip = true;
|
|
|
|
dontPatchELF = true;
|
2015-10-11 14:31:41 +02:00
|
|
|
|
|
|
|
meta = {
|
2010-10-28 19:45:18 +02:00
|
|
|
description = "The TeamSpeak voice communication tool";
|
|
|
|
homepage = http://teamspeak.com/;
|
2016-07-17 04:32:48 +02:00
|
|
|
license = {
|
|
|
|
fullName = "Teamspeak client license";
|
|
|
|
url = http://sales.teamspeakusa.com/licensing.php;
|
|
|
|
free = false;
|
|
|
|
};
|
2014-08-24 04:36:37 +02:00
|
|
|
maintainers = [ stdenv.lib.maintainers.lhvwb ];
|
2013-11-20 06:46:55 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2010-10-28 19:45:18 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2007-12-14 02:50:19 +01:00
|
|
|
/*
|
|
|
|
License issues:
|
|
|
|
Date: Mon, 10 Dec 2007 19:55:16 -0500
|
|
|
|
From: TeamSpeak Sales <sales@tritoncia.com>
|
|
|
|
To: 'Marc Weber' <marco-oweber@gmx.de>
|
|
|
|
Subject: RE: teamspeak on nix?
|
|
|
|
|
|
|
|
Yes, that would be fine. As long as you are not renting servers or selling
|
|
|
|
TeamSpeak then you are more than welcome to distribute it.
|
|
|
|
|
|
|
|
Thank you,
|
|
|
|
|
|
|
|
TeamSpeak Sales Team
|
|
|
|
________________________________
|
|
|
|
e-Mail: sales@tritoncia.com
|
|
|
|
TeamSpeak: http://www.TeamSpeak.com
|
|
|
|
Account Login: https://sales.TritonCIA.com/users
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-----Original Message-----
|
|
|
|
From: Marc Weber [mailto:marco-oweber@gmx.de]
|
|
|
|
Sent: Monday, December 10, 2007 5:03 PM
|
|
|
|
To: sales@tritoncia.com
|
|
|
|
Subject: teamspeak on nix?
|
|
|
|
|
|
|
|
Hello,
|
|
|
|
|
|
|
|
nix is very young software distribution system (http://nix.cs.uu.nl/)
|
|
|
|
I'd like to ask wether you permit us to add teamspeak (server/ client?)
|
|
|
|
|
|
|
|
Sincerly
|
|
|
|
Marc Weber (small nix contributor)
|
|
|
|
*/
|