From 0cadd12e23e507932bcbbdabfb24edd393187999 Mon Sep 17 00:00:00 2001 From: 347Online | Katie Janzen Date: Fri, 24 Jan 2025 18:46:40 -0600 Subject: [PATCH] WIP Add teamtalk5 Add self to maintainers Package TeamTalk5 - https://bearware.dk --- maintainers/maintainer-list.nix | 6 ++ pkgs/by-name/te/teamtalk5/package.nix | 85 +++++++++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 pkgs/by-name/te/teamtalk5/package.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index a26e5c1c7106c0..7e1b47a5c38f5a 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -192,6 +192,12 @@ github = "2gn"; githubId = 101851090; }; + _347Online = { + name = "Katie Janzen"; + email = "katiejanzen@347online.me"; + github = "347Online"; + githubid = 38228372; + }; _360ied = { name = "Brian Zhu"; email = "therealbarryplayer@gmail.com"; diff --git a/pkgs/by-name/te/teamtalk5/package.nix b/pkgs/by-name/te/teamtalk5/package.nix new file mode 100644 index 00000000000000..0077d3ad31a345 --- /dev/null +++ b/pkgs/by-name/te/teamtalk5/package.nix @@ -0,0 +1,85 @@ +{ + stdenv, + lib, + fetchurl, + makeWrapper, + xar, + cpio, +}: +let + inherit (stdenv.hostPlatform) system; + throwSystem = throw "Unsupported system: ${stdenv.system}"; +in +stdenv.mkDerivation (finalAttrs: { + pname = "teamtalk5"; + version = "v5.17"; + + src = + let + version = finalAttrs.version; + in + rec { + aarch64-darwin = fetchurl { + url = "https://bearware.dk/teamtalk/${version}/TeamTalk_${version}_Setup.pkg"; + name = "TeamTalk_${version}_Setup.pkg"; + hash = "sha256-oSl9cw0/rnOiqjZy3UBLOB3++CZUoe/LeMFM/jfgyZM="; + }; + # App is universal + x86_64-darwin = aarch64-darwin; + } + .${stdenv.system} or throwSystem; + + dontUnpack = stdenv.hostPlatform.isLinux; + unpackPhase = lib.optionalString stdenv.hostPlatform.isDarwin '' + xar -xf $src + zcat < dk.bearware.TeamTalk5.pkg/Payload | cpio -i + ''; + + installPhase = '' + runHook preInstall + ${ + rec { + aarch64-darwin = '' + mkdir -p $out/Applications + cp -R TeamTalk5.app $out/Applications/ + ''; + # darwin steps same on both architectures + x86_64-darwin = aarch64-darwin; + } + .${system} or throwSystem + } + runHook postInstall + ''; + + postFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' + makeWrapper $out/Applications/TeamTalk5.app/Contents/MacOS/TeamTalk5 $out/bin/teamtalk + ''; + + nativeBuildInputs = + [ + makeWrapper + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + xar + cpio + ]; + + # passthru.updateScript = lib.getExe (writeShellApplication { + # name = "teamtalk5-update-script" + # text = throw "TODO"; + # }); + + meta = { + description = "TeamTalk 5 is a freeware conferencing system which allows multiple users to participate in audio and video conversations."; + homepage = "https://bearware.dk"; + license = lib.licenses.unfree; + maintainers = with lib.maintainers; [ + _347online + ]; + platforms = [ + "aarch64-darwin" + "x86_64-darwin" + ]; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + }; +})