Loading pkgs/applications/networking/instant-messengers/teams-for-linux/default.nix +54 −28 Original line number Diff line number Diff line { lib , stdenv , fetchFromGitHub , makeWrapper , makeDesktopItem , copyDesktopItems , yarn , nodejs , fetchYarnDeps , fixup-yarn-lock , electron , alsa-utils , which , testers , teams-for-linux { lib, stdenv, fetchFromGitHub, makeWrapper, makeDesktopItem, copyDesktopItems, yarn, nodejs, fetchYarnDeps, fixup-yarn-lock, electron, alsa-utils, which, testers, teams-for-linux, }: stdenv.mkDerivation (finalAttrs: { Loading @@ -31,7 +32,13 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-jBwyIyiWeqNmOnxmVOr7c4oMWwHElEjM25sShhTMi78="; }; nativeBuildInputs = [ yarn fixup-yarn-lock nodejs copyDesktopItems makeWrapper ]; nativeBuildInputs = [ yarn fixup-yarn-lock nodejs copyDesktopItems makeWrapper ]; configurePhase = '' runHook preConfigure Loading @@ -49,7 +56,9 @@ stdenv.mkDerivation (finalAttrs: { runHook preBuild yarn --offline electron-builder \ --dir ${if stdenv.isDarwin then "--macos" else "--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.dist} \ -c.electronVersion=${electron.version} Loading @@ -60,7 +69,9 @@ stdenv.mkDerivation (finalAttrs: { runHook preInstall mkdir -p $out/share/{applications,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/ 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 Loading @@ -72,7 +83,12 @@ stdenv.mkDerivation (finalAttrs: { # Linux needs 'aplay' for notification sounds makeWrapper '${electron}/bin/electron' "$out/bin/teams-for-linux" \ ${lib.optionalString stdenv.isLinux '' --prefix PATH : ${lib.makeBinPath [ alsa-utils which ]} \ --prefix PATH : ${ lib.makeBinPath [ alsa-utils which ] } \ ''} \ --add-flags "$out/share/teams-for-linux/app.asar" \ --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" Loading @@ -80,14 +96,20 @@ stdenv.mkDerivation (finalAttrs: { runHook postInstall ''; desktopItems = [(makeDesktopItem { desktopItems = [ (makeDesktopItem { name = finalAttrs.pname; exec = finalAttrs.pname; icon = finalAttrs.pname; desktopName = "Microsoft Teams for Linux"; comment = finalAttrs.meta.description; categories = [ "Network" "InstantMessaging" "Chat" ]; })]; categories = [ "Network" "InstantMessaging" "Chat" ]; }) ]; passthru.updateScript = ./update.sh; passthru.tests.version = testers.testVersion rec { Loading @@ -100,7 +122,11 @@ stdenv.mkDerivation (finalAttrs: { mainProgram = "teams-for-linux"; homepage = "https://github.com/IsmaelMartinez/teams-for-linux"; license = lib.licenses.gpl3Only; maintainers = with lib.maintainers; [ muscaln qjoly chvp ]; maintainers = with lib.maintainers; [ muscaln qjoly chvp ]; platforms = lib.platforms.unix; broken = stdenv.isDarwin; }; Loading Loading
pkgs/applications/networking/instant-messengers/teams-for-linux/default.nix +54 −28 Original line number Diff line number Diff line { lib , stdenv , fetchFromGitHub , makeWrapper , makeDesktopItem , copyDesktopItems , yarn , nodejs , fetchYarnDeps , fixup-yarn-lock , electron , alsa-utils , which , testers , teams-for-linux { lib, stdenv, fetchFromGitHub, makeWrapper, makeDesktopItem, copyDesktopItems, yarn, nodejs, fetchYarnDeps, fixup-yarn-lock, electron, alsa-utils, which, testers, teams-for-linux, }: stdenv.mkDerivation (finalAttrs: { Loading @@ -31,7 +32,13 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-jBwyIyiWeqNmOnxmVOr7c4oMWwHElEjM25sShhTMi78="; }; nativeBuildInputs = [ yarn fixup-yarn-lock nodejs copyDesktopItems makeWrapper ]; nativeBuildInputs = [ yarn fixup-yarn-lock nodejs copyDesktopItems makeWrapper ]; configurePhase = '' runHook preConfigure Loading @@ -49,7 +56,9 @@ stdenv.mkDerivation (finalAttrs: { runHook preBuild yarn --offline electron-builder \ --dir ${if stdenv.isDarwin then "--macos" else "--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.dist} \ -c.electronVersion=${electron.version} Loading @@ -60,7 +69,9 @@ stdenv.mkDerivation (finalAttrs: { runHook preInstall mkdir -p $out/share/{applications,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/ 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 Loading @@ -72,7 +83,12 @@ stdenv.mkDerivation (finalAttrs: { # Linux needs 'aplay' for notification sounds makeWrapper '${electron}/bin/electron' "$out/bin/teams-for-linux" \ ${lib.optionalString stdenv.isLinux '' --prefix PATH : ${lib.makeBinPath [ alsa-utils which ]} \ --prefix PATH : ${ lib.makeBinPath [ alsa-utils which ] } \ ''} \ --add-flags "$out/share/teams-for-linux/app.asar" \ --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" Loading @@ -80,14 +96,20 @@ stdenv.mkDerivation (finalAttrs: { runHook postInstall ''; desktopItems = [(makeDesktopItem { desktopItems = [ (makeDesktopItem { name = finalAttrs.pname; exec = finalAttrs.pname; icon = finalAttrs.pname; desktopName = "Microsoft Teams for Linux"; comment = finalAttrs.meta.description; categories = [ "Network" "InstantMessaging" "Chat" ]; })]; categories = [ "Network" "InstantMessaging" "Chat" ]; }) ]; passthru.updateScript = ./update.sh; passthru.tests.version = testers.testVersion rec { Loading @@ -100,7 +122,11 @@ stdenv.mkDerivation (finalAttrs: { mainProgram = "teams-for-linux"; homepage = "https://github.com/IsmaelMartinez/teams-for-linux"; license = lib.licenses.gpl3Only; maintainers = with lib.maintainers; [ muscaln qjoly chvp ]; maintainers = with lib.maintainers; [ muscaln qjoly chvp ]; platforms = lib.platforms.unix; broken = stdenv.isDarwin; }; Loading