[PATCH 0/3 rust-team] gnu: Add rust-databake-0.1

  • Open
  • quality assurance status badge
Details
2 participants
  • Jaeme Sifat
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Jaeme Sifat
Severity
normal

Debbugs page

J
J
Jaeme Sifat wrote on 22 Dec 2023 13:49
(address . guix-patches@gnu.org)(name . Jaeme Sifat)(address . jaeme@runbox.com)
cover.1703281739.git.jaeme@runbox.com
Jaeme Sifat (3):
gnu: Add rust-synstructure-0.13.
gnu: Add rust-databake-derive-0.1.
gnu: Add rust-databake-0.1.

gnu/packages/crates-io.scm | 87 +++++++++++++++++++++++++++++++++++---
1 file changed, 80 insertions(+), 7 deletions(-)


base-commit: 2f9f39f44108884669e7201c8fbf7f7d39e65ff2
--
2.41.0
J
J
Jaeme Sifat wrote on 22 Dec 2023 14:11
[PATCH 1/3] gnu: Add rust-synstructure-0.13.
(address . 67974@debbugs.gnu.org)(name . Jaeme Sifat)(address . jaeme@runbox.com)
eda8153e8bdefb63440da050841bccf6a6effe58.1703281739.git.jaeme@runbox.com
* gnu/packages/crates-io.scm (rust-synstructure-0.13): New variable.

Change-Id: I3d26757bcd0993c28714325554775c938c185f2b
---
gnu/packages/crates-io.scm | 35 ++++++++++++++++++++++++++++-------
1 file changed, 28 insertions(+), 7 deletions(-)

