feishu: misc updates
also wrap vulcan handle edge case
This commit is contained in:
@@ -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; {
|
||||
|
||||
Reference in New Issue
Block a user