Subject: [bug#75206] [PATCH rust-team v2 2/9] gnu: rust-structopt-0.3: Build.

From: Aaron Covrig <[email-masked]>
Date: Sun, 19 Jan 2025 21:48:58 -0500

From: Herman Rimm <[email-masked]>

* gnu/packages/crates-io.scm (rust-structopt-0.3): Do not skip build.
[source]: Remove failing test files.

Change-Id: I468ab9e5813bea6d4cbee74c22ae8ad4c4803a0c
---
 gnu/packages/crates-io.scm | 39 +++++++++++++++++++++-----------------
 1 file changed, 22 insertions(+), 17 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 49b1a9b420..5705720f63 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -76110,23 +76110,28 @@ (define-public rust-structopt-0.3
        (sha256
         (base32 "043sg3qxllann6q9i71d05qp3q13scmcvhxhd950ka2v8ij5qsqc"))
        (modules '((guix build utils)))
-       (snippet
-        #~(begin (substitute* "Cargo.toml"
-                   ;; feature does not exist
-                   (("lints.*") "")
-                   (("2.33") #$(package-version rust-clap-2)))))))
-    (build-system cargo-build-system)
-    (arguments
-     `(#:skip-build? #t
-       #:cargo-inputs
-       (("rust-structopt-derive" ,rust-structopt-derive-0.4)
-        ("rust-lazy-static" ,rust-lazy-static-1)
-        ("rust-paw" ,rust-paw-1)
-        ("rust-clap" ,rust-clap-2))
-       #:cargo-development-inputs
-       (("rust-strum" ,rust-strum-0.21)
-        ("rust-trybuild" ,rust-trybuild-1)
-        ("rust-rustversion" ,rust-rustversion-1))))
+       (snippet #~(begin
+                    (substitute* "Cargo.toml"
+                      ;; feature does not exist
+                      (("lints.*")
+                       "")
+                      (("2.33")
+                       #$(package-version rust-clap-2)))
+                    ;; Cargo build stderr does not exactly match.
+                    (with-directory-excursion "tests/ui"
+                      (for-each delete-file
+                                '("external_subcommand_wrong_type.rs"
+                                  "positional_bool.rs" "raw.rs"
+                                  "skip_without_default.rs")))))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs (("rust-structopt-derive" ,rust-structopt-derive-0.4)
+                       ("rust-lazy-static" ,rust-lazy-static-1)
+                       ("rust-paw" ,rust-paw-1)
+                       ("rust-clap" ,rust-clap-2))
+       #:cargo-development-inputs (("rust-strum" ,rust-strum-0.21)
+                                   ("rust-trybuild" ,rust-trybuild-1)
+                                   ("rust-rustversion" ,rust-rustversion-1))))
     (home-page "https://github.com/TeXitoi/structopt")
     (synopsis "Parse command line argument by defining a struct")
     (description
-- 
2.47.1