guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rust (build system) deficits


From: Efraim Flashner
Subject: Re: rust (build system) deficits
Date: Mon, 9 Mar 2020 13:17:48 +0200

On Mon, Mar 09, 2020 at 10:26:01AM +0100, Hartmut Goebel wrote:
> Am 08.03.20 um 21:10 schrieb John Soo:
> > Hmm. Can you elaborate more on “not able to build non-trivial rust 
> > applications”?
> 
> I'm working on packaging sequoia-openpgp.org.
> 
> This requires nettle-sys, a FFI to nettle. nettly-sys "optionally"
> requires "nettle-src". I added a phase to "nettle-sys" to remove the
> "optional" dependency. nettle-sys also requires bindgen.

As I assume you saw, there is nothing "optional" when using the
cargo-build-system. For nettle-sys and nettle-src I suggest looking at
rust-openssl-sys-no-vendor.patch which I modified from Debian. It takes
care of pretending openssl-sys also provides openssl-src.

> A second dependancy is "sequoia-openpgp", which requires rhe lalrpop
> parser generator for building.
> 
> Now when building `sequioa-sqv`, I need to add all these dependencies again:
> 
> - nettle-src, since it is "optional" for nettle-sys - and the phase was
> not executed.
> - bindgen, since it is required to build nettle-sys
> - lalrpop, since it is required for building sequoia-openpgp
> 
> > Patching a library Cargo.toml seems like an excellent job for source 
> > patches or snippets.
> 
> Quite some packages change Cargo.toml in a phase, e.g. rust-openssl-0.7.
> Thus I assumed, this is the way to go.

That could probably move to a snippet, or even into the
cargo-build-system. IIRC there are only 3 patterns like that which
appear multiple times, and they're only relevant when building that
actual crate, not when it's "just a dependency".

-- 
Efraim Flashner   <address@hidden>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]