Makrennel / eww-void

void linux eww templates for building with xbps-src
5 stars 3 forks source link

cargo: command not found #6

Closed mia0x75 closed 11 months ago

mia0x75 commented 11 months ago
.
.
.
info: default toolchain set to 'nightly-x86_64-unknown-linux-musl'

  nightly-x86_64-unknown-linux-musl installed - rustc 1.75.0-nightly (9d83ac217 2023-10-31)

Rust is installed now. Great!

To get started you may need to restart your current shell.
This would reload your PATH environment variable to include
Cargo's bin directory ($HOME/.cargo/bin).

To configure your current shell, run:
source "$HOME/.cargo/env"
/void-packages/srcpkgs/eww/template: line xx: cargo: command not found
=> ERROR: eww-0.4_0: do_build: 'cargo build --release --no-default-features --features wayland' exited with 127
=> ERROR:   in do_build() at srcpkgs/eww/template:xx
Makrennel commented 11 months ago

Cargo is installed and added to PATH during do_build with rustup-init as the nightly version is required to build eww.

export RUSTUP_HOME=${wrksrc}/rustup
rustup-init --default-toolchain nightly -y
export PATH=${RUSTUP_HOME}/toolchains/nightly-x86_64-unknown-linux-gnu/bin:$PATH

By the looks of it from your log the problem is I wrote it to export nightly-x86_64-unknown-linux-gnu to path, but musl uses nightly-x86_64-unknown-linux-musl, I'll try adding a check for this.

Makrennel commented 11 months ago

Also, chances are it will fail to build on other architectures because it's hardcoded to x86_64.

Makrennel commented 11 months ago

Changed it to use the XBPS_RUST_TARGET environment variable which should fix it.