Skip to content

Conversation

@juliankuners
Copy link
Contributor

@juliankuners juliankuners commented May 30, 2025

The nix flake provides the komet derivation that requires cargo and stellar to be available at runtime. Therefore, a user that installs komet must also install cargo with, e.g., rustup and install stellar with, e.g., cargo.

Akin to kontrol, an additional derivation can be provided in the nix flake that adds these two dependencies in the PATH of the executable to make the tools available at runtime. This has the benefit of increased reproducibility for use in, e.g., CI.

This pull requests introduces this derivation in the nix flake as the attribute komet.rust-stellar. It uses a rust distribution from github:oxalica/rust-overlay. Additionally, the rust target was changed from wasm32-unknown-unknown to wasm32v1-none due to respective upstream changes in stellar-cli introduced with stellar/stellar-cli#2022. Finally, the stellar executable that previously was provided in a nix develop shell, is instead now built from the new nix flake available in the stellar-cli repository.

The komet derivation that uses user-provided cargo and stellar can be build with nix build .#komet and the komet derivation that purely provides cargo and stellar can be built with nix build .#komet.rust-stellar.

@juliankuners
Copy link
Contributor Author

This pull request also overrides stellar-cli due to a build issue. I created a respective pull request to fix it upstream as well: stellar/stellar-cli#2037.

@juliankuners juliankuners force-pushed the soroban-rust-komet-derivation branch from e78a9a8 to ed1e423 Compare May 30, 2025 14:14
@juliankuners juliankuners requested a review from tothtamas28 May 30, 2025 14:15
@juliankuners
Copy link
Contributor Author

juliankuners commented May 30, 2025

@tothtamas28 Would you mind reviewing the nix changes?

@juliankuners
Copy link
Contributor Author

Force pushed a rebase with the master branch.

@juliankuners juliankuners changed the title Add komet.rust-soroban derivation that provides cargo and soroban in PATH Add komet.rust-stellar derivation that provides cargo and stellar in PATH May 30, 2025
@juliankuners
Copy link
Contributor Author

Renamed soroban to stellar due to the change introduced recently in #83.

@automergerpr-permission-manager automergerpr-permission-manager bot merged commit 44a4f91 into master May 30, 2025
10 of 12 checks passed
@automergerpr-permission-manager automergerpr-permission-manager bot deleted the soroban-rust-komet-derivation branch May 30, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants