summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0ccb4e2d5e6601a65fe7e476931b560ea368fc65 (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
# Maintainer: Caleb Maclennan <caleb@alerque.com>

# I saw upstream "closed" the Linux support issue and made the code repository
# public and open sourced it, so I thought "Yay"!. It turns out that was
# premature. The issue actually just got migrated and the source is open but
# still macOS only (builds with Xcode and targets Metal for the UI). So this
# package isn't going to work yet. That being said now that the source is
# public I kind of expect it won't take the community *so very long* to help
# port it to other platforms. As such I'll leave this up and keep working on it
# for when that actually happens. PKGREL=0 because not-yet-functional.

pkgname=zed-editor
pkgver=0.122.2
pkgrel=0
pkgdesc='high-performance, multiplayer code editor from the creators of Atom and Tree-sitter'
arch=(x86_64)
url=https://zed.dev
_url="https://github.com/zed-industries/zed"
license=(GPL-3.0-or-later)
depends=()
makedepends=(alsa-lib
             cargo
             clang
             fontconfig
             gcc-objc
             libdispatch
             libxkbcommon
             protobuf
             vulkan-validation-layers
             wasmtime
             wayland)
_archive="zed-$pkgver"
source=("$_url/archive/v$pkgver/$_archive.tar.gz")
sha256sums=('1d7f54ffc8836692ba57ae007cf3bdd56883e86364d0ce31e0c145cc658e5bb8')

prepare() {
	cd "$_archive"
	cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}

_srcenv() {
	cd "$_archive"
	export RUSTUP_TOOLCHAIN=stable
	export CARGO_TARGET_DIR=target
}

build() {
	_srcenv
	cargo build --frozen --all-features
}

check() {
	_srcenv
	cargo test --frozen --all-features
}

package() {
	cd "$_archive"
}