poc zed package template
proof of concept void package template for the zed text editor
Testing the changes
- I tested the changes in this PR: briefly
Caused by:
process didn't exit successfully: `/builddir/zed-0.124.8/target/release/build/live_kit_server-3b7b5b64e66f40d0/build-script-build` (exit status: 101)
--- stderr
thread 'main' panicked at crates/live_kit_server/build.rs:4:10:
called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: "protoc failed: Could not make proto path relative: protocol/livekit_room.proto: No such file or directory\n" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
cant figure out how to get past this
zed builds perfectly fine when i run cargo build directly
You need to handle (i.e download) the git submodule, as they are not included in the sources.
https://github.com/zed-industries/zed/blob/main/.gitmodules
AFAIK, there is not a set way/approach for it in void, different pkgs deal differently - some ask upstream for "hydrated" sources, other add them as distfiles, etc..
Hope that helps :)
I figured do_fetch() to clone the git repository instead
On Mon, 4 Mar 2024, 2:18 am Martin, @.***> wrote:
You need to handle (i.e download) the git submodule, as they are not included in the sources.
https://github.com/zed-industries/zed/blob/main/.gitmodules
AFAIK, there is not a set way/approach for it in void, different pkgs deal differently - some ask upstream for "hydrated" sources, other add them as distfiles, etc..
— Reply to this email directly, view it on GitHub https://github.com/void-linux/void-packages/pull/49019#issuecomment-1975311885, or unsubscribe https://github.com/notifications/unsubscribe-auth/BBZNKIB66MQANXE7R45I5ELYWOCKTAVCNFSM6AAAAABEB2K5ZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZVGMYTCOBYGU . You are receiving this because you authored the thread.Message ID: @.***>
I figured do_fetch() to clone the git repository instead
That is not permissible.
so how would i go about adding livekit as a distfile?
ok ive managed to get the package to build after i created the full source archive myself (ive requested the upstream to provide the archive on every release) with something like this
pkgname=zed
version=0.124.8
revision=1
build_style=cargo
hostmakedepends="pkg-config python3 cargo"
makedepends="alsa-lib-devel libzstd-devel fontconfig-devel wayland-devel libxkbcommon-devel openssl-devel"
depends="alsa-lib libzstd fontconfig wayland libxkbcommon libxkbcommon-x11 openssl"
short_desc="High-performance, multiplayer code editor"
maintainer="aryalaadi <[email protected]>"
license="GPL-3.0"
homepage="https://github.com/zed-industries/zed"
distfiles="http://localhost:8000/zed.tar.gz"
checksum=a45d80c9c68e8aa232490ea3bfe00712e8e296d606ed37d83f1875a693e46654
but after it was done compiling i got this error
error: found a virtual manifest at `/builddir/zed-0.124.8/Cargo.toml` instead of a package manifest
=> ERROR: zed-0.124.8_1: do_install: '${make_cmd} install --target ${RUST_TARGET} --root="${DESTDIR}/usr" --offline --locked ${configure_args} ${make_install_args}' exited with 101
=> ERROR: in do_install() at common/build-style/cargo.sh:22
any idea on what could be causing this?
ok ive managed to get the package to build after i created the full source archive myself (ive requested the upstream to provide the archive on every release) with something like this
pkgname=zed version=0.124.8 revision=1 build_style=cargo hostmakedepends="pkg-config python3 cargo" makedepends="alsa-lib-devel libzstd-devel fontconfig-devel wayland-devel libxkbcommon-devel openssl-devel" depends="alsa-lib libzstd fontconfig wayland libxkbcommon libxkbcommon-x11 openssl" short_desc="High-performance, multiplayer code editor" maintainer="aryalaadi <[email protected]>" license="GPL-3.0" homepage="https://github.com/zed-industries/zed" distfiles="http://localhost:8000/zed.tar.gz" checksum=a45d80c9c68e8aa232490ea3bfe00712e8e296d606ed37d83f1875a693e46654but after it was done compiling i got this error
error: found a virtual manifest at `/builddir/zed-0.124.8/Cargo.toml` instead of a package manifest => ERROR: zed-0.124.8_1: do_install: '${make_cmd} install --target ${RUST_TARGET} --root="${DESTDIR}/usr" --offline --locked ${configure_args} ${make_install_args}' exited with 101 => ERROR: in do_install() at common/build-style/cargo.sh:22any idea on what could be causing this?
Here's a working template I made:
# Template file for 'zed'
pkgname=zed
version=0.132.4
revision=1
build_style=cargo
make_install_args="--path crates/zed"
hostmakedepends="pkg-config"
makedepends="alsa-lib-devel fontconfig-devel libxcb-devel libxkbcommon-devel libzstd-devel openssl-devel wayland-devel libgit2-devel"
short_desc="High-performance, multiplayer code editor"
maintainer="Owen Law <[email protected]>"
license="AGPL-3.0-or-later, GPL-3.0-or-later, Apache-2.0"
homepage="https://zed.dev/"
_protocol=1.1.2
distfiles="https://github.com/zed-industries/zed/archive/refs/tags/v${version}.tar.gz
https://github.com/livekit/protocol/archive/refs/tags/v${_protocol}.tar.gz>protocol-v${_protocol}.tar.gz"
checksum="e9b0d3079b331114f2dbfb99a23cf7af79d67b9ca9ae94b128953a7654e39cb2
9e3dac3be15f896a6602a4fac12c91286e3b97834ef3e17e3aa69fc592d80761"
skip_extraction="protocol-v${_protocol}.tar.gz"
post_extract() {
vsrcextract -C crates/live_kit_server/protocol "protocol-v${_protocol}.tar.gz"
vlicense LICENSE-AGPL
}
feel free to make a new pr, ive given up on this
On Wed, 1 May 2024, 1:09 am Owen Law, @.***> wrote:
ok ive managed to get the package to build after i created the full source archive myself (ive requested the upstream to provide the archive on every release) with something like this
pkgname=zed version=0.124.8 revision=1 build_style=cargo hostmakedepends="pkg-config python3 cargo" makedepends="alsa-lib-devel libzstd-devel fontconfig-devel wayland-devel libxkbcommon-devel openssl-devel" depends="alsa-lib libzstd fontconfig wayland libxkbcommon libxkbcommon-x11 openssl" short_desc="High-performance, multiplayer code editor" maintainer="aryalaadi @.***>" license="GPL-3.0" homepage="https://github.com/zed-industries/zed" distfiles="http://localhost:8000/zed.tar.gz" checksum=a45d80c9c68e8aa232490ea3bfe00712e8e296d606ed37d83f1875a693e46654
but after it was done compiling i got this error
error: found a virtual manifest at
/builddir/zed-0.124.8/Cargo.tomlinstead of a package manifest => ERROR: zed-0.124.8_1: do_install: '${make_cmd} install --target ${RUST_TARGET} --root="${DESTDIR}/usr" --offline --locked ${configure_args} ${make_install_args}' exited with 101 => ERROR: in do_install() at common/build-style/cargo.sh:22any idea on what could be causing this?
Here's a working template I made:
Template file for 'zed'
pkgname=zed version=0.132.4 revision=1 build_style=cargo make_install_args="--path crates/zed" hostmakedepends="pkg-config" makedepends="alsa-lib-devel fontconfig-devel libxcb-devel libxkbcommon-devel libzstd-devel openssl-devel wayland-devel libgit2-devel" short_desc="High-performance, multiplayer code editor" maintainer="Owen Law @.***>" license="AGPL-3.0-or-later, GPL-3.0-or-later, Apache-2.0" homepage="https://zed.dev/" _protocol=1.1.2 distfiles="https://github.com/zed-industries/zed/archive/refs/tags/v${version}.tar.gz https://github.com/livekit/protocol/archive/refs/tags/v${_protocol}.tar.gz>protocol-v${_protocol}.tar.gz" checksum="e9b0d3079b331114f2dbfb99a23cf7af79d67b9ca9ae94b128953a7654e39cb2 9e3dac3be15f896a6602a4fac12c91286e3b97834ef3e17e3aa69fc592d80761"
skip_extraction="protocol-v${_protocol}.tar.gz"
post_extract() { vsrcextract -C crates/live_kit_server/protocol "protocol-v${_protocol}.tar.gz" vlicense LICENSE-AGPL }
— Reply to this email directly, view it on GitHub https://github.com/void-linux/void-packages/pull/49019#issuecomment-2086778047, or unsubscribe https://github.com/notifications/unsubscribe-auth/BBZNKIFU34FU5OD3XAXSRGLY77VYPAVCNFSM6AAAAABEB2K5ZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBWG43TQMBUG4 . You are receiving this because you authored the thread.Message ID: @.***>
Given that upstream for Linux isn’t stable (or even in beta for that matter), I don’t think a PR is needed at the moment as it will go nowhere.
I'm personally interested in this. It so happens the latest zed dropped the gitmodules, so that's cool. I may finish this work.
I'm personally interested in this. It so happens the latest zed dropped the gitmodules, so that's cool. I may finish this work.
Feel free to take the template I made above. All you really need to do is update the version number, cut out the protocol stuff, and update the hashes.
#50476 is pretty far along. I'm going to wait for that to merge. Closing this, thank you for the initial legwork!