nixpkgs/pkgs/applications/networking/instant-messengers/teams/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

59 lines
1.3 KiB
Nix
Raw Normal View History

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";
versions = {
darwin = "1.6.00.4464";
};
hashes = {
darwin = "sha256-DvXMrXotKWUqFCb7rZj8wU7mmZJKuTLGyx8qOB/aQtg=";
};
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";
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 ];
platforms = [ "x86_64-darwin" "aarch64-darwin" ];
mainProgram = "teams";
2019-12-11 12:38:30 +00:00
};
2022-02-02 16:58:34 +00:00
appName = "Teams.app";
in
stdenv.mkDerivation {
inherit pname meta;
version = versions.darwin;
2022-02-02 16:58:34 +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
};
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
'';
}