* [bug#61561] Add rust-mockall and friends
@ 2023-02-16 22:51 Steve George
2023-02-16 23:00 ` [bug#61561] [PATCH 1/5] gnu: Add rust-pretty-assertions-0.5 Steve George
0 siblings, 1 reply; 6+ messages in thread
From: Steve George @ 2023-02-16 22:51 UTC (permalink / raw)
To: 61561
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#61561] [PATCH 1/5] gnu: Add rust-pretty-assertions-0.5.
2023-02-16 22:51 [bug#61561] Add rust-mockall and friends Steve George
@ 2023-02-16 23:00 ` Steve George
2023-02-16 23:01 ` [bug#61561] [PATCH 2/5] gnu: add rust-downcast Steve George
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Steve George @ 2023-02-16 23:00 UTC (permalink / raw)
To: 61561; +Cc: Steve George
* gnu/packages/crates-io.scm (rust-pretty-assertions-0.5): New variable.
---
Tests fail as they require Rust 1.35, added a comment.
gnu/packages/crates-io.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index e615a51b01..355c8ef761 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -42350,6 +42350,27 @@ (define-public rust-pretty-assertions-0.6
("rust-ansi-term" ,rust-ansi-term-0.11)
("rust-difference" ,rust-difference-2))))))
+ ; test fail because minimum rust required is 1.35
+; https://github.com/rust-pretty-assertions/rust-pretty-assertions/issues/32
+(define-public rust-pretty-assertions-0.5
+ (package
+ (inherit rust-pretty-assertions-0.6)
+ (name "rust-pretty-assertions")
+ (version "0.5.1")
+ (source (origin
+ (method url-fetch)
+ (uri (crate-uri "pretty-assertions" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1ins6swkpxmrh8q5h96h8nv0497d3dclsiyx2lyvqi6py0q980is"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:tests? #f
+ #:skip-build? #f
+ #:cargo-inputs (("rust-ansi-term" ,rust-ansi-term-0.11)
+ ("rust-difference" ,rust-difference-2))))))
+
(define-public rust-pretty-assertions-0.4
(package
(inherit rust-pretty-assertions-0.6)
--
2.39.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#61561] [PATCH 2/5] gnu: add rust-downcast
2023-02-16 23:00 ` [bug#61561] [PATCH 1/5] gnu: Add rust-pretty-assertions-0.5 Steve George
@ 2023-02-16 23:01 ` Steve George
2023-02-16 23:01 ` [bug#61561] [PATCH 3/5] gnu: Add rust-mockall-double Steve George
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Steve George @ 2023-02-16 23:01 UTC (permalink / raw)
To: 61561; +Cc: Steve George
* gnu/packages/crates-io.scm (rust-downcast-0.11): New variable.
---
gnu/packages/crates-io.scm | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 355c8ef761..180b0838a9 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -17761,6 +17761,28 @@ (define-public rust-document-features-0.2
@code{Cargo.toml}.")
(license (list license:expat license:asl2.0))))
+(define-public rust-downcast-0.11
+ (package
+ (name "rust-downcast")
+ (version "0.11.0")
+ (source (origin
+ (method url-fetch)
+ (uri (crate-uri "downcast" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1wa78ahlc57wmqyq2ncr80l7plrkgz57xsg7kfzgpcnqac8gld8l"))))
+ (build-system cargo-build-system)
+ (arguments
+ `( #:skip-build? #f))
+ (home-page "https://github.com/fkoep/downcast-rs")
+ (synopsis
+ "Trait for downcasting trait objects back to their original types")
+ (description
+ "A trait, and utilities, for downcasting trait objects back
+to their original types. The same as the rust-downcast-rs crate.")
+ (license license:expat)))
+
(define-public rust-downcast-rs-1
(package
(name "rust-downcast-rs")
@@ -42372,7 +42394,7 @@ (define-public rust-pretty-assertions-0.5
("rust-difference" ,rust-difference-2))))))
(define-public rust-pretty-assertions-0.4
- (package
+ (package
(inherit rust-pretty-assertions-0.6)
(name "rust-pretty-assertions")
(version "0.4.1")
--
2.39.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#61561] [PATCH 3/5] gnu: Add rust-mockall-double.
2023-02-16 23:00 ` [bug#61561] [PATCH 1/5] gnu: Add rust-pretty-assertions-0.5 Steve George
2023-02-16 23:01 ` [bug#61561] [PATCH 2/5] gnu: add rust-downcast Steve George
@ 2023-02-16 23:01 ` Steve George
2023-02-16 23:01 ` [bug#61561] [PATCH 4/5] gnu: Add rust-mockall-derive Steve George
2023-02-16 23:01 ` [bug#61561] [PATCH 5/5] gnu: Add rust-mockall Steve George
3 siblings, 0 replies; 6+ messages in thread
From: Steve George @ 2023-02-16 23:01 UTC (permalink / raw)
To: 61561; +Cc: Steve George
* gnu/packages/crates-io.scm (rust-mockall-double-0.3): New variable.
---
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 180b0838a9..42137b6853 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -33735,6 +33735,31 @@ (define-public rust-miow-0.2
#:cargo-development-inputs
(("rust-rand" ,rust-rand-0.3))))))
+(define-public rust-mockall-double-0.3
+ (package
+ (name "rust-mockall-double")
+ (version "0.3.0")
+ (source (origin
+ (method url-fetch)
+ (uri (crate-uri "mockall-double" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1xk6hjr7m73zly4hg3zmma437vqvrwnjxy2wfxy1hxbk52xwfwdf"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:skip-build? #f
+ #:cargo-inputs (("rust-cfg-if" ,rust-cfg-if-1)
+ ("rust-proc-macro2" ,rust-proc-macro2-1)
+ ("rust-quote" ,rust-quote-1)
+ ("rust-syn" ,rust-syn-1))))
+ (home-page "https://github.com/asomers/mockall")
+ (synopsis "Double test adapter that works well with Mockall")
+ (description
+ "This crate makes it even easier to use mocking by providing a way to
+select the mock struct at compile time. Used with the Mockall crate.")
+ (license (list license:expat license:asl2.0))))
+
(define-public rust-model-0.1
(package
(name "rust-model")
--
2.39.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#61561] [PATCH 4/5] gnu: Add rust-mockall-derive.
2023-02-16 23:00 ` [bug#61561] [PATCH 1/5] gnu: Add rust-pretty-assertions-0.5 Steve George
2023-02-16 23:01 ` [bug#61561] [PATCH 2/5] gnu: add rust-downcast Steve George
2023-02-16 23:01 ` [bug#61561] [PATCH 3/5] gnu: Add rust-mockall-double Steve George
@ 2023-02-16 23:01 ` Steve George
2023-02-16 23:01 ` [bug#61561] [PATCH 5/5] gnu: Add rust-mockall Steve George
3 siblings, 0 replies; 6+ messages in thread
From: Steve George @ 2023-02-16 23:01 UTC (permalink / raw)
To: 61561; +Cc: Steve George
* gnu/packages/crates-io.scm (rust-mockall-derive-0.11): New variable.
---
* version 0.11.1 to match rust-mockall version
gnu/packages/crates-io.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 42137b6853..9ce18ea1f0 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -33760,6 +33760,32 @@ (define-public rust-mockall-double-0.3
select the mock struct at compile time. Used with the Mockall crate.")
(license (list license:expat license:asl2.0))))
+(define-public rust-mockall-derive-0.11
+ (package
+ (name "rust-mockall-derive")
+ (version "0.11.1") ; match with the rust-mockall version
+ (source (origin
+ (method url-fetch)
+ (uri (crate-uri "mockall-derive" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1ixhmsrg5ky4b2jlvbxhlpr3mbv7frd6wr8msm005vijb5rmcb96"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:skip-build? #f
+ #:cargo-inputs
+ (("rust-cfg-if" ,rust-cfg-if-1)
+ ("rust-proc-macro2" ,rust-proc-macro2-1)
+ ("rust-quote" ,rust-quote-1)
+ ("rust-syn" ,rust-syn-1))
+ #:cargo-development-inputs
+ (("rust-pretty-assertions" ,rust-pretty-assertions-0.7))))
+ (home-page "https://github.com/asomers/mockall")
+ (synopsis "Procedural macros for the Mockall crate")
+ (description "Procedural macros for the Mockall crate.")
+ (license (list license:expat license:asl2.0))))
+
(define-public rust-model-0.1
(package
(name "rust-model")
--
2.39.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#61561] [PATCH 5/5] gnu: Add rust-mockall.
2023-02-16 23:00 ` [bug#61561] [PATCH 1/5] gnu: Add rust-pretty-assertions-0.5 Steve George
` (2 preceding siblings ...)
2023-02-16 23:01 ` [bug#61561] [PATCH 4/5] gnu: Add rust-mockall-derive Steve George
@ 2023-02-16 23:01 ` Steve George
3 siblings, 0 replies; 6+ messages in thread
From: Steve George @ 2023-02-16 23:01 UTC (permalink / raw)
To: 61561; +Cc: Steve George
* gnu/packages/crates-io.scm (rust-mockall-0.11): New variable.
---
gnu/packages/crates-io.scm | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 9ce18ea1f0..cb19edaf83 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -33760,6 +33760,42 @@ (define-public rust-mockall-double-0.3
select the mock struct at compile time. Used with the Mockall crate.")
(license (list license:expat license:asl2.0))))
+(define-public rust-mockall-0.11
+ (package
+ (name "rust-mockall")
+ (version "0.11.1")
+ (source (origin
+ (method url-fetch)
+ (uri (crate-uri "mockall" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0k3g3xxf195vsnzmwza047dv89zlg6h5yj5774wjlndgpdvf8han"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:skip-build? #t
+ #:cargo-inputs
+ (("rust-cfg-if" ,rust-cfg-if-1)
+ ("rust-downcast" ,rust-downcast-0.11)
+ ("rust-fragile" ,rust-fragile-1)
+ ("rust-lazy-static" ,rust-lazy-static-1)
+ ("rust-mockall-derive" ,rust-mockall-derive-0.11)
+ ("rust-predicates" ,rust-predicates-2)
+ ("rust-predicates-tree" ,rust-predicates-tree-1))
+ #:cargo-development-inputs
+ (("rust-async-trait" ,rust-async-trait-0.1)
+ ("rust-futures" ,rust-futures-0.3)
+ ("rust-mockall-double" ,rust-mockall-double-0.3)
+ ("rust-serde" ,rust-serde-1)
+ ("rust-serde-derive" ,rust-serde-derive-1)
+ ("rust-serde-json" ,rust-serde-json-1)
+ ("rust-tracing" ,rust-tracing-0.1))))
+ (home-page "https://github.com/asomers/mockall")
+ (synopsis "Powerful mock object library for Rust")
+ (description "Mockall is a rich mocking library with a terse and ergonomic
+interface. It is written in 100% safe and stable Rust.")
+ (license (list license:expat license:asl2.0))))
+
(define-public rust-mockall-derive-0.11
(package
(name "rust-mockall-derive")
--
2.39.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-02-16 23:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-16 22:51 [bug#61561] Add rust-mockall and friends Steve George
2023-02-16 23:00 ` [bug#61561] [PATCH 1/5] gnu: Add rust-pretty-assertions-0.5 Steve George
2023-02-16 23:01 ` [bug#61561] [PATCH 2/5] gnu: add rust-downcast Steve George
2023-02-16 23:01 ` [bug#61561] [PATCH 3/5] gnu: Add rust-mockall-double Steve George
2023-02-16 23:01 ` [bug#61561] [PATCH 4/5] gnu: Add rust-mockall-derive Steve George
2023-02-16 23:01 ` [bug#61561] [PATCH 5/5] gnu: Add rust-mockall Steve George
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).