Subject: [bug#48671] [PATCH 06/11] gnu: Add rust-merge-0.1.

From: Xinglu Chen <[email-masked]>
Date: Mon, 31 May 2021 22:51:29 +0200

On Sun, May 30 2021, Antero Mejr wrote:

> * gnu/packages/crates-io.scm (rust-merge-0.1): New variable.
> ---
>  gnu/packages/crates-io.scm | 42 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 42 insertions(+)

The second package should be in a separate patch.

> diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
> index e41920652e..7250853f81 100644
> --- a/gnu/packages/crates-io.scm
> +++ b/gnu/packages/crates-io.scm
> @@ -23390,6 +23390,48 @@ for Rust structs.")
>         (sha256
>          (base32 "13ir50j549gdz94pds1i7ljnk14d66q5x91s11hncm1pih7jif8c"))))))
>  
> +(define-public rust-merge-0.1
> +  (package
> +    (name "rust-merge")
> +    (version "0.1.0")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (crate-uri "merge" version))
> +       (file-name (string-append name "-" version ".tar.gz"))
> +       (sha256
> +        (base32
> +         "1sck0vhi9lk8a6mgky0rgn842fj7yspywidwbd963nmimf9yzfqh"))))
> +    (build-system cargo-build-system)
> +    (arguments
> +     `(#:cargo-inputs
> +       (("rust-merge-derive" ,rust-merge-derive-0.1)
> +        ("rust-num-traits" ,rust-num-traits-0.2))))
> +    (home-page "https://git.sr.ht/~ireas/merge-rs")

It also has a page on sr.ht, which contains links to the mailing list.

  https://sr.ht/~ireas/merge-rs/

> +    (synopsis "Rust trait for objects that can be merged")
> +    (description "This package provides a merge trait that can be used
> +to merge two objects of the same type into one.")
> +    (license (list license:asl2.0 license:expat))))
> +
> +(define-public rust-merge-derive-0.1
> +  (package
> +    (name "rust-merge-derive")
> +    (version "0.1.0")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (crate-uri "merge_derive" version))
> +       (file-name (string-append name "-" version ".tar.gz"))
> +       (sha256
> +        (base32 "01wxhi7mqmp34l540wcfb24hb13vcbps4wlynas66bnsfra0g790"))))
> +    (build-system cargo-build-system)
> +    (home-page
> +     "https://git.sr.ht/~ireas/merge-rs/tree/master/merge_derive")

Same as above.

> +    (synopsis "Derive macro for the merge crate")
> +    (description "This crate provides a derive macro for the
> +merge::Merge crate.  See the merge crate for more information.")

The last sentence doesn’t seem very helpful, it should be dropped.
Also, ‘merge::Merge’ should probably be formatted as
@code{merge::Merge}.