guix-patches
[Top][All Lists]
Advanced

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

[bug#46399] [PATCH] build-system/cargo: Propagate crates across builds.


From: pelzflorian (Florian Pelz)
Subject: [bug#46399] [PATCH] build-system/cargo: Propagate crates across builds.
Date: Sun, 11 Apr 2021 17:11:21 +0200

Hello Efraim!

Thank you for improving Rust development with Guix.  I have a question
about this change to doc/guix.texi when translating.  Sorry for
noticing so late just before the string freeze.

On Tue, Feb 09, 2021 at 12:58:43PM +0200, Efraim Flashner wrote:
> diff --git a/doc/guix.texi b/doc/guix.texi
> index 7d18703283..0d153a1470 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> […]
> @@ -7437,8 +7437,10 @@ supports builds of packages using Cargo, the build 
> tool of the
>  It adds @code{rustc} and @code{cargo} to the set of inputs.
>  A different Rust package can be specified with the @code{#:rust} parameter.
>  
> -Regular cargo dependencies should be added to the package definition via the
> -@code{#:cargo-inputs} parameter as a list of name and spec pairs, where the
> +Regular cargo dependencies should be added to the package definition 
> similarly
> +to other packages; those needed only at build time to native-inputs, others 
> to
> +inputs.  If you need to add source-only crates then you should add them to 
> via
> +the @code{#:cargo-inputs} parameter as a list of name and spec pairs, where 
> the
>  spec can be a package or a source definition.  Note that the spec must
>  evaluate to a path to a gzipped tarball which includes a @code{Cargo.toml}
>  file at its root, or it will be ignored.  Similarly, cargo dev-dependencies

I have no experience in Rust.  Do I understand correctly that
source-only crates among the inputs should be added both to inputs and
to #:cargo-inputs?  Is the

> +inputs.  If you need to add source-only crates then you should add them to 
> via

a typo which should read “add them too” instead of “add them to”?

I look at the subsequent change
f35ab79e033aa8e4955e9c9100c74ecbb3ce4d0b to rust-wayland-commons

> diff --git a/gnu/packages/crates-graphics.scm 
> b/gnu/packages/crates-graphics.scm
> index d67e9dc02f..7dde00ffdb 100644
> --- a/gnu/packages/crates-graphics.scm
> +++ b/gnu/packages/crates-graphics.scm
> @@ -2415,8 +2415,11 @@ the wayland protocol, client side.")
>      (arguments
> -     `(#:skip-build? #t
> -       #:cargo-inputs
> +     `(#:cargo-inputs
>         (("rust-nix" ,rust-nix-0.18)
>          ("rust-once-cell" ,rust-once-cell-1)
> -        ("rust-smallvec" ,rust-smallvec-1)
> -        ("rust-wayland-sys" ,rust-wayland-sys-0.28))))
> +        ("rust-smallvec" ,rust-smallvec-1))))
> +    (inputs
> +     `(("rust-nix" ,rust-nix-0.18)
> +       ("rust-once-cell" ,rust-once-cell-1)
> +       ("rust-smallvec" ,rust-smallvec-1)
> +       ("rust-wayland-sys" ,rust-wayland-sys-0.28)))
>      (home-page "https://github.com/smithay/wayland-rs";)

and do not understand why rust-wayland-sys is only part of inputs but
rust-once-cell is also among the cargo-inputs.  Also the inputs are
empty for older versions of rust-wayland-commons.

Could you clarify what is written in the doc/guix.texi?

Regards,
Florian





reply via email to

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