mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-05-01 03:00:26 -04:00
56 lines
1.9 KiB
Ruby
56 lines
1.9 KiB
Ruby
require 'buildsystems/rust'
|
|
|
|
class Zed < RUST
|
|
description 'Zed is a high-performance, multiplayer code editor'
|
|
homepage 'https://zed.dev/'
|
|
version '0.230.1'
|
|
license 'GPL-3, AGPL-3, Apache-2.0'
|
|
compatibility 'x86_64'
|
|
source_url 'https://github.com/zed-industries/zed.git'
|
|
git_hashtag "v#{version}"
|
|
binary_compression 'tar.zst'
|
|
|
|
binary_sha256({
|
|
x86_64: '0348c48b47a0ca4a233a15aa67cab0a3cc65872b19b267741a4a7d9492819c4c'
|
|
})
|
|
|
|
depends_on 'alsa_lib' => :library
|
|
depends_on 'cargo_about' => :build
|
|
depends_on 'dbus' => :executable
|
|
depends_on 'gcc_lib' => :library
|
|
depends_on 'glib' => :library
|
|
depends_on 'glibc' => :library
|
|
depends_on 'libx11' => :library
|
|
depends_on 'libxcb' => :library
|
|
depends_on 'libxkbcommon' => :library
|
|
depends_on 'llvm_dev' => :build
|
|
depends_on 'ruby_solargraph' => :logical
|
|
depends_on 'rust' => :build
|
|
depends_on 'zlib' => :library
|
|
|
|
rust_flags '-C link-args=-Wl,--disable-new-dtags,-rpath,$ORIGIN/../lib -C symbol-mangling-version=v0 --cfg tokio_unstable'
|
|
rust_packages 'zed'
|
|
|
|
def self.prebuild
|
|
system 'script/generate-licenses'
|
|
end
|
|
|
|
def self.install
|
|
system "DO_STARTUP_NOTIFY=true APP_CLI=zed APP_ICON=zed \
|
|
APP_ARGS='%U' APP_NAME=Zed \
|
|
envsubst < 'crates/zed/resources/zed.desktop.in' > zed.desktop"
|
|
FileUtils.install 'target/release/zed', "#{CREW_DEST_PREFIX}/bin/zed", mode: 0o755
|
|
FileUtils.install 'zed.desktop', "#{CREW_DEST_PREFIX}/share/applications/zed.desktop", mode: 0o644
|
|
FileUtils.install 'crates/zed/resources/app-icon.png', "#{CREW_DEST_PREFIX}/share/icons/hicolor/512x512/apps/zed.png", mode: 0o644
|
|
FileUtils.install 'crates/zed/resources/app-icon@2x.png', "#{CREW_DEST_PREFIX}/share/icons/hicolor/1024x1024/apps/zed.png", mode: 0o644
|
|
end
|
|
|
|
def self.postinstall
|
|
ExitMessage.add "\nType 'zed' to get started.\n"
|
|
end
|
|
|
|
def self.postremove
|
|
Package.agree_to_remove("#{CREW_PREFIX}/.config/zed")
|
|
end
|
|
end
|