Skip to content

Commit

Permalink
nix: output WezTerm.app on Mac
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
rickyelopez authored and wez committed Sep 21, 2024
1 parent 7b342a6 commit 2b23b04
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions nix/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ''
Expand Down

0 comments on commit 2b23b04

Please sign in to comment.