Merge pull request #108632 from fanzeyi/wezterm-darwin
This commit is contained in:
commit
b139de1c5c
@ -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
|
||||
|
@ -813,7 +813,9 @@ in
|
||||
|
||||
wayst = callPackage ../applications/terminal-emulators/wayst { };
|
||||
|
||||
wezterm = callPackage ../applications/terminal-emulators/wezterm { };
|
||||
wezterm = callPackage ../applications/terminal-emulators/wezterm {
|
||||
inherit (darwin.apple_sdk.frameworks) Cocoa CoreGraphics Foundation;
|
||||
};
|
||||
|
||||
x3270 = callPackage ../applications/terminal-emulators/x3270 { };
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user