Toggle diff (64 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 54646a4549..01090ec1a7 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -77301,8 +77301,35 @@ (define-public rust-synom-0.11
"Stripped-down Nom parser used by Syn.")
(license (list license:expat license:asl2.0))))
+(define-public rust-synstructure-0.13
+ (package
+ (name "rust-synstructure")
+ (version "0.13.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "synstructure" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "01jvj55fxgqa69sp1j9mma09p9vj6zwcvyvh8am81b1zfc7ahnr8"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-inputs
+ (("rust-proc-macro2" ,rust-proc-macro2-1)
+ ("rust-quote" ,rust-quote-1)
+ ("rust-syn" ,rust-syn-2)
+ ("rust-unicode-xid" ,rust-unicode-xid-0.2))
+ #:cargo-development-inputs
+ (("rust-synstructure-test-traits" ,rust-synstructure-test-traits-0.1))))
+ (home-page "https://github.com/mystor/synstructure")
+ (synopsis "Helper methods and macros for custom derives")
+ (description
+ "This package provides helper methods and macros for custom derives.")
+ (license license:expat)))
+
(define-public rust-synstructure-0.12
(package
+ (inherit rust-synstructure-0.13)
(name "rust-synstructure")
(version "0.12.6")
(source
@@ -77314,7 +77341,6 @@ (define-public rust-synstructure-0.12
(sha256
(base32
"03r1lydbf3japnlpc4wka7y90pmz1i0danaj3f9a7b431akdlszk"))))
- (build-system cargo-build-system)
(arguments
`(#:skip-build? #t
#:cargo-inputs
@@ -77330,12 +77356,7 @@ (define-public rust-synstructure-0.12
(add-after 'unpack 'fix-test
(lambda _
(substitute* "src/lib.rs"
- (("non_upper_case_globals )") "non_upper_case_globals)")))))))
- (home-page "https://github.com/mystor/synstructure")
- (synopsis "Helper methods and macros for custom derives")
- (description
- "This package provides helper methods and macros for custom derives.")
- (license license:expat)))
+ (("non_upper_case_globals )") "non_upper_case_globals)")))))))))
(define-public rust-synstructure-test-traits-0.1
(package
--
2.41.0
J
J
Jaeme Sifat wrote on 22 Dec 2023 14:11
[PATCH 2/3] gnu: Add rust-databake-derive-0.1.
(address . 67974@debbugs.gnu.org)(name . Jaeme Sifat)(address . jaeme@runbox.com)
0535508b97614244d2d5b357e0bb7901d83c460a.1703281739.git.jaeme@runbox.com
* gnu/packages/crates-io.scm (rust-databake-derive-0.1): New variable.

Change-Id: Idd911a0ddb72eca8b59ec3366d9dd02e152a0c8d
---
gnu/packages/crates-io.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 01090ec1a7..7e0517e967 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -20498,6 +20498,30 @@ (define-public rust-dashmap-3
(setenv "RUSTC_BOOTSTRAP" "1")
#t)))))))
+(define-public rust-databake-derive-0.1
+ (package
+ (name "rust-databake-derive")
+ (version "0.1.7")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "databake-derive" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "0hqsjizibp0bb5m4kiqk9g2gixywqlxn513w5a366dpjv20z4yip"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:tests? #f ; Tries to use local import 'databake'
+ #:cargo-inputs (("rust-proc-macro2" ,rust-proc-macro2-1)
+ ("rust-quote" ,rust-quote-1)
+ ("rust-syn" ,rust-syn-2)
+ ("rust-synstructure" ,rust-synstructure-0.13))))
+ (home-page "https://github.com/unicode-org/icu4x")
+ (synopsis "Custom derive for the @code{databake} crate")
+ (description
+ "This package provides the custom derive for the @code{databake} crate.")
+ (license license:unicode)))
+
(define-public rust-data-encoding-2
(package
(name "rust-data-encoding")
--
2.41.0
J
J
Jaeme Sifat wrote on 22 Dec 2023 14:11
[PATCH 3/3] gnu: Add rust-databake-0.1.
(address . 67974@debbugs.gnu.org)(name . Jaeme Sifat)(address . jaeme@runbox.com)
b2883259639bd54669e70a46a2b05191d6c54829.1703281739.git.jaeme@runbox.com
* gnu/packages/crates-io.scm (rust-databake-0.1): New variable.

Change-Id: I8cd9208d9ac904c66de451d4a6f480d7eb1f4d73
---
gnu/packages/crates-io.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 7e0517e967..3eda22f0ee 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -20498,6 +20498,34 @@ (define-public rust-dashmap-3
(setenv "RUSTC_BOOTSTRAP" "1")
#t)))))))
+(define-public rust-databake-0.1
+ (package
+ (name "rust-databake")
+ (version "0.1.7")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "databake" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "0flmvn7ym0sz6mkh5mg08vcbxa6kjiknhj9bpspww54lwrr5s5w2"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-test-flags '("--release" "--"
+ "--skip=src/lib.rs - (line 27)"
+ "--skip=src/lib.rs - (line 46)")
+ #:cargo-inputs (("rust-databake-derive" ,rust-databake-derive-0.1)
+ ("rust-proc-macro2" ,rust-proc-macro2-1)
+ ("rust-quote" ,rust-quote-1))))
+ (home-page "https://github.com/unicode-org/icu4x")
+ (synopsis
+ "Trait that lets structs represent themselves as (const) Rust
+expressions")
+ (description
+ "This package provides traits that let structs represent themselves
+as (const) Rust expressions.")
+ (license license:unicode)))
+
(define-public rust-databake-derive-0.1
(package
(name "rust-databake-derive")
--
2.41.0
M
M
Maxim Cournoyer wrote on 3 Jan 19:51 -0800
Re: bug#67974: [PATCH 0/3 rust-team] gnu: Add rust-databake-0.1
(name . Jaeme Sifat)(address . jaeme@runbox.com)
871qax4uyd.fsf_-_@gmail.com
Hi,

Jaeme Sifat <jaeme@runbox.com> writes:

Toggle quote (30 lines)
> * gnu/packages/crates-io.scm (rust-databake-derive-0.1): New variable.
>
> Change-Id: Idd911a0ddb72eca8b59ec3366d9dd02e152a0c8d
> ---
> gnu/packages/crates-io.scm | 24 ++++++++++++++++++++++++
> 1 file changed, 24 insertions(+)
>
> diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
> index 01090ec1a7..7e0517e967 100644
> --- a/gnu/packages/crates-io.scm
> +++ b/gnu/packages/crates-io.scm
> @@ -20498,6 +20498,30 @@ (define-public rust-dashmap-3
> (setenv "RUSTC_BOOTSTRAP" "1")
> #t)))))))
>
> +(define-public rust-databake-derive-0.1
> + (package
> + (name "rust-databake-derive")
> + (version "0.1.7")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (crate-uri "databake-derive" version))
> + (file-name (string-append name "-" version ".tar.gz"))
> + (sha256
> + (base32 "0hqsjizibp0bb5m4kiqk9g2gixywqlxn513w5a366dpjv20z4yip"))))
> + (build-system cargo-build-system)
> + (arguments
> + `(#:tests? #f ; Tries to use local import 'databake'

I'm not well Rust-versed; why is this a problem? Can't we move the
check phase after the install phase, perhaps setting an environment
variable so the installed library is found?

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 3 Jan 19:55 -0800
(name . Jaeme Sifat)(address . jaeme@runbox.com)
87wmsp3g7t.fsf_-_@gmail.com
Hi,

Jaeme Sifat <jaeme@runbox.com> writes:

Toggle quote (32 lines)
> * gnu/packages/crates-io.scm (rust-databake-0.1): New variable.
>
> Change-Id: I8cd9208d9ac904c66de451d4a6f480d7eb1f4d73
> ---
> gnu/packages/crates-io.scm | 28 ++++++++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
>
> diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
> index 7e0517e967..3eda22f0ee 100644
> --- a/gnu/packages/crates-io.scm
> +++ b/gnu/packages/crates-io.scm
> @@ -20498,6 +20498,34 @@ (define-public rust-dashmap-3
> (setenv "RUSTC_BOOTSTRAP" "1")
> #t)))))))
>
> +(define-public rust-databake-0.1
> + (package
> + (name "rust-databake")
> + (version "0.1.7")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (crate-uri "databake" version))
> + (file-name (string-append name "-" version ".tar.gz"))
> + (sha256
> + (base32 "0flmvn7ym0sz6mkh5mg08vcbxa6kjiknhj9bpspww54lwrr5s5w2"))))
> + (build-system cargo-build-system)
> + (arguments
> + `(#:cargo-test-flags '("--release" "--"
> + "--skip=src/lib.rs - (line 27)"
> + "--skip=src/lib.rs - (line 46)")

Why are the above tests skipped? Presumably, they failed, but for what
reason? An explanatory comment would help.

Toggle quote (8 lines)
> + #:cargo-inputs (("rust-databake-derive" ,rust-databake-derive-0.1)
> + ("rust-proc-macro2" ,rust-proc-macro2-1)
> + ("rust-quote" ,rust-quote-1))))
> + (home-page "https://github.com/unicode-org/icu4x")
> + (synopsis
> + "Trait that lets structs represent themselves as (const) Rust
> +expressions")

That's a bit on the verbose side of things for a synopsis; I'd reword to
something like: "Library for representing structs as const expressions".

The rest LGTM.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 3 Jan 19:55 -0800
control message for bug #67974
(address . control@debbugs.gnu.org)
87v8893g7n.fsf@gmail.com
tags 67974 + moreinfo
quit
J
J
Jaeme Sifat wrote on 3 Jan 21:45 -0800
[PATCH v2REVISION 3/3] gnu: Add rust-databake-0.1.
(address . 67974@debbugs.gnu.org)
d4e04393419b206039208dc0b6bef0687c4d75a0.1704347126.git.jaeme@runbox.com
* gnu/packages/crates-io.scm (rust-databake-0.1): New variable.

Change-Id: I8cd9208d9ac904c66de451d4a6f480d7eb1f4d73
---
gnu/packages/crates-io.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

Toggle diff (42 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 74321780ef..b1f5717340 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -18567,6 +18567,33 @@ (define-public rust-dashmap-3
(setenv "RUSTC_BOOTSTRAP" "1")
#t)))))))

+(define-public rust-databake-0.1
+ (package
+ (name "rust-databake")
+ (version "0.1.7")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "databake" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "0flmvn7ym0sz6mkh5mg08vcbxa6kjiknhj9bpspww54lwrr5s5w2"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(;; Cannot find `bake' attribute/bad import.
+ #:cargo-test-flags '("--release" "--"
+ "--skip=src/lib.rs - (line 27)"
+ "--skip=src/lib.rs - (line 46)")
+ #:cargo-inputs (("rust-databake-derive" ,rust-databake-derive-0.1)
+ ("rust-proc-macro2" ,rust-proc-macro2-1)
+ ("rust-quote" ,rust-quote-1))))
+ (home-page "https://github.com/unicode-org/icu4x")
+ (synopsis "Library for representing structs as const expressions")
+ (description
+ "This package provides traits that let structs represent themselves
+as (@code{const}) Rust expressions.")
+ (license license:unicode)))
+
(define-public rust-databake-derive-0.1
(package
(name "rust-databake-derive")

base-commit: 5844d18a8905ee3f62ccefe084dce4de61288fbf
prerequisite-patch-id: c42391f13df64825499692ee5a0e142189d37112
prerequisite-patch-id: 5f9842aaaad434effd7d4a5da0207e738d73bfd8
--
2.41.0
J
J
Jaeme Sifat wrote on 3 Jan 21:51 -0800
[PATCH v3REVISION 3/3] gnu: Add rust-databake-0.1.
(address . 67974@debbugs.gnu.org)
f0335ca876d4f61c2207354e6a3e234cc5777e5e.1704347462.git.jaeme@runbox.com
* gnu/packages/crates-io.scm (rust-databake-0.1): New variable.

Change-Id: I8cd9208d9ac904c66de451d4a6f480d7eb1f4d73
---
gnu/packages/crates-io.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)

Toggle diff (44 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 74321780ef..aba8711bc7 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -18567,6 +18567,35 @@ (define-public rust-dashmap-3
(setenv "RUSTC_BOOTSTRAP" "1")
#t)))))))

+(define-public rust-databake-0.1
+ (package
+ (name "rust-databake")
+ (version "0.1.7")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "databake" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "0flmvn7ym0sz6mkh5mg08vcbxa6kjiknhj9bpspww54lwrr5s5w2"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-test-flags
+ '("--release" "--"
+ "--skip=src/lib.rs - (line 27)"
+ "--skip=src/lib.rs - (line 46)") ; Faulty module import of `bake.'
+ #:cargo-inputs
+ (("rust-databake-derive" ,rust-databake-derive-0.1)
+ ("rust-proc-macro2" ,rust-proc-macro2-1)
+ ("rust-quote" ,rust-quote-1))))
+ (home-page "https://github.com/unicode-org/icu4x")
+ (synopsis
+ "Library for representing structs as @code{const} expressions")
+ (description
+ "This package provides traits that let structs represent themselves as
+@code{const} Rust expressions.")
+ (license license:unicode)))
+
(define-public rust-databake-derive-0.1
(package
(name "rust-databake-derive")

base-commit: 5844d18a8905ee3f62ccefe084dce4de61288fbf
prerequisite-patch-id: c42391f13df64825499692ee5a0e142189d37112
prerequisite-patch-id: 5f9842aaaad434effd7d4a5da0207e738d73bfd8
--
2.41.0
M
M
Maxim Cournoyer wrote on 9 Jan 20:28 -0800
Re: bug#67974: [PATCH 0/3 rust-team] gnu: Add rust-databake-0.1
(name . Jaeme Sifat)(address . jaeme@runbox.com)
87a5pdu80u.fsf_-_@gmail.com
Hi Jaeme, Efraim,

Jaeme Sifat <jaeme@runbox.com> writes:

Toggle quote (33 lines)
> * gnu/packages/crates-io.scm (rust-databake-0.1): New variable.
>
> Change-Id: I8cd9208d9ac904c66de451d4a6f480d7eb1f4d73
> ---
> gnu/packages/crates-io.scm | 29 +++++++++++++++++++++++++++++
> 1 file changed, 29 insertions(+)
>
> diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
> index 74321780ef..aba8711bc7 100644
> --- a/gnu/packages/crates-io.scm
> +++ b/gnu/packages/crates-io.scm
> @@ -18567,6 +18567,35 @@ (define-public rust-dashmap-3
> (setenv "RUSTC_BOOTSTRAP" "1")
> #t)))))))
>
> +(define-public rust-databake-0.1
> + (package
> + (name "rust-databake")
> + (version "0.1.7")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (crate-uri "databake" version))
> + (file-name (string-append name "-" version ".tar.gz"))
> + (sha256
> + (base32 "0flmvn7ym0sz6mkh5mg08vcbxa6kjiknhj9bpspww54lwrr5s5w2"))))
> + (build-system cargo-build-system)
> + (arguments
> + `(#:cargo-test-flags
> + '("--release" "--"
> + "--skip=src/lib.rs - (line 27)"
> + "--skip=src/lib.rs - (line 46)") ; Faulty module import of `bake.'

Thanks for adding a comment, but it's still unclear why this is so. The
bake module is provided by this very library, right? I'm not
knowledgeable about Rust, but there's surely a variable we could set to
have it discover by rust?

Efraim, would you know?

--
Thanks,
Maxim
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 67974@patchwise.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 67974
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch