Merge pull request #180904 from BillHuang2001/fix/feishu-update
Fix/feishu misc update
This commit is contained in:
commit
136f1fd21b
1 changed files with 18 additions and 5 deletions
|
@ -1,4 +1,5 @@
|
||||||
{ alsa-lib
|
{ addOpenGLRunpath
|
||||||
|
, alsa-lib
|
||||||
, at-spi2-atk
|
, at-spi2-atk
|
||||||
, at-spi2-core
|
, at-spi2-core
|
||||||
, atk
|
, atk
|
||||||
|
@ -54,6 +55,9 @@
|
||||||
, wayland
|
, wayland
|
||||||
, wrapGAppsHook
|
, wrapGAppsHook
|
||||||
, xdg-utils
|
, xdg-utils
|
||||||
|
|
||||||
|
# for custom command line arguments, e.g. "--use-gl=desktop"
|
||||||
|
, commandLineArgs ? ""
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
@ -146,14 +150,19 @@ stdenv.mkDerivation rec {
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
mv usr/share $out/
|
mv usr/share $out/
|
||||||
mv opt/ $out/
|
mv opt/ $out/
|
||||||
chmod -R g-w $out
|
|
||||||
|
|
||||||
substituteInPlace $out/share/applications/bytedance-feishu.desktop \
|
substituteInPlace $out/share/applications/bytedance-feishu.desktop \
|
||||||
--replace /usr/bin/bytedance-feishu-stable $out/opt/bytedance/feishu/bytedance-feishu
|
--replace /usr/bin/bytedance-feishu-stable $out/opt/bytedance/feishu/bytedance-feishu
|
||||||
|
|
||||||
wrapProgram $out/opt/bytedance/feishu/feishu \
|
# Wrap feishu and vulcan
|
||||||
|
# Feishu is the main executable, vulcan is the builtin browser
|
||||||
|
for executable in $out/opt/bytedance/feishu/{feishu,vulcan/vulcan}; do
|
||||||
|
wrapProgram $executable \
|
||||||
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \
|
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \
|
||||||
--prefix LD_LIBRARY_PATH : ${rpath}:$out/opt/bytedance/feishu
|
--prefix LD_LIBRARY_PATH : ${rpath}:$out/opt/bytedance/feishu:${addOpenGLRunpath.driverLink}/share \
|
||||||
|
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}" \
|
||||||
|
${lib.optionalString (commandLineArgs!="") "--add-flags ${lib.escapeShellArg commandLineArgs}"}
|
||||||
|
done
|
||||||
|
|
||||||
mkdir -p $out/share/icons/hicolor
|
mkdir -p $out/share/icons/hicolor
|
||||||
base="$out/opt/bytedance/feishu"
|
base="$out/opt/bytedance/feishu"
|
||||||
|
@ -161,6 +170,9 @@ stdenv.mkDerivation rec {
|
||||||
mkdir -p $out/share/icons/hicolor/''${size}x''${size}/apps
|
mkdir -p $out/share/icons/hicolor/''${size}x''${size}/apps
|
||||||
ln -s $base/product_logo_$size.png $out/share/icons/hicolor/''${size}x''${size}/apps/bytedance-feishu.png
|
ln -s $base/product_logo_$size.png $out/share/icons/hicolor/''${size}x''${size}/apps/bytedance-feishu.png
|
||||||
done
|
done
|
||||||
|
|
||||||
|
mkdir -p $out/bin
|
||||||
|
ln -s $out/opt/bytedance/feishu/bytedance-feishu $out/bin/bytedance-feishu
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
@ -169,5 +181,6 @@ stdenv.mkDerivation rec {
|
||||||
downloadPage = "https://www.feishu.cn/en/#en_home_download_block";
|
downloadPage = "https://www.feishu.cn/en/#en_home_download_block";
|
||||||
license = licenses.unfree;
|
license = licenses.unfree;
|
||||||
platforms = [ "x86_64-linux" ];
|
platforms = [ "x86_64-linux" ];
|
||||||
|
maintainers = with maintainers; [ billhuang ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue