unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Jacob Hrbek <kreyren@rixotstudio.cz>
To: "51944@debbugs.gnu.org" <51944@debbugs.gnu.org>
Subject: [bug#51944] Added skip-build as requested by rekado_
Date: Thu, 18 Nov 2021 19:34:53 +0000	[thread overview]
Message-ID: <SGCRRa3Qi2WGss-8sFd7jAIf5OwBZfd8rI63omR-faEyXbxAGNLEwYN95fQnJQkt5ynT0EHgjvU-bYzP3LBtKEtTIGe95-NbDqVcx2F2y9Y=@rixotstudio.cz> (raw)
In-Reply-To: <iyVc_WDzB13C41YwMkf71ROss-4R5ko_1Drb_6-zhkWa8PIpZ4sbIHiFEl2byDm_zeqg1dmy9pBvf6dM2ZMBoCBHMnbbTnoohPMGxUsZdf8=@rixotstudio.cz>


[-- Attachment #1.1.1: Type: text/plain, Size: 62 bytes --]

-- Jacob "Kreyren" Hrbek

Sent with ProtonMail Secure Email.

[-- Attachment #1.1.2.1: Type: text/html, Size: 348 bytes --]

[-- Attachment #1.2: 0001-shell2batch-New-Package.patch --]
[-- Type: application/octet-stream, Size: 3376 bytes --]

From 754bc08b1b9f0aad6d5098a6168dca18ddd1a46b Mon Sep 17 00:00:00 2001
From: Jacob Hrbek <kreyren@rixotstudio.cz>
Date: Thu, 18 Nov 2021 20:32:54 +0100
Subject: [PATCH] shell2batch: New Package

---
 gnu/packages/crates-io.scm                    | 26 +++++++++++++++++++
 .../patches/shell2batch-0.4.2-lint-fix.patch  | 22 ++++++++++++++++
 2 files changed, 48 insertions(+)
 create mode 100644 gnu/packages/patches/shell2batch-0.4.2-lint-fix.patch

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 148e8cbff3..1ffa28b872 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -20,6 +20,7 @@
 ;;; Copyright © 2021 Vinicius Monego <monego@posteo.net>
 ;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
 ;;; Copyright © 2021 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2021 Jacob Hrbek <kreyren@rixotstudio.cz>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -63154,3 +63155,28 @@ (define-public svd2rust
     (description
       "Generate Rust register maps (`struct`s) from SVD files")
     (license (list license:expat license:asl2.0))))
+
+(define-public rust-shell2batch-0.4
+  (package
+    (name "rust-shell2batch")
+    (version "0.4.2")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "shell2batch" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32 "0r9zfhxmqnrnyk7g590333szfpsjijs2wfwy7ish240w6pp54nhq"))
+	;; NOTE(Krey): Fixes linting error introduced in new rust version (https://github.com/sagiegurari/shell2batch/issues/17)
+	(patches (search-patches "shell2batch-0.4.2-lint-fix.patch"))))
+    (build-system cargo-build-system)
+    (arguments
+      ;; NOTE(Krey): This is library without binary so no need to build it
+      `(#:skip-build? #t
+	#:cargo-inputs (("rust-regex" ,rust-regex-1))))
+    (home-page "http://github.com/sagiegurari/shell2batch")
+    (synopsis "Coverts simple basic shell scripts to windows batch scripts.")
+    (description
+      "Coverts simple basic shell scripts to windows batch scripts.")
+    (license license:asl2.0)))
+
diff --git a/gnu/packages/patches/shell2batch-0.4.2-lint-fix.patch b/gnu/packages/patches/shell2batch-0.4.2-lint-fix.patch
new file mode 100644
index 0000000000..e85631ce1d
--- /dev/null
+++ b/gnu/packages/patches/shell2batch-0.4.2-lint-fix.patch
@@ -0,0 +1,22 @@
+This patch resolves the following error that was most likely introduced in new version of rust as this version of a package is from 2019 and we are building it in 2021:
+
+error: unnecessary parentheses around type
+   --> src/converter.rs:108:61
+    |
+108 | fn add_arguments(arguments: &str, additional_arguments: Vec<(String)>, pre: bool) -> String {
+    |                                                             ^^^^^^^^ help: remove these parentheses
+
+diff --git a/src/converter.rs b/src/converter.rs
+index fc87d68..af309d2 100644
+--- a/src/converter.rs
++++ b/src/converter.rs
+@@ -105,7 +105,7 @@ fn replace_vars(arguments: &str) -> String {
+     updated_arguments
+ }
+ 
+-fn add_arguments(arguments: &str, additional_arguments: Vec<(String)>, pre: bool) -> String {
++fn add_arguments(arguments: &str, additional_arguments: Vec<String>, pre: bool) -> String {
+     let mut windows_arguments = if pre {
+         "".to_string()
+     } else {
+
-- 
2.33.1


[-- Attachment #1.3: publickey - kreyren@rixotstudio.cz - 0x1677DB82.asc --]
[-- Type: application/pgp-keys, Size: 737 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

      parent reply	other threads:[~2021-11-18 19:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-18 11:41 [bug#51944] [PATCH] Shell2Batch: New Package Jacob Hrbek
2021-11-18 11:48 ` [bug#51944] Build log Jacob Hrbek
2021-11-18 19:04 ` [bug#51944] New patch on roptat's request Jacob Hrbek
2021-11-18 19:32 ` [bug#51944] [PATCH] Shell2Batch: New Package david larsson
2021-11-18 19:39   ` Jacob Hrbek
2021-11-18 21:51     ` david larsson
2021-11-18 22:46     ` bug#51944: " Julien Lepiller
2021-11-18 19:34 ` Jacob Hrbek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='SGCRRa3Qi2WGss-8sFd7jAIf5OwBZfd8rI63omR-faEyXbxAGNLEwYN95fQnJQkt5ynT0EHgjvU-bYzP3LBtKEtTIGe95-NbDqVcx2F2y9Y=@rixotstudio.cz' \
    --to=kreyren@rixotstudio.cz \
    --cc=51944@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).