Skip to content

Commit

Permalink
WIP Add teamtalk5
Browse files Browse the repository at this point in the history
Add self to maintainers

Package TeamTalk5 - https://bearware.dk
  • Loading branch information
347Online committed Jan 25, 2025
1 parent 1de8742 commit 0cadd12
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 0 deletions.
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,12 @@
github = "2gn";
githubId = 101851090;
};
_347Online = {
name = "Katie Janzen";
email = "[email protected]";
github = "347Online";
githubid = 38228372;
};
_360ied = {
name = "Brian Zhu";
email = "[email protected]";
Expand Down
85 changes: 85 additions & 0 deletions pkgs/by-name/te/teamtalk5/package.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
})

0 comments on commit 0cadd12

Please sign in to comment.