blob: 8310557d901e5f7f5f5b40ceaaf4ea18336111a4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
|
# Contributor: Jakub Panek <me@panekj.dev>
# Maintainer: Matthias Ahouansou <matthias@ahouansou.cz>
pkgname=wezterm
pkgver=20240203.110809
_pkgver="${pkgver/./-}-5046fc22"
pkgrel=1
pkgdesc="GPU-accelerated cross-platform terminal emulator and multiplexer written in Rust"
url="https://wezfurlong.org/wezterm/"
# s390x blocked by nix crate
arch="all !s390x"
license="MIT"
# See remove-bundled-fonts.patch for more info about fonts.
_depends_fonts="
font-jetbrains-mono-vf
font-noto-emoji
font-roboto
"
makedepends="
$_depends_fonts
cargo
cargo-auditable
fontconfig-dev
freetype-dev
harfbuzz-dev
libgit2-dev
libpng-dev
libssh2-dev
libx11-dev
libxkbcommon-dev
lua5.4-dev
ncurses
openssl-dev>3
python3
wayland-dev
xcb-imdkit-dev
xcb-util-dev
xcb-util-image-dev
xcb-util-keysyms-dev
xcb-util-wm-dev
zlib-dev
zstd-dev
"
checkdepends="openssh"
install="$pkgname.post-install $pkgname.post-upgrade"
subpackages="
$pkgname-common
$pkgname-mux-server:_mux_server
$pkgname-fonts::noarch
$pkgname-bash-completion
$pkgname-fish-completion
$pkgname-zsh-completion
"
source="
https://github.com/wez/wezterm/releases/download/$_pkgver/wezterm-$_pkgver-src.tar.gz
link-against-system-libs.patch
"
builddir="$srcdir/wezterm-$_pkgver"
options="net"
export LIBSSH2_SYS_USE_PKG_CONFIG=1 # use system libssh2
prepare() {
cargo fetch --target="$CTARGET" --locked
default_prepare
# Rust target triple.
local target=$(rustc -vV | sed -n 's/host: //p')
# Build against system-provided libs
mkdir -p .cargo
cat >> .cargo/config <<-EOF
[target.$target]
git2 = { rustc-link-lib = ["git2"] }
EOF
cargo fetch --target="$CTARGET" # regenerate Cargo.lock after patching
# dont print malformed sshd config, this can possibly fail on builders but not on CI
sed 's|std::fs::write|//std::fs::write|g' -i "$builddir"/wezterm-ssh/tests/sshd.rs
}
build() {
cargo auditable build \
--release \
--frozen \
--no-default-features \
--features wayland,distro-defaults \
--bin wezterm \
--bin wezterm-gui \
--bin wezterm-mux-server \
--bin strip-ansi-escapes
# Regenerate shell completions (to be up-to-date).
local sh; for sh in bash fish zsh; do
./target/release/wezterm shell-completion --shell $sh > assets/shell-completion/$sh
done
}
check() {
# Test ligatures_jetbrains is somehow broken; it's *not* related to our
# patches, but probably to fontconfig or freetype version.
cargo test --frozen -- \
--skip shapecache::test::ligatures_jetbrains
# required to unstuck CI
killall -q sshd || true
}
package() {
depends="$pkgname-common=$pkgver-r$pkgrel"
local appid="org.wezfurlong.wezterm"
cd target/release
install -Dm755 -t "$pkgdir"/usr/bin/ \
wezterm \
wezterm-gui \
wezterm-mux-server \
strip-ansi-escapes
cd "$builddir"
install -Dm644 assets/wezterm.desktop "$pkgdir"/usr/share/applications/$appid.desktop
install -Dm644 assets/wezterm.appdata.xml "$pkgdir"/usr/share/metainfo/$appid.appdata.xml
install -Dm644 LICENSE.md -t "$pkgdir"/usr/share/licences/$pkgname/
install -Dm644 assets/shell-integration/wezterm.sh -t "$pkgdir"/etc/profile.d/
install -Dm644 assets/icon/terminal.png "$pkgdir"/usr/share/icons/hicolor/128x128/apps/$appid.png
install -Dm644 assets/icon/wezterm-icon.svg "$pkgdir"/usr/share/icons/hicolor/scalable/apps/$appid.svg
install -Dm644 assets/shell-completion/bash "$pkgdir"/usr/share/bash-completion/completions/wezterm
install -Dm644 assets/shell-completion/fish "$pkgdir"/usr/share/fish/vendor_completions.d/wezterm.fish
install -Dm644 assets/shell-completion/zsh "$pkgdir"/usr/share/zsh/site-functions/_wezterm
}
# NOTE: This package contains programs that don't depend on Gtk, X11 etc.
# It may be installed on a remote server.
common() {
pkgdesc="Common files for WezTerm GUI and multiplexer server"
depends="ncurses-terminfo"
amove etc/profile.d
amove usr/bin/strip-ansi-escapes
amove usr/bin/wezterm
}
_mux_server() {
pkgdesc="WezTerm multiplexer server"
depends="$pkgname-common=$pkgver-r$pkgrel"
amove usr/bin/wezterm-mux-server
}
fonts() {
pkgdesc="Meta package for fonts bundled in Wezterm"
depends="$_depends_fonts"
mkdir -p "$subpkgdir"
}
sha512sums="
2413e1537ed4cf699f0754d76f35cd679591e4e215e782fab61f5bd7c4615e3916398e16709445406ef241e3fb721111daed917c546abb1f5130109b40bb2774 wezterm-20240203-110809-5046fc22-src.tar.gz
d4c13f079dd0348d60eed577a0467cf4da9b202c5c959902b0626019c95d945d2a91023bc6844c19d5a3aecaa8d0de007966a6a2113549fe5328c3c8de79381f link-against-system-libs.patch
"
|