Folaht’s first attempt to build a cargo package on Guix system - The one with regular dependencies

I feel like that would be too big a thread.

And I expect to run into more complex issues with each new package.

answer #1

$ guix build -f ant-protocol.scm
/home/folaht/Nwaȥ/Êsaj/Giks/yrop/yrop/packages/ant-protocol:29:13: error: license:apache2.0: unbound variable

answer #2

In the guix source code

answer #3

For crates, I can just just guix import crate and not only will it return the hash code I needed, but a full-blown template! That’s amazing.

$ guix import crate ant-protocol

answer #4

To get a crates list of a project, in this case ant-protocol, start a guix rust environment, download the crate, create a rust-crates file, do some cargo commands and then generate the rust-crates list from the project’s Cargo.lock file.

$ guix shell rust rust:cargo cargo-audit cargo-license
$ curl -fsSL https://static.crates.io/crates/ant-protocol/ant-protocol-0.3.0.crate | tar -xz
$ install -D -m 644 /dev/null gnu/packages/rust-crates.scm
$ cargo generate-lockfile
$ cargo audit
$ cargo license
$ guix import -i gnu/packages/rust-crates.scm crate -f Cargo.lock ant-protocol

Then fit that into a rust-crates template. (Credits to @hako)