diff options
author | Zeyi Fan <zeyi@fb.com> | 2021-01-06 18:49:09 -0800 |
---|---|---|
committer | Zeyi Fan <zeyi@fb.com> | 2021-01-06 19:17:02 -0800 |
commit | ab64e82e32626f6c8d484a123428f8d5f7e65fee (patch) | |
tree | 4cce72f399a4739e0ca8d88fa59354852ecef8b4 /pkgs/applications/terminal-emulators | |
parent | 3e635c6f6eabb435c60e1c7b0de6e217ac28b2b7 (diff) |
wezterm: add macOS support
Diffstat (limited to 'pkgs/applications/terminal-emulators')
-rw-r--r-- | pkgs/applications/terminal-emulators/wezterm/default.nix | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/pkgs/applications/terminal-emulators/wezterm/default.nix b/pkgs/applications/terminal-emulators/wezterm/default.nix index 35b2500c7c97..8f0c6777e375 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 @@ -24,7 +30,12 @@ , zlib }: let - runtimeDeps = [ + commonRuntimeDeps = [ + zlib + fontconfig + freetype + ]; + linuxRuntimeDeps = [ libX11 xcbutil libxcb @@ -33,14 +44,14 @@ let libxkbcommon dbus libglvnd - zlib egl-wayland wayland libGLU libGL - fontconfig - freetype ]; + runtimeDeps = commonRuntimeDeps + ++ stdenv.lib.optionals (!stdenv.isDarwin) linuxRuntimeDeps + ++ stdenv.lib.optionals (stdenv.isDarwin) [ Foundation CoreGraphics Cocoa ]; pname = "wezterm"; in @@ -68,7 +79,9 @@ rustPlatform.buildRustPackage { installPhase = '' for artifact in wezterm wezterm-gui wezterm-mux-server strip-ansi-escapes; do + '' + stdenv.lib.optionalString stdenv.isLinux '' patchelf --set-rpath "${lib.makeLibraryPath runtimeDeps}" $releaseDir/$artifact + '' + '' install -D $releaseDir/$artifact -t $out/bin done ''; |