clearlinux / distribution

Placeholder repository to allow filing of general bugs/issues/etc against the Clear Linux OS for Intel Architecture linux distribution
521 stars 29 forks source link

Zed #3155

Closed K1ngfish3r closed 1 month ago

K1ngfish3r commented 2 months ago

Official package name: zed

License (must be an OSI approved Open Source license): AGPL-3.0 Apache-2.0 GPL-3.0

Download URL of latest release: https://github.com/zed-industries/zed/archive/refs/tags/v0.143.7.tar.gz

Latest release date (must be recent): Jul 12, 2024

Description: A high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Autospec notes: for-review.txt options.conf cargo_vendor = true

buildreq_add

llvm-dev
mold
cmake
libxcb-dev
libxkbcommon-dev

build_prepend

export RELEASE_VERSION=%{version}
export target_triple="x86_64-unknown-linux-gnu"

make_command

cargo build --release --frozen --target "${target_triple}" --package zed --package cli

install_prepend

export RELEASE_VERSION=%{version}
export target_triple="x86_64-unknown-linux-gnu"
export DO_STARTUP_NOTIFY="true"
export APP_ZED="zed-editor"
export APP_CLI="zeditor"
export APP_NAME="Zed"
export APP_ICON="zed"
export APP_ARGS="%F"
cat > ./install_script.sh <<END
#!/bin/bash

envsubst < "./crates/zed/resources/zed.desktop.in" > "./crates/zed/resources/zed.desktop"

install -Dm0755 ./target/${target_triple}/release/cli %{buildroot}%{_bindir}/${APP_CLI}
install -Dm0755 ./target/${target_triple}/release/zed %{buildroot}/usr/libexec/${APP_ZED}
install -Dm0644 ./crates/zed/resources/zed.desktop %{buildroot}/usr/share/applications/zed.desktop
install -Dm0644 ./crates/zed/resources/app-icon.png %{buildroot}/usr/share/icons/hicolor/512x512/apps/${APP_ICON}.png
install -Dm0644 ./crates/zed/resources/app-icon@2x.png %{buildroot}/usr/share/icons/hicolor/1024x1024/apps/${APP_ICON}.png
END

install_macro

chmod +x ./install_script.sh && ./install_script.sh
bwarden commented 2 months ago

Holy smokes, that was a lot of vendored dependencies! Unfortunately, some of those have non-OSI-approved licenses. We matched these out of the over 1800(!) license files (582 unique) identified in the full vendored source tree:

Unless zed removes the dependencies with these open-looking-but-restrictive licenses, we probably won't be able to package and ship it.

pixelgeek commented 1 month ago

I know @K1ngfish3r is aware, but for others finding this thread - Zed is now supported through the 3rd party Clear Fraction repository - https://community.clearlinux.org/t/clear-fraction-the-third-party-repository-for-clear-linux/7243/59?u=pixelgeek