mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 12:53:59 +03:00
teamspeak_client: create .desktop file
This commit is contained in:
parent
35f8386e78
commit
aae3bdab03
@ -1,6 +1,6 @@
|
||||
{ stdenv, fetchurl, makeWrapper, zlib, glib, libpng, freetype, xorg
|
||||
, fontconfig, xlibs, qt5, xkeyboard_config, alsaLib, libpulseaudio ? null
|
||||
, libredirect, quazip, less, which
|
||||
{ stdenv, fetchurl, makeWrapper, makeDesktopItem, zlib, glib, libpng, freetype
|
||||
, xorg, fontconfig, xlibs, qt5, xkeyboard_config, alsaLib, libpulseaudio ? null
|
||||
, libredirect, quazip, less, which, unzip
|
||||
}:
|
||||
|
||||
let
|
||||
@ -15,6 +15,16 @@ let
|
||||
xlibs.libxcb fontconfig xorg.libXext xorg.libX11 alsaLib qt5.base libpulseaudio
|
||||
];
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
name = "teamspeak";
|
||||
exec = "ts3client";
|
||||
icon = "teamspeak";
|
||||
comment = "The TeamSpeak voice communication tool";
|
||||
desktopName = "TeamSpeak";
|
||||
genericName = "TeamSpeak";
|
||||
categories = "Network";
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -33,7 +43,13 @@ stdenv.mkDerivation rec {
|
||||
else "1b3nbvfpd8lx3dig8z5yk6zjkbmsy6y938dhj1f562wc8adixciz";
|
||||
};
|
||||
|
||||
buildInputs = [ makeWrapper less which ];
|
||||
# grab the plugin sdk for the desktop icon
|
||||
pluginsdk = fetchurl {
|
||||
url = "http://dl.4players.de/ts/client/pluginsdk/pluginsdk_3.0.16.zip";
|
||||
sha256 = "1qpqpj3r21wff3ly9ail4l6b57pcqycsh2hca926j14sdlvpv7kl";
|
||||
};
|
||||
|
||||
buildInputs = [ makeWrapper less which unzip ];
|
||||
|
||||
unpackPhase =
|
||||
''
|
||||
@ -62,6 +78,12 @@ stdenv.mkDerivation rec {
|
||||
mkdir -p $out/lib/teamspeak
|
||||
mv * $out/lib/teamspeak/
|
||||
|
||||
# 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/
|
||||
|
||||
# Make a symlink to the binary from bin.
|
||||
mkdir -p $out/bin/
|
||||
ln -s $out/lib/teamspeak/ts3client $out/bin/ts3client
|
||||
|
Loading…
Reference in New Issue
Block a user