about summary refs log tree commit diff
path: root/pkgs/applications/networking/instant-messengers/teamspeak
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2019-07-21 15:08:05 +0100
committerJörg Thalheim <joerg@thalheim.io>2019-07-21 15:11:44 +0100
commite4230452beb5b1dbdc9e11d44d330f912c3fe8c9 (patch)
tree844bee9f70a3e23e5ad8ef7358c67c68a21714d5 /pkgs/applications/networking/instant-messengers/teamspeak
parent421ee6692491f6a9d17ff2631b56740fc17237cd (diff)
teamspeak_server: add missing libstdc++
Also convert to autoPatchelfHook.
Diffstat (limited to 'pkgs/applications/networking/instant-messengers/teamspeak')
-rw-r--r--pkgs/applications/networking/instant-messengers/teamspeak/server.nix54
1 files changed, 15 insertions, 39 deletions
diff --git a/pkgs/applications/networking/instant-messengers/teamspeak/server.nix b/pkgs/applications/networking/instant-messengers/teamspeak/server.nix
index fe1903af5880e..08561f978664a 100644
--- a/pkgs/applications/networking/instant-messengers/teamspeak/server.nix
+++ b/pkgs/applications/networking/instant-messengers/teamspeak/server.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, makeWrapper }:
+{ stdenv, fetchurl, makeWrapper, autoPatchelfHook }:
 
 let
   version = "3.8.0";
@@ -19,44 +19,20 @@ stdenv.mkDerivation {
       else "0s835dnaw662sb2v5ahqiwry0qjcpl7ff9krnhbw2iblsbqis3fj";
   };
 
-  buildInputs = [ makeWrapper ];
-
-  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
-    '';
-
-  installPhase =
-    ''
-      # Delete unecessary libraries - these are provided by nixos.
-      #rm *.so*
-
-      # 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;
+  nativeBuildInputs = [ makeWrapper autoPatchelfHook ];
+
+  buildInputs = [ stdenv.cc.cc ];
+
+  installPhase = ''
+    # 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
+  '';
 
   meta = {
     description = "TeamSpeak voice communication server";