diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-10-20 22:09:03 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-10-20 22:09:03 +0000 |
commit | 50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e (patch) | |
tree | f2556b911180125ccbb7ed0e78a54e92da89adce /nixpkgs/pkgs/applications/networking/instant-messengers/teams/default.nix | |
parent | 4c16d4548a98563c9d9ad76f4e5b2202864ccd54 (diff) | |
parent | cfc75eec4603c06503ae750f88cf397e00796ea8 (diff) | |
download | nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.gz nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.bz2 nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.lz nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.xz nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.zst nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.zip |
Merge commit 'cfc75eec4603c06503ae750f88cf397e00796ea8'
Conflicts: nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/instant-messengers/teams/default.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/networking/instant-messengers/teams/default.nix | 123 |
1 files changed, 2 insertions, 121 deletions
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/teams/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/teams/default.nix index 601643edcfd6..ce52a641124e 100644 --- a/nixpkgs/pkgs/applications/networking/instant-messengers/teams/default.nix +++ b/nixpkgs/pkgs/applications/networking/instant-messengers/teams/default.nix @@ -1,34 +1,17 @@ { lib , stdenv -, runtimeShell , fetchurl -, autoPatchelfHook -, wrapGAppsHook -, dpkg -, atomEnv -, libuuid -, libappindicator-gtk3 -, pulseaudio -, at-spi2-atk -, coreutils -, gawk -, xdg-utils -, systemd -, asar , xar , cpio , makeWrapper -, enableRectOverlay ? false }: let pname = "teams"; versions = { - linux = "1.5.00.23861"; darwin = "1.6.00.4464"; }; hashes = { - linux = "sha256-h0YnCeJX//l4TegJVZtavV3HrxjYUF2Fa5KmaYmZW8E="; darwin = "sha256-DvXMrXotKWUqFCb7rZj8wU7mmZJKuTLGyx8qOB/aQtg="; }; meta = with lib; { @@ -38,112 +21,10 @@ let sourceProvenance = with sourceTypes; [ binaryNativeCode ]; license = licenses.unfree; maintainers = with maintainers; [ liff tricktron ]; - platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ]; + platforms = [ "x86_64-darwin" "aarch64-darwin" ]; mainProgram = "teams"; }; - linux = stdenv.mkDerivation rec { - inherit pname meta; - version = versions.linux; - - src = fetchurl { - urls = [ - "https://packages.microsoft.com/repos/ms-teams/pool/main/t/teams/teams_${versions.linux}_amd64.deb" - # NOTE: the archive.org timestamp must also be updated if the version changes. - "https://web.archive.org/web/20221130115842if_/https://packages.microsoft.com/repos/ms-teams/pool/main/t/teams/teams_${versions.linux}_amd64.deb" - ]; - hash = hashes.linux; - }; - - nativeBuildInputs = [ dpkg autoPatchelfHook wrapGAppsHook asar ]; - - unpackCmd = "dpkg -x $curSrc ."; - - buildInputs = atomEnv.packages ++ [ - libuuid - at-spi2-atk - ]; - - runtimeDependencies = [ - (lib.getLib systemd) - pulseaudio - libappindicator-gtk3 - ]; - - preFixup = '' - gappsWrapperArgs+=( - --prefix PATH : "${coreutils}/bin:${gawk}/bin" - - # fix for https://docs.microsoft.com/en-us/answers/questions/298724/open-teams-meeting-link-on-linux-doens39t-work.html?childToView=309406#comment-309406 - --append-flags '--disable-namespace-sandbox --disable-setuid-sandbox' - ) - ''; - - - buildPhase = '' - runHook preBuild - - asar extract share/teams/resources/app.asar "$TMP/work" - substituteInPlace $TMP/work/main.bundle.js \ - --replace "/usr/share/pixmaps/" "$out/share/pixmaps" \ - --replace "/usr/bin/xdg-mime" "${xdg-utils}/bin/xdg-mime" \ - --replace "Exec=/usr/bin/" "Exec=" # Remove usage of absolute path in autostart. - asar pack --unpack='{*.node,*.ftz,rect-overlay}' "$TMP/work" share/teams/resources/app.asar - - runHook postBuild - ''; - - preferLocalBuild = true; - - installPhase = '' - runHook preInstall - - mkdir -p $out/{opt,bin} - - mv share/teams $out/opt/ - mv share $out/share - - mkdir -p $out/share/icons/hicolor/512x512/apps - mv $out/share/pixmaps/teams.png $out/share/icons/hicolor/512x512/apps - rmdir $out/share/pixmaps - - substituteInPlace $out/share/applications/teams.desktop \ - --replace /usr/bin/ "" - - ln -s $out/opt/teams/teams $out/bin/ - - ${lib.optionalString (!enableRectOverlay) '' - # Work-around screen sharing bug - # https://docs.microsoft.com/en-us/answers/questions/42095/sharing-screen-not-working-anymore-bug.html - rm $out/opt/teams/resources/app.asar.unpacked/node_modules/slimcore/bin/rect-overlay - ''} - - runHook postInstall - ''; - - dontAutoPatchelf = true; - - # Includes runtimeDependencies in the RPATH of the included Node modules - # so that dynamic loading works. We cannot use directly runtimeDependencies - # here, since the libraries from runtimeDependencies are not propagated - # to the dynamically loadable node modules because of a condition in - # autoPatchElfHook since *.node modules have Type: DYN (Shared object file) - # instead of EXEC or INTERP it expects. - # Fixes: https://github.com/NixOS/nixpkgs/issues/85449 - postFixup = '' - autoPatchelf "$out" - - runtime_rpath="${lib.makeLibraryPath runtimeDependencies}" - - for mod in $(find "$out/opt/teams" -name '*.node'); do - mod_rpath="$(patchelf --print-rpath "$mod")" - - echo "Adding runtime dependencies to RPATH of Node module $mod" - patchelf --set-rpath "$runtime_rpath:$mod_rpath" "$mod" - done; - ''; - }; - appName = "Teams.app"; darwin = stdenv.mkDerivation { @@ -178,4 +59,4 @@ let in if stdenv.isDarwin then darwin -else linux +else throw "Teams app for Linux has been removed as it is unmaintained by upstream. (2023-09-29)" |