From 249425ecb72677b415056bb872801f686b3a1e25 Mon Sep 17 00:00:00 2001 From: Lily Foster Date: Wed, 15 Mar 2023 10:06:32 -0400 Subject: [PATCH 1/2] teams-for-linux: 1.0.45 -> 1.0.53 The biggest changes are having macOS support and having a multi-account command-line flag. See all other changes at macOS support is not currently working so it has been marked broken after expanding `meta.platforms`. --- .../teams-for-linux/default.nix | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/teams-for-linux/default.nix b/pkgs/applications/networking/instant-messengers/teams-for-linux/default.nix index 51a127446d92..c400250f2053 100644 --- a/pkgs/applications/networking/instant-messengers/teams-for-linux/default.nix +++ b/pkgs/applications/networking/instant-messengers/teams-for-linux/default.nix @@ -4,10 +4,10 @@ , makeWrapper , makeDesktopItem , copyDesktopItems -, fixup_yarn_lock , yarn , nodejs , fetchYarnDeps +, fixup_yarn_lock , electron , libpulseaudio , pipewire @@ -15,18 +15,18 @@ stdenv.mkDerivation rec { pname = "teams-for-linux"; - version = "1.0.45"; + version = "1.0.53"; src = fetchFromGitHub { owner = "IsmaelMartinez"; repo = pname; rev = "v${version}"; - sha256 = "sha256-Q6DFegFrLUW/YiRyYJI4ITVVyMC5IkazlzhdR8203cY="; + sha256 = "sha256-zigcOshtRQuQxJBXPWVmTjj5+4AorR5WW8lHVInUKFg="; }; offlineCache = fetchYarnDeps { - yarnLock = src + "/yarn.lock"; - sha256 = "sha256-jaAieO5q+tNfWN7Rp6ueasl45cfp9W1QxPdqIeCnVkE="; + yarnLock = "${src}/yarn.lock"; + sha256 = "sha256-3zjmVIPQ+F2jPQ2xkAv5hQUjr8k5jIHTsa73J+IMayw="; }; nativeBuildInputs = [ yarn fixup_yarn_lock nodejs copyDesktopItems makeWrapper ]; @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { runHook preBuild yarn --offline electron-builder \ - --dir --linux ${if stdenv.hostPlatform.isAarch64 then "--arm64" else "--x64"} \ + --dir ${if stdenv.isDarwin then "--macos" else "--linux"} ${if stdenv.hostPlatform.isAarch64 then "--arm64" else "--x64"} \ -c.electronDist=${electron}/lib/electron \ -c.electronVersion=${electron.version} @@ -58,7 +58,7 @@ stdenv.mkDerivation rec { runHook preInstall mkdir -p $out/share/{applications,teams-for-linux} - cp dist/linux-${lib.optionalString stdenv.hostPlatform.isAarch64 "arm64-"}unpacked/resources/app.asar $out/share/teams-for-linux/ + cp dist/${if stdenv.isDarwin then "darwin-" else "linux-"}${lib.optionalString stdenv.hostPlatform.isAarch64 "arm64-"}unpacked/resources/app.asar $out/share/teams-for-linux/ pushd build/icons for image in *png; do @@ -68,7 +68,7 @@ stdenv.mkDerivation rec { popd makeWrapper '${electron}/bin/electron' "$out/bin/teams-for-linux" \ - --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libpulseaudio pipewire ]} \ + ${lib.optionalString stdenv.isLinux "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libpulseaudio pipewire ]}"} \ --add-flags "$out/share/teams-for-linux/app.asar" \ --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" @@ -88,7 +88,8 @@ stdenv.mkDerivation rec { description = "Unofficial Microsoft Teams client for Linux"; homepage = "https://github.com/IsmaelMartinez/teams-for-linux"; license = licenses.gpl3Only; - maintainers = with maintainers; [ muscaln ]; - platforms = [ "x86_64-linux" "aarch64-linux" ]; + maintainers = with maintainers; [ muscaln lilyinstarlight ]; + platforms = platforms.unix; + broken = stdenv.isDarwin; }; } From fadb7ecfc201119940db87651734ab6184615ae0 Mon Sep 17 00:00:00 2001 From: Lily Foster Date: Wed, 8 Mar 2023 10:28:55 -0500 Subject: [PATCH 2/2] teams-for-linux: fix notification sounds --- .../instant-messengers/teams-for-linux/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/instant-messengers/teams-for-linux/default.nix b/pkgs/applications/networking/instant-messengers/teams-for-linux/default.nix index c400250f2053..705f1ffe66b0 100644 --- a/pkgs/applications/networking/instant-messengers/teams-for-linux/default.nix +++ b/pkgs/applications/networking/instant-messengers/teams-for-linux/default.nix @@ -11,6 +11,7 @@ , electron , libpulseaudio , pipewire +, alsa-utils }: stdenv.mkDerivation rec { @@ -67,8 +68,12 @@ stdenv.mkDerivation rec { done popd + # Linux needs 'aplay' for notification sounds, 'libpulse' for meeting sound, and 'libpipewire' for screen sharing makeWrapper '${electron}/bin/electron' "$out/bin/teams-for-linux" \ - ${lib.optionalString stdenv.isLinux "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libpulseaudio pipewire ]}"} \ + ${lib.optionalString stdenv.isLinux '' + --prefix PATH : ${lib.makeBinPath [ alsa-utils ]} \ + --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libpulseaudio pipewire ]} \ + ''} \ --add-flags "$out/share/teams-for-linux/app.asar" \ --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"