Unverified Commit 547acecd authored by Gutyina Gergő's avatar Gutyina Gergő Committed by GitHub
Browse files

teamspeak5_client: 5.0.0-beta77 -> 6.0.0-beta2; teamspeak refactors (#377748)

* teamspeak5_client: 5.0.0-beta77 -> 6.0.0-beta2, rename to teamspeak-6-client

* teamspeak6-client: refactor

* lib.licenses: add teamspeak license

* teamspeak{3,_server,6-client}: use teamspeak license

* teamspeak{6-client,_server}: move to pkgs/by-name

* teamspeak_server: fix meta.platforms

* teamspeak6-client: add update script
parent 651df657
Loading
Loading
Loading
Loading
+39 −0
Original line number Diff line number Diff line
@@ -1197,6 +1197,45 @@ lib.mapAttrs mkLicense ({
    redistributable = false; # only free to redistribute "for non-commercial purposes"
  };

  teamspeak = {
    fullName = "Teamspeak client license";
    url = "https://www.teamspeak.com/en/privacy-and-terms/";
    free = false;
    redistributable = true; # we got a permit to redistribute it:
    # 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)
  };

  tsl = {
    shortName = "TSL";
    fullName = "Timescale License Agreegment";
+0 −32
Original line number Diff line number Diff line
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)
+1 −6
Original line number Diff line number Diff line
@@ -126,12 +126,7 @@ stdenv.mkDerivation rec {
    description = "TeamSpeak voice communication tool";
    homepage = "https://teamspeak.com/";
    sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
    license = {
      # See distribution-permit.txt for a confirmation that nixpkgs is allowed to distribute TeamSpeak.
      fullName = "Teamspeak client license";
      url = "https://www.teamspeak.com/en/privacy-and-terms/";
      free = false;
    };
    license = lib.licenses.teamspeak;
    maintainers = with lib.maintainers; [
      lhvwb
      lukegb
+30 −22
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  stdenvNoCC,
  fetchurl,
  autoPatchelfHook,
  copyDesktopItems,
@@ -23,17 +23,17 @@
  libgbm,
  nss,
  udev,
  libGL,
  xorg,
}:

stdenv.mkDerivation rec {
  pname = "teamspeak5-client";
  version = "5.0.0-beta77";
stdenvNoCC.mkDerivation (finalAttrs: {
  pname = "teamspeak6-client";
  version = "6.0.0-beta2";

  src = fetchurl {
    # check https://teamspeak.com/en/downloads/#ts5 for version and checksum
    url = "https://files.teamspeak-services.com/pre_releases/client/${version}/teamspeak-client.tar.gz";
    sha256 = "6f3bf97b120d3c799cefc90c448e45836708a826d7caa07ad32b5c868eb9181b";
    url = "https://files.teamspeak-services.com/pre_releases/client/${finalAttrs.version}/teamspeak-client.tar.gz";
    hash = "sha256-3jNPv3uQ2RztR1p4XQNLUg5IVrvW/dcdtqXdiGJKVSs=";
  };

  sourceRoot = ".";
@@ -60,6 +60,7 @@ stdenv.mkDerivation rec {
    xorg.libXdamage
    xorg.libXfixes
    xorg.libxshmfence
    xorg.libXtst
  ];

  nativeBuildInputs = [
@@ -72,8 +73,8 @@ stdenv.mkDerivation rec {
    (makeDesktopItem {
      name = "TeamSpeak";
      exec = "TeamSpeak";
      icon = pname;
      desktopName = pname;
      icon = "teamspeak6-client";
      desktopName = "teamspeak6-client";
      comment = "TeamSpeak Voice Communication Client";
      categories = [
        "Audio"
@@ -90,26 +91,33 @@ stdenv.mkDerivation rec {
  installPhase = ''
    runHook preInstall

    mkdir -p $out/bin $out/share/${pname} $out/share/icons/hicolor/64x64/apps/
    mkdir -p $out/bin $out/share/teamspeak6-client $out/share/icons/hicolor/64x64/apps/

    cp -a * $out/share/${pname}
    cp logo-256.png $out/share/icons/hicolor/64x64/apps/${pname}.png
    cp -a * $out/share/teamspeak6-client
    cp logo-256.png $out/share/icons/hicolor/64x64/apps/teamspeak6-client.png

    makeWrapper $out/share/${pname}/TeamSpeak $out/bin/TeamSpeak \
      --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ udev ]}"
    makeWrapper $out/share/teamspeak6-client/TeamSpeak $out/bin/TeamSpeak \
      --prefix LD_LIBRARY_PATH : "${
        lib.makeLibraryPath [
          udev
          libGL
        ]
      }"

    runHook postInstall
  '';

  meta = with lib; {
  updateScript = ./update.sh;

  meta = {
    description = "TeamSpeak voice communication tool (beta version)";
    homepage = "https://teamspeak.com/";
    license = {
      fullName = "Teamspeak client license";
      url = "https://www.teamspeak.com/en/privacy-and-terms/";
      free = false;
    };
    maintainers = with maintainers; [ jojosch ];
    license = lib.licenses.teamspeak;
    mainProgram = "TeamSpeak";
    maintainers = with lib.maintainers; [
      gepbird
      jojosch
    ];
    platforms = [ "x86_64-linux" ];
  };
}
})
+21 −0
Original line number Diff line number Diff line
#!/usr/bin/env nix-shell
#!nix-shell --pure -i bash -p bash curl cacert ripgrep nix nix-update
set -euo pipefail

latest_version=$(
    curl https://teamspeak.com/en/downloads/#ts6client | \
    rg -o 'https://files.teamspeak-services.com/pre_releases/client/.*/teamspeak-client.tar.gz' | \
    head -n1 | \
    sed -n 's|.*/client/\(.*\)/teamspeak-client.tar.gz|\1|p'
)
current_version=$(nix eval --raw .#teamspeak6-client.version)

echo "latest  version: $latest_version"
echo "current version: $current_version"

if [[ "$latest_version" == "$current_version" ]]; then
    echo "package is up-to-date"
    exit 0
fi

nix-update teamspeak6-client --version $latest_version
Loading