diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2021-01-07 21:41:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-07 21:41:57 +0100 |
commit | b139de1c5c93a632f22ee816dc23b4fa1befacaf (patch) | |
tree | f6ad005cb84dd0f43f5155272ee2f13b024bdddc /pkgs/applications/terminal-emulators | |
parent | b5351cad24ec9ece77ead5f245a1c9310a669d3e (diff) | |
parent | b9f0b2885b1986b12a1fe1e527b12d5c58e936dd (diff) |
Merge pull request #108632 from fanzeyi/wezterm-darwin
Diffstat (limited to 'pkgs/applications/terminal-emulators')
-rw-r--r-- | pkgs/applications/terminal-emulators/wezterm/default.nix | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/pkgs/applications/terminal-emulators/wezterm/default.nix b/pkgs/applications/terminal-emulators/wezterm/default.nix index 35b2500c7c979..a30afa1ce68ab 100644 --- a/pkgs/applications/terminal-emulators/wezterm/default.nix +++ b/pkgs/applications/terminal-emulators/wezterm/default.nix @@ -1,4 +1,5 @@ -{ rustPlatform +{ stdenv +, rustPlatform , lib , fetchFromGitHub @@ -8,6 +9,11 @@ , openssl , perl +# Apple frameworks +, CoreGraphics +, Cocoa +, Foundation + , dbus , libX11 , xcbutil @@ -25,6 +31,10 @@ }: let runtimeDeps = [ + zlib + fontconfig + freetype + ] ++ stdenv.lib.optionals (stdenv.isLinux) [ libX11 xcbutil libxcb @@ -33,13 +43,14 @@ let libxkbcommon dbus libglvnd - zlib egl-wayland wayland libGLU libGL - fontconfig - freetype + ] ++ stdenv.lib.optionals (stdenv.isDarwin) [ + Foundation + CoreGraphics + Cocoa ]; pname = "wezterm"; in @@ -67,10 +78,21 @@ rustPlatform.buildRustPackage { buildInputs = runtimeDeps; installPhase = '' + '' + stdenv.lib.optionalString stdenv.isLinux '' for artifact in wezterm wezterm-gui wezterm-mux-server strip-ansi-escapes; do patchelf --set-rpath "${lib.makeLibraryPath runtimeDeps}" $releaseDir/$artifact install -D $releaseDir/$artifact -t $out/bin done + '' + stdenv.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" + cp $releaseDir/wezterm "$OUT_APP" + cp $releaseDir/wezterm-mux-server "$OUT_APP" + cp $releaseDir/wezterm-gui "$OUT_APP" + cp $releaseDir/strip-ansi-escapes "$OUT_APP" ''; # prevent further changes to the RPATH |