Select the types of activity you want to include in your feed.
fix(zed-preview): set XKB path and avoid icon clash with zed-editor
Point XKB_CONFIG_ROOT at xkeyboard-config so the binary works on NixOS, and rename icons/desktop Icon to zed-preview so nix profile can install alongside zed-editor-fhs.
···99 libgcc,
1010 vulkan-loader,
1111 wayland,
1212+ xkeyboard-config,
1213 versionCheckHook,
1314}:
1415···48494950 mkdir -p $out
5051 cp -a bin lib libexec share $out/
5151- # Coexist with nixpkgs zed-editor (zeditor) and a stable zed binary.
5252+ # Coexist with nixpkgs zed-editor / zed-editor-fhs (binary + icons).
5253 mv $out/bin/zed $out/bin/zed-preview
53545454- # Point the desktop entry at our binary name (line-anchored; plain
5555+ # Rename icons so share/icons/.../zed.png does not collide with zed-editor.
5656+ find $out/share/icons -type f -name 'zed.png' | while read -r icon; do
5757+ mv "$icon" "$(dirname "$icon")/zed-preview.png"
5858+ done
5959+6060+ # Point the desktop entry at our binary + icon names (line-anchored; plain
5561 # substitute would also rewrite TryExec when matching Exec=zed).
5662 sed -i \
5763 -e 's/^TryExec=zed$/TryExec=zed-preview/' \
5864 -e 's/^Exec=zed/Exec=zed-preview/' \
6565+ -e 's/^Icon=zed$/Icon=zed-preview/' \
5966 $out/share/applications/dev.zed.Zed-Preview.desktop
60676168 runHook postInstall
6269 '';
63706471 postFixup = ''
7272+ # xkbcommon defaults to /usr/share/X11/xkb, which does not exist on NixOS.
6573 wrapProgram $out/bin/zed-preview \
6666- --set ZED_UPDATE_EXPLANATION "Zed Preview has been installed using Nix. Auto-updates have thus been disabled."
7474+ --set ZED_UPDATE_EXPLANATION "Zed Preview has been installed using Nix. Auto-updates have thus been disabled." \
7575+ --set XKB_CONFIG_ROOT "${xkeyboard-config}/share/X11/xkb"
7676+ # CLI execs libexec/zed-editor; wrap it too so direct launches get the same env.
7777+ wrapProgram $out/libexec/zed-editor \
7878+ --set ZED_UPDATE_EXPLANATION "Zed Preview has been installed using Nix. Auto-updates have thus been disabled." \
7979+ --set XKB_CONFIG_ROOT "${xkeyboard-config}/share/X11/xkb"
6780 '';
68816982 nativeInstallCheckInputs = [ versionCheckHook ];