48 lines
2 KiB
Diff
48 lines
2 KiB
Diff
From b4a61b636a21c7e4608ae9003ccb3865176f395c Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Na=C3=AFm=20Favier?= <n@monade.li>
|
|
Date: Tue, 10 May 2022 12:43:06 +0200
|
|
Subject: [PATCH] teams: fix wrapper workaround
|
|
|
|
We can't rely on the wrapper being a shell script, so we make our own
|
|
wrapper to append the needed args.
|
|
---
|
|
.../networking/instant-messengers/teams/default.nix | 13 ++++++++-----
|
|
1 file changed, 8 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/pkgs/applications/networking/instant-messengers/teams/default.nix b/pkgs/applications/networking/instant-messengers/teams/default.nix
|
|
index 684fb8454d673..07462b4cc26f8 100644
|
|
--- a/pkgs/applications/networking/instant-messengers/teams/default.nix
|
|
+++ b/pkgs/applications/networking/instant-messengers/teams/default.nix
|
|
@@ -1,5 +1,6 @@
|
|
{ lib
|
|
, stdenv
|
|
+, runtimeShell
|
|
, fetchurl
|
|
, autoPatchelfHook
|
|
, wrapGAppsHook
|
|
@@ -57,8 +58,6 @@ let
|
|
|
|
preFixup = ''
|
|
gappsWrapperArgs+=(--prefix PATH : "${coreutils}/bin:${gawk}/bin")
|
|
- gappsWrapperArgs+=(--add-flags --disable-namespace-sandbox)
|
|
- gappsWrapperArgs+=(--add-flags --disable-setuid-sandbox)
|
|
'';
|
|
|
|
|
|
@@ -121,9 +120,13 @@ let
|
|
done;
|
|
|
|
# fix for https://docs.microsoft.com/en-us/answers/questions/298724/open-teams-meeting-link-on-linux-doens39t-work.html?childToView=309406#comment-309406
|
|
- # while we create the wrapper ourselves, gappsWrapperArgs leads to the same issue
|
|
- # another option would be to introduce gappsWrapperAppendedArgs, to allow control of positioning
|
|
- substituteInPlace "$out/bin/teams" --replace '.teams-wrapped" --disable-namespace-sandbox --disable-setuid-sandbox "$@"' '.teams-wrapped" "$@" --disable-namespace-sandbox --disable-setuid-sandbox'
|
|
+ wrapped=$out/bin/.teams-old
|
|
+ mv "$out/bin/teams" "$wrapped"
|
|
+ cat > "$out/bin/teams" << EOF
|
|
+ #! ${runtimeShell}
|
|
+ exec $wrapped "\$@" --disable-namespace-sandbox --disable-setuid-sandbox
|
|
+ EOF
|
|
+ chmod +x "$out/bin/teams"
|
|
'';
|
|
};
|
|
|