blob: e0fcae460b42ba48052f6a34945a2aeca9e975e9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
{ lib
, stdenv
, fetchurl
, xar
, cpio
, makeWrapper
}:
let
pname = "teams";
versions = {
darwin = "1.6.00.4464";
};
hashes = {
darwin = "sha256-DvXMrXotKWUqFCb7rZj8wU7mmZJKuTLGyx8qOB/aQtg=";
};
meta = with lib; {
description = "Microsoft Teams";
homepage = "https://teams.microsoft.com";
downloadPage = "https://teams.microsoft.com/downloads";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
maintainers = with maintainers; [ tricktron ];
platforms = [ "x86_64-darwin" "aarch64-darwin" ];
mainProgram = "teams";
};
appName = "Teams.app";
in
stdenv.mkDerivation {
inherit pname meta;
version = versions.darwin;
src = fetchurl {
url = "https://statics.teams.cdn.office.net/production-osx/${versions.darwin}/Teams_osx.pkg";
hash = hashes.darwin;
};
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
'';
}
|