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-core
|
||||
, atk
|
||||
|
@ -54,6 +55,9 @@
|
|||
, wayland
|
||||
, wrapGAppsHook
|
||||
, xdg-utils
|
||||
|
||||
# for custom command line arguments, e.g. "--use-gl=desktop"
|
||||
, commandLineArgs ? ""
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
@ -146,14 +150,19 @@ stdenv.mkDerivation rec {
|
|||
mkdir -p $out
|
||||
mv usr/share $out/
|
||||
mv opt/ $out/
|
||||
chmod -R g-w $out
|
||||
|
||||
substituteInPlace $out/share/applications/bytedance-feishu.desktop \
|
||||
--replace /usr/bin/bytedance-feishu-stable $out/opt/bytedance/feishu/bytedance-feishu
|
||||
|
||||
wrapProgram $out/opt/bytedance/feishu/feishu \
|
||||
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \
|
||||
--prefix LD_LIBRARY_PATH : ${rpath}:$out/opt/bytedance/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 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
|
||||
base="$out/opt/bytedance/feishu"
|
||||
|
@ -161,6 +170,9 @@ stdenv.mkDerivation rec {
|
|||
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
|
||||
done
|
||||
|
||||
mkdir -p $out/bin
|
||||
ln -s $out/opt/bytedance/feishu/bytedance-feishu $out/bin/bytedance-feishu
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -169,5 +181,6 @@ stdenv.mkDerivation rec {
|
|||
downloadPage = "https://www.feishu.cn/en/#en_home_download_block";
|
||||
license = licenses.unfree;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = with maintainers; [ billhuang ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue