nix: output WezTerm.app on Mac

currently only the binaries are output. Build and output the .app dir so
that users can launch the app as-normal on Mac

Added code taken from
[nixos](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/applications/terminal-emulators/wezterm/default.nix#L116-L123)
This commit is contained in:
Ricky Lopez authored and Wez Furlong committed 2024-09-21 12:02:03 -07:00
1 parent 7b342a6b39
commit 2b23b04f7d
1 file changed
+7
+7
View File
@@ -127,6 +127,13 @@
--add-needed "${pkgs.libGL}/lib/libEGL.so.1" \
--add-needed "${pkgs.vulkan-loader}/lib/libvulkan.so.1" \
$out/bin/wezterm-gui
'' + lib.optionalString stdenv.isDarwin ''
mkdir -p "$out/Applications"
OUT_APP="$out/Applications/WezTerm.app"
cp -r assets/macos/WezTerm.app "$OUT_APP"
rm $OUT_APP/*.dylib
cp -r assets/shell-integration/* "$OUT_APP"
ln -s $out/bin/{wezterm,wezterm-mux-server,wezterm-gui,strip-ansi-escapes} "$OUT_APP"
'';
postInstall = ''