Merge pull request #128208 from liff/teams/fix-absolute-paths
teams: fix absolute path usages
This commit is contained in:
commit
fa0a222632
@ -13,6 +13,7 @@
|
|||||||
, gawk
|
, gawk
|
||||||
, xdg-utils
|
, xdg-utils
|
||||||
, systemd
|
, systemd
|
||||||
|
, nodePackages
|
||||||
, enableRectOverlay ? false }:
|
, enableRectOverlay ? false }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -24,7 +25,7 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "1kx4j837fd344zy90nl0j3r8cdvihy6i6gf56wd5n56zngx1fhjv";
|
sha256 = "1kx4j837fd344zy90nl0j3r8cdvihy6i6gf56wd5n56zngx1fhjv";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ dpkg autoPatchelfHook wrapGAppsHook ];
|
nativeBuildInputs = [ dpkg autoPatchelfHook wrapGAppsHook nodePackages.asar ];
|
||||||
|
|
||||||
unpackCmd = "dpkg -x $curSrc .";
|
unpackCmd = "dpkg -x $curSrc .";
|
||||||
|
|
||||||
@ -40,11 +41,27 @@ stdenv.mkDerivation rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
gappsWrapperArgs+=(--prefix PATH : "${coreutils}/bin:${gawk}/bin:${xdg-utils}/bin")
|
gappsWrapperArgs+=(--prefix PATH : "${coreutils}/bin:${gawk}/bin")
|
||||||
gappsWrapperArgs+=(--add-flags --disable-namespace-sandbox)
|
gappsWrapperArgs+=(--add-flags --disable-namespace-sandbox)
|
||||||
gappsWrapperArgs+=(--add-flags --disable-setuid-sandbox)
|
gappsWrapperArgs+=(--add-flags --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 = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user