diff mbox series

[bug#54644,6/7] gnu: rust-serde-regex 1: Update to 1.1.0

Message ID 87bkxnjf5m.fsf@corp.mail.ru
State Accepted
Headers show
Series [bug#54644,1/7] gnu: rust-nom-locate-4: Add 4.0.0 | expand

Commit Message

Evgenii Lepikhin March 30, 2022, 9:37 p.m. UTC
* gnu/packages/crates-io.scm (rust-serde-regex-1): Update to 1.1.0.
---
 gnu/packages/crates-io.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

Comments

M March 31, 2022, 11:56 a.m. UTC | #1
Evgenii Lepikhin via Guix-patches via schreef op do 31-03-2022 om 00:37
[+0300]:
> +    (arguments
> +     `(#:skip-build? #true
> +       #:cargo-inputs
> +       (("rust-regex" ,rust-regex-1))
> +       #:cargo-development-inputs
> +       (("rust-serde-derive" ,rust-serde-derive-1)
> +        ("rust-serde-json" ,rust-serde-json-1))))

Would propagated-inputs/native-inputs suffice instead of the cargo-
specific input system?  Also, why is building skipped?  From (guix)Rust
Crates:

Care should be taken to ensure the correct version of dependencies
are used; to this end we try to refrain from skipping the tests or
using ‘#:skip-build?’ when possible.
M March 31, 2022, 11:58 a.m. UTC | #2
Evgenii Lepikhin via Guix-patches via schreef op do 31-03-2022 om 00:37
[+0300]:
> * gnu/packages/crates-io.scm (rust-serde-regex-1): Update to 1.1.0.

This is not yet in Guix AFAICT, so this is adding, not updating.

> ---
>  gnu/packages/crates-io.scm | 25 +++++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
> 
> diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
> index 738f57837a..f57f4161db 100644
> --- a/gnu/packages/crates-io.scm
> +++ b/gnu/packages/crates-io.scm
> @@ -54513,6 +54513,31 @@ (define-public rust-serde-qs-0.7
>  commonly used by Ruby on Rails via Rack.")
>      (license (list license:expat license:asl2.0))))
>  
> +(define-public rust-serde-regex-1

Why the -1 suffix?  This appears to be the only rust-serde-regex in
Guix.

Greetings,
Maxime.
Efraim Flashner March 31, 2022, 2:48 p.m. UTC | #3
On Thu, Mar 31, 2022 at 01:58:38PM +0200, Maxime Devos wrote:
> Evgenii Lepikhin via Guix-patches via schreef op do 31-03-2022 om 00:37
> [+0300]:
> > * gnu/packages/crates-io.scm (rust-serde-regex-1): Update to 1.1.0.
> 
> This is not yet in Guix AFAICT, so this is adding, not updating.
> 
> > ---
> >  gnu/packages/crates-io.scm | 25 +++++++++++++++++++++++++
> >  1 file changed, 25 insertions(+)
> > 
> > diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
> > index 738f57837a..f57f4161db 100644
> > --- a/gnu/packages/crates-io.scm
> > +++ b/gnu/packages/crates-io.scm
> > @@ -54513,6 +54513,31 @@ (define-public rust-serde-qs-0.7
> >  commonly used by Ruby on Rails via Rack.")
> >      (license (list license:expat license:asl2.0))))
> >  
> > +(define-public rust-serde-regex-1
> 
> Why the -1 suffix?  This appears to be the only rust-serde-regex in
> Guix.

It's needed so we can keep track of the different versions of the
crates. As with the other crates we have packaged, we can easily end up
needed numerous 0.x crates in addition to this one.
M March 31, 2022, 7:16 p.m. UTC | #4
Maxime Devos schreef op do 31-03-2022 om 13:56 [+0200]:
> Evgenii Lepikhin via Guix-patches via schreef op do 31-03-2022 om 00:37
> [+0300]:
> > +    (arguments
> > +     `(#:skip-build? #true
> > +       #:cargo-inputs
> > +       (("rust-regex" ,rust-regex-1))
> > +       #:cargo-development-inputs
> > +       (("rust-serde-derive" ,rust-serde-derive-1)
> > +        ("rust-serde-json" ,rust-serde-json-1))))
> 
> Also, why is building skipped?  From (guix)Rust Crates:
> 
> Care should be taken to ensure the correct version of dependencies
> are used; to this end we try to refrain from skipping the tests or
> using ‘#:skip-build?’ when possible.

Nevermind, if interested in why not see the recent "Removing #:skip-
build? from the crate importer?" thread on guix-devel@gnu.org.

Greetings,
Maxime
diff mbox series

Patch

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 738f57837a..f57f4161db 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -54513,6 +54513,31 @@  (define-public rust-serde-qs-0.7
 commonly used by Ruby on Rails via Rack.")
     (license (list license:expat license:asl2.0))))
 
+(define-public rust-serde-regex-1
+  (package
+    (name "rust-serde-regex")
+    (version "1.1.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "serde_regex" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32 "1pxsnxb8c198szghk1hvzvhva36w2q5zs70hqkmdf5d89qd6y4x8"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:skip-build? #true
+       #:cargo-inputs
+       (("rust-regex" ,rust-regex-1))
+       #:cargo-development-inputs
+       (("rust-serde-derive" ,rust-serde-derive-1)
+        ("rust-serde-json" ,rust-serde-json-1))))
+    (home-page "https://github.com/tailhook/serde-regex")
+    (synopsis "A serde wrapper, that can be used to serialize regular expressions as strings.")
+    (description "A serde wrapper, that can be used to serialize regular expressions as strings.
+It's often useful to read regexes from configuration file.")
+    (license (list license:expat license:asl2.0))))
+
 (define-public rust-serde-repr-0.1
   (package
     (name "rust-serde-repr")