2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, makeWrapper, makeDesktopItem, zlib, glib, libpng, freetype, openssl
|
2020-05-10 19:02:19 +00:00
|
|
|
, xorg, fontconfig, qtbase, qtwebengine, qtwebchannel, qtsvg, qtwebsockets, xkeyboard_config
|
2022-03-01 08:46:59 +00:00
|
|
|
, alsa-lib, libpulseaudio ? null, libredirect, quazip, which, unzip, llvmPackages_10, writeShellScriptBin
|
2014-09-12 13:21:31 +00:00
|
|
|
}:
|
2010-10-28 17:45:18 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
|
2013-11-20 05:46:55 +00:00
|
|
|
arch = if stdenv.is64bit then "amd64" else "x86";
|
2015-10-11 12:31:41 +00:00
|
|
|
|
2010-10-28 17:45:18 +00:00
|
|
|
libDir = if stdenv.is64bit then "lib64" else "lib";
|
|
|
|
|
|
|
|
deps =
|
2017-06-07 13:29:22 +00:00
|
|
|
[ zlib glib libpng freetype xorg.libSM xorg.libICE xorg.libXrender openssl
|
2014-09-12 13:21:31 +00:00
|
|
|
xorg.libXrandr xorg.libXfixes xorg.libXcursor xorg.libXinerama
|
2021-06-10 02:57:09 +00:00
|
|
|
xorg.libxcb fontconfig xorg.libXext xorg.libX11 alsa-lib qtbase qtwebengine qtwebchannel qtsvg
|
2022-03-01 08:46:59 +00:00
|
|
|
qtwebsockets libpulseaudio quazip llvmPackages_10.libcxx llvmPackages_10.libcxxabi # llvmPackages_11 and higher crash https://github.com/NixOS/nixpkgs/issues/161395
|
2010-10-28 17:45:18 +00:00
|
|
|
];
|
|
|
|
|
2015-07-24 03:03:02 +00:00
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "teamspeak";
|
|
|
|
exec = "ts3client";
|
|
|
|
icon = "teamspeak";
|
|
|
|
comment = "The TeamSpeak voice communication tool";
|
|
|
|
desktopName = "TeamSpeak";
|
|
|
|
genericName = "TeamSpeak";
|
2022-02-22 14:56:15 +00:00
|
|
|
categories = [ "Network" ];
|
2015-07-24 03:03:02 +00:00
|
|
|
};
|
|
|
|
|
2019-09-25 19:36:39 +00:00
|
|
|
fakeLess = writeShellScriptBin "less" "cat";
|
|
|
|
|
2010-10-28 17:45:18 +00:00
|
|
|
in
|
|
|
|
|
2014-08-10 17:05:15 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "teamspeak-client";
|
2010-10-28 17:45:18 +00:00
|
|
|
|
2020-11-07 13:37:58 +00:00
|
|
|
version = "3.5.6";
|
2014-08-10 17:05:15 +00:00
|
|
|
|
2010-10-28 17:45:18 +00:00
|
|
|
src = fetchurl {
|
2019-07-28 08:02:36 +00:00
|
|
|
url = "https://files.teamspeak-services.com/releases/client/${version}/TeamSpeak3-Client-linux_${arch}-${version}.run";
|
2015-10-11 12:31:41 +00:00
|
|
|
sha256 = if stdenv.is64bit
|
2020-11-07 13:37:58 +00:00
|
|
|
then "sha256:0hjai1bd4mq3g2dlyi0zkn8s4zlgxd38skw77mb78nc4di5gvgpg"
|
|
|
|
else "sha256:1y1c65nap91nv9xkvd96fagqbfl56p9n0rl6iac0i29bkysdmija";
|
2010-10-28 17:45:18 +00:00
|
|
|
};
|
|
|
|
|
2015-07-24 03:03:02 +00:00
|
|
|
# grab the plugin sdk for the desktop icon
|
|
|
|
pluginsdk = fetchurl {
|
2017-09-17 15:58:22 +00:00
|
|
|
url = "http://dl.4players.de/ts/client/pluginsdk/pluginsdk_3.1.1.1.zip";
|
|
|
|
sha256 = "1bywmdj54glzd0kffvr27r84n4dsd0pskkbmh59mllbxvj0qwy7f";
|
2015-07-24 03:03:02 +00:00
|
|
|
};
|
|
|
|
|
2019-09-25 19:36:39 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper fakeLess which unzip ];
|
2014-08-10 17:05:15 +00:00
|
|
|
|
2010-10-28 17:45:18 +00:00
|
|
|
unpackPhase =
|
|
|
|
''
|
2019-09-25 19:36:39 +00:00
|
|
|
echo -e '\ny' | sh -xe $src
|
2010-10-28 17:45:18 +00:00
|
|
|
cd TeamSpeak*
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase =
|
|
|
|
''
|
2013-11-20 05:46:55 +00:00
|
|
|
mv ts3client_linux_${arch} ts3client
|
|
|
|
echo "patching ts3client..."
|
2021-05-02 11:55:06 +00:00
|
|
|
patchelf --replace-needed libquazip.so ${quazip}/lib/libquazip1-qt5.so ts3client
|
2013-11-20 05:46:55 +00:00
|
|
|
patchelf \
|
2014-12-17 18:11:30 +00:00
|
|
|
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
2021-01-15 05:42:41 +00:00
|
|
|
--set-rpath ${lib.makeLibraryPath deps}:$(cat $NIX_CC/nix-support/orig-cc)/${libDir} \
|
2013-11-20 05:46:55 +00:00
|
|
|
--force-rpath \
|
|
|
|
ts3client
|
2010-10-28 17:45:18 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase =
|
|
|
|
''
|
2013-11-20 05:46:55 +00:00
|
|
|
# Delete unecessary libraries - these are provided by nixos.
|
2015-10-13 11:12:41 +00:00
|
|
|
rm *.so.* *.so
|
2017-06-07 13:29:22 +00:00
|
|
|
rm QtWebEngineProcess
|
2014-08-16 08:34:09 +00:00
|
|
|
rm qt.conf
|
2018-05-27 13:13:23 +00:00
|
|
|
rm -r platforms # contains libqxcb.so
|
2013-11-20 05:46:55 +00:00
|
|
|
|
|
|
|
# Install files.
|
2010-10-28 17:45:18 +00:00
|
|
|
mkdir -p $out/lib/teamspeak
|
|
|
|
mv * $out/lib/teamspeak/
|
2013-11-20 05:46:55 +00:00
|
|
|
|
2015-07-24 03:03:02 +00:00
|
|
|
# Make a desktop item
|
2021-09-02 03:18:34 +00:00
|
|
|
mkdir -p $out/share/applications/ $out/share/icons/hicolor/64x64/apps/
|
2015-07-24 03:03:02 +00:00
|
|
|
unzip ${pluginsdk}
|
2021-09-02 03:18:34 +00:00
|
|
|
cp pluginsdk/docs/client_html/images/logo.png $out/share/icons/hicolor/64x64/apps/teamspeak.png
|
2015-07-24 03:03:02 +00:00
|
|
|
cp ${desktopItem}/share/applications/* $out/share/applications/
|
|
|
|
|
2013-11-20 05:46:55 +00: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 17:05:15 +00:00
|
|
|
|
|
|
|
wrapProgram $out/bin/ts3client \
|
2015-10-13 11:12:41 +00:00
|
|
|
--set LD_PRELOAD "${libredirect}/lib/libredirect.so" \
|
2018-05-27 13:13:23 +00:00
|
|
|
--set QT_PLUGIN_PATH "${qtbase}/${qtbase.qtPluginPrefix}" \
|
2022-06-25 18:52:26 +00:00
|
|
|
'' /* wayland is currently broken, remove when TS3 fixes that */ + ''
|
|
|
|
--set QT_QPA_PLATFORM xcb \
|
2014-08-10 17:05:15 +00:00
|
|
|
--set NIX_REDIRECTS /usr/share/X11/xkb=${xkeyboard_config}/share/X11/xkb
|
2010-10-28 17:45:18 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
dontStrip = true;
|
|
|
|
dontPatchELF = true;
|
2015-10-11 12:31:41 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2010-10-28 17:45:18 +00:00
|
|
|
description = "The TeamSpeak voice communication tool";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://teamspeak.com/";
|
2022-06-04 22:19:25 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2016-07-17 02:32:48 +00:00
|
|
|
license = {
|
|
|
|
fullName = "Teamspeak client license";
|
2020-11-07 13:37:58 +00:00
|
|
|
url = "https://www.teamspeak.com/en/privacy-and-terms/";
|
2016-07-17 02:32:48 +00:00
|
|
|
free = false;
|
|
|
|
};
|
2020-11-07 13:37:58 +00:00
|
|
|
maintainers = with maintainers; [ lhvwb lukegb ];
|
2018-02-11 13:25:34 +00:00
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
2010-10-28 17:45:18 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2007-12-14 01:50:19 +00: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)
|
|
|
|
*/
|