Merge pull request #65224 from Mic92/teamspeak

teamspeak_server: add missing libstdc++
This commit is contained in:
Jörg Thalheim 2019-07-21 15:17:31 +01:00 committed by GitHub
commit 104f8a0e1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, makeWrapper }:
{ stdenv, fetchurl, makeWrapper, autoPatchelfHook }:
let
version = "3.8.0";
@ -16,47 +16,23 @@ stdenv.mkDerivation {
];
sha256 = if stdenv.is64bit
then "1bzmqqqpwn6q2pvkrkkxq0ggs8crxbkwaxlggcdxjlyg95cyq8k1"
else "0s835dnaw662sb2v5ahqiwry0qjcpl7ff9krnhbw2iblsbqis3fj";
else "0p5rqwdsvbria5dzjjm5mj8vfy0zpfs669wpbwxd4g3n4vh03kyw";
};
buildInputs = [ makeWrapper ];
nativeBuildInputs = [ makeWrapper autoPatchelfHook ];
buildPhase =
''
echo "patching ts3server"
patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath $(cat $NIX_CC/nix-support/orig-cc)/${libDir} \
--force-rpath \
ts3server
cp tsdns/tsdnsserver tsdnsserver
patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath $(cat $NIX_CC/nix-support/orig-cc)/${libDir} \
--force-rpath \
tsdnsserver
'';
buildInputs = [ stdenv.cc.cc ];
installPhase =
''
# Delete unecessary libraries - these are provided by nixos.
#rm *.so*
installPhase = ''
# Install files.
mkdir -p $out/lib/teamspeak
mv * $out/lib/teamspeak/
# Install files.
mkdir -p $out/lib/teamspeak
mv * $out/lib/teamspeak/
# Make symlinks to the binaries from bin.
mkdir -p $out/bin/
ln -s $out/lib/teamspeak/ts3server $out/bin/ts3server
ln -s $out/lib/teamspeak/tsdnsserver $out/bin/tsdnsserver
wrapProgram $out/lib/teamspeak/ts3server --prefix LD_LIBRARY_PATH : $out/lib/teamspeak
wrapProgram $out/lib/teamspeak/tsdnsserver --prefix LD_LIBRARY_PATH : $out/lib/tsdnsserver
'';
dontStrip = true;
dontPatchELF = true;
# Make symlinks to the binaries from bin.
mkdir -p $out/bin/
ln -s $out/lib/teamspeak/ts3server $out/bin/ts3server
ln -s $out/lib/teamspeak/tsdnsserver $out/bin/tsdnsserver
'';
meta = {
description = "TeamSpeak voice communication server";