2019-12-11 12:38:30 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
2022-02-02 16:58:34 +00:00
|
|
|
, xar
|
|
|
|
, cpio
|
|
|
|
, makeWrapper
|
|
|
|
}:
|
2019-12-11 12:38:30 +00:00
|
|
|
|
2022-02-02 16:58:34 +00:00
|
|
|
let
|
2019-12-11 12:38:30 +00:00
|
|
|
pname = "teams";
|
2022-09-20 06:22:25 +00:00
|
|
|
versions = {
|
2023-03-17 18:47:31 +00:00
|
|
|
darwin = "1.6.00.4464";
|
2022-09-20 06:22:25 +00:00
|
|
|
};
|
|
|
|
hashes = {
|
2023-03-17 18:47:31 +00:00
|
|
|
darwin = "sha256-DvXMrXotKWUqFCb7rZj8wU7mmZJKuTLGyx8qOB/aQtg=";
|
2022-09-20 06:22:25 +00:00
|
|
|
};
|
2022-02-02 16:58:34 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Microsoft Teams";
|
|
|
|
homepage = "https://teams.microsoft.com";
|
|
|
|
downloadPage = "https://teams.microsoft.com/downloads";
|
2022-06-04 22:19:25 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2022-02-02 16:58:34 +00:00
|
|
|
license = licenses.unfree;
|
2023-12-31 09:47:42 +00:00
|
|
|
maintainers = with maintainers; [ tricktron ];
|
2023-09-28 10:37:11 +00:00
|
|
|
platforms = [ "x86_64-darwin" "aarch64-darwin" ];
|
2023-08-04 15:10:24 +00:00
|
|
|
mainProgram = "teams";
|
2019-12-11 12:38:30 +00:00
|
|
|
};
|
|
|
|
|
2022-02-02 16:58:34 +00:00
|
|
|
appName = "Teams.app";
|
2023-12-22 18:24:52 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit pname meta;
|
|
|
|
version = versions.darwin;
|
2022-02-02 16:58:34 +00:00
|
|
|
|
2023-12-22 18:24:52 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://statics.teams.cdn.office.net/production-osx/${versions.darwin}/Teams_osx.pkg";
|
|
|
|
hash = hashes.darwin;
|
2019-12-11 12:38:30 +00:00
|
|
|
};
|
2023-12-22 18:24:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ xar cpio makeWrapper ];
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
xar -xf $src
|
|
|
|
zcat < Teams_osx_app.pkg/Payload | cpio -i
|
|
|
|
'';
|
|
|
|
|
|
|
|
sourceRoot = "Microsoft\ Teams.app";
|
|
|
|
dontPatch = true;
|
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/{Applications/${appName},bin}
|
|
|
|
cp -R . $out/Applications/${appName}
|
|
|
|
makeWrapper $out/Applications/${appName}/Contents/MacOS/Teams $out/bin/teams
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
}
|