[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: gnu: Add shell2batch.
From: |
guix-commits |
Subject: |
branch master updated: gnu: Add shell2batch. |
Date: |
Thu, 18 Nov 2021 17:36:04 -0500 |
This is an automated email from the git hooks/post-receive script.
roptat pushed a commit to branch master
in repository guix.
The following commit(s) were added to refs/heads/master by this push:
new 92d6f17 gnu: Add shell2batch.
92d6f17 is described below
commit 92d6f17dfd449208a657a1a54e3a287ae22d1da8
Author: Jacob Hrbek <kreyren@rixotstudio.cz>
AuthorDate: Thu Nov 18 20:37:52 2021 +0100
gnu: Add shell2batch.
* gnu/packages/crates-io.scm (shell2batch): New variable.
* gnu/packages/patches/rust-shell2batch-lint-fix.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
Signed-off-by: Julien Lepiller <julien@lepiller.eu>
---
gnu/local.mk | 1 +
gnu/packages/crates-io.scm | 25 ++++++++++++++++++++++
.../patches/rust-shell2batch-lint-fix.patch | 25 ++++++++++++++++++++++
3 files changed, 51 insertions(+)
diff --git a/gnu/local.mk b/gnu/local.mk
index 6aada73..7cc06c8 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1744,6 +1744,7 @@ dist_patch_DATA =
\
%D%/packages/patches/rust-nettle-sys-disable-vendor.patch \
%D%/packages/patches/rust-reproducible-builds.patch \
%D%/packages/patches/rust-openssl-sys-no-vendor.patch \
+ %D%/packages/patches/rust-shell2batch-lint-fix.patch \
%D%/packages/patches/sbc-fix-build-non-x86.patch \
%D%/packages/patches/sbcl-burgled-batteries3-fix-signals.patch \
%D%/packages/patches/sbcl-clml-fix-types.patch \
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 148e8cb..7d5833f 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,27 @@ variant of this library is available separately as
@code{im}.")
(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"))
+ ;; https://github.com/sagiegurari/shell2batch/issues/17
+ (patches (search-patches "rust-shell2batch-lint-fix.patch"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:skip-build? #t
+ #:cargo-inputs (("rust-regex" ,rust-regex-1))))
+ (home-page "https://github.com/sagiegurari/shell2batch")
+ (synopsis "Basic shell scripts to windows batch scripts conversion")
+ (description "While it is not really possible to take every shell script
+and automatically convert it to a windows batch file, this library provides a
+way to convert simple shell commands to windows batch commands.")
+ (license license:asl2.0)))
diff --git a/gnu/packages/patches/rust-shell2batch-lint-fix.patch
b/gnu/packages/patches/rust-shell2batch-lint-fix.patch
new file mode 100644
index 0000000..7c160b6
--- /dev/null
+++ b/gnu/packages/patches/rust-shell2batch-lint-fix.patch
@@ -0,0 +1,25 @@
+Resolves the following error that was most likely introduced in new version of
+rust as this package is from 2019:
+
+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
+
+Reported upstream at https://github.com/sagiegurari/shell2batch/issues/17.
+
+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 {
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: gnu: Add shell2batch.,
guix-commits <=