* [bug#72482] [PATCH 0/3] Add shfmt.
@ 2024-08-05 21:56 Brian Kubisiak
2024-08-05 23:04 ` [bug#72482] [PATCH 1/3] gnu: Add go-github-com-google-renameio-v2 Brian Kubisiak
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Brian Kubisiak @ 2024-08-05 21:56 UTC (permalink / raw)
To: 72482
This patch series adds shfmt, which is a CLI tool for formatting bash and
POSIX sh code.
Brian Kubisiak (3):
gnu: Add go-github-com-google-renameio-v2.
gnu: Add go-mvdan-cc-editorconfig.
gnu: Add shfmt.
gnu/packages/golang.scm | 91 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 91 insertions(+)
base-commit: 8006d74ce6dbe74806d14e74e3f32e7a5c92811a
--
2.45.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [bug#72482] [PATCH 1/3] gnu: Add go-github-com-google-renameio-v2.
2024-08-05 21:56 [bug#72482] [PATCH 0/3] Add shfmt Brian Kubisiak
@ 2024-08-05 23:04 ` Brian Kubisiak
2024-08-05 23:05 ` [bug#72482] [PATCH 2/3] gnu: Add go-mvdan-cc-editorconfig Brian Kubisiak
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Brian Kubisiak @ 2024-08-05 23:04 UTC (permalink / raw)
To: 72482
* gnu/packages/golang.scm (go-github-com-google-renameio-v2): New
variable.
Change-Id: Iaeabf95d21d22b25df5f8caf1edcaaddee3d3965
---
gnu/packages/golang.scm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 1298a8c58b..46932b01ef 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -6107,6 +6107,23 @@ (define-public go-github-com-google-renameio
create or replace a file or symbolic link.")
(license license:asl2.0)))
+(define-public go-github-com-google-renameio-v2
+ (package/inherit go-github-com-google-renameio
+ (name "go-github-com-google-renameio-v2")
+ (version "2.0.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/google/renameio")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "13vc7p43zz5pmgli4k18b15khxpca1zd8v1ga0ryq7ddyz55fg7i"))))
+ (arguments
+ (list
+ #:import-path "github.com/google/renameio/v2"))))
+
(define (go-gotest-tools-source version sha256-base32-hash)
(origin
(method git-fetch)
--
2.45.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#72482] [PATCH 2/3] gnu: Add go-mvdan-cc-editorconfig.
2024-08-05 21:56 [bug#72482] [PATCH 0/3] Add shfmt Brian Kubisiak
2024-08-05 23:04 ` [bug#72482] [PATCH 1/3] gnu: Add go-github-com-google-renameio-v2 Brian Kubisiak
@ 2024-08-05 23:05 ` Brian Kubisiak
2024-08-05 23:05 ` [bug#72482] [PATCH 3/3] gnu: Add shfmt Brian Kubisiak
2024-08-23 17:42 ` bug#72482: [PATCH 0/3] " Sharlatan Hellseher
3 siblings, 0 replies; 5+ messages in thread
From: Brian Kubisiak @ 2024-08-05 23:05 UTC (permalink / raw)
To: 72482
* gnu/packages/golang.scm (go-mvdan-cc-editorconfig): New variable.
Change-Id: I4cc558e0b7be7d66ad2919eac49c355532052bb9
---
gnu/packages/golang.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 46932b01ef..63308d1af7 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -79,6 +79,7 @@ (define-module (gnu packages golang)
#:use-module (gnu packages base)
#:use-module ((gnu packages bootstrap) #:select (glibc-dynamic-linker))
#:use-module (gnu packages check)
+ #:use-module (gnu packages cmake)
#:use-module (gnu packages fonts)
#:use-module (gnu packages gcc)
#:use-module (gnu packages glib)
@@ -8013,6 +8014,31 @@ (define-public go-git-sr-ht-adnano-go-gemini
Gemini clients and servers.")
(license license:expat)))
+(define-public go-mvdan-cc-editorconfig
+ (package
+ (name "go-mvdan-cc-editorconfig")
+ (version "0.3.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mvdan/editorconfig")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0mi1cp6fyaknjn7smvaas4lj03fws5qib5vbi4mrz3qrmvmhh9l4"))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:import-path "mvdan.cc/editorconfig"))
+ (native-inputs (list cmake))
+ (home-page "https://github.com/mvdan/editorconfig")
+ (synopsis "EditorConfig support in Go")
+ (description
+ "Package editorconfig allows parsing and using @code{EditorConfig} files, as
+defined in @url{https://editorconfig.org/,https://editorconfig.org/}.")
+ (license license:bsd-3)))
+
(define-public gofumpt
(package
(name "gofumpt")
--
2.45.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#72482] [PATCH 3/3] gnu: Add shfmt.
2024-08-05 21:56 [bug#72482] [PATCH 0/3] Add shfmt Brian Kubisiak
2024-08-05 23:04 ` [bug#72482] [PATCH 1/3] gnu: Add go-github-com-google-renameio-v2 Brian Kubisiak
2024-08-05 23:05 ` [bug#72482] [PATCH 2/3] gnu: Add go-mvdan-cc-editorconfig Brian Kubisiak
@ 2024-08-05 23:05 ` Brian Kubisiak
2024-08-23 17:42 ` bug#72482: [PATCH 0/3] " Sharlatan Hellseher
3 siblings, 0 replies; 5+ messages in thread
From: Brian Kubisiak @ 2024-08-05 23:05 UTC (permalink / raw)
To: 72482
* gnu/packages/golang.scm (shfmt): New variable.
Change-Id: I7c8bcb0f0a1d0c45d5f8f2274724188a435f0cd7
---
gnu/packages/golang.scm | 48 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 63308d1af7..cf8e482bee 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -8120,6 +8120,54 @@ (define-public go-mvdan-cc-gofumpt
(native-inputs '())
(inputs '())))
+(define-public shfmt
+ (package
+ (name "shfmt")
+ (version "3.8.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mvdan/sh")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "13anc64m088plwazrx5c68m3nbnig7wxa92zqk83w83q16dx42fq"))
+ (modules '((guix build utils)))
+ (snippet #~(let ((fixed-version (string-append #$version " (GNU Guix)")))
+ ;; shfmt uses modules to look up the version at runtime;
+ ;; since our build system does not yet support modules,
+ ;; inject the version string here instead
+ (substitute* "cmd/shfmt/main.go"
+ (("version = \"\\(devel\\)\"")
+ (format #f "version = \"~a\"" fixed-version)))
+ (substitute* "cmd/shfmt/testdata/script/flags.txtar"
+ (("devel\\|v3")
+ #$version))))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:import-path "mvdan.cc/sh/v3/cmd/shfmt"
+ #:unpack-path "mvdan.cc/sh/v3"))
+ (inputs (list go-mvdan-cc-editorconfig
+ go-golang-org-x-term
+ go-golang-org-x-sys
+ go-golang-org-x-sync
+ go-github-com-rogpeppe-go-internal
+ go-github-com-pkg-diff
+ go-github-com-google-renameio-v2
+ go-github-com-google-go-cmp-cmp
+ go-github-com-frankban-quicktest
+ go-github-com-creack-pty))
+ (home-page "https://github.com/mvdan/sh")
+ (synopsis "Shell formatter with bash support")
+ (description
+ "This package provides a shell formatter. Supports
+@url{https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html,POSIX
+Shell}, @url{https://www.gnu.org/software/bash/,Bash}, and
+@url{http://www.mirbsd.org/mksh.htm,mksh}.")
+ (license license:bsd-3)))
+
(define-public unparam
(package
(name "unparam")
--
2.45.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* bug#72482: [PATCH 0/3] Add shfmt.
2024-08-05 21:56 [bug#72482] [PATCH 0/3] Add shfmt Brian Kubisiak
` (2 preceding siblings ...)
2024-08-05 23:05 ` [bug#72482] [PATCH 3/3] gnu: Add shfmt Brian Kubisiak
@ 2024-08-23 17:42 ` Sharlatan Hellseher
3 siblings, 0 replies; 5+ messages in thread
From: Sharlatan Hellseher @ 2024-08-23 17:42 UTC (permalink / raw)
To: 72482-done
[-- Attachment #1: Type: text/plain, Size: 419 bytes --]
Hi,
Thank you for the patches.
I've reviewed, applied some modifications and pushed as
aa57dc8b31..064a6e1f90 to master.
- patches [3/3]
- [X] [PATCH 1/3] gnu: Add go-github-com-google-renameio-v2.
- [X] [PATCH 2/3] gnu: Add go-mvdan-cc-editorconfig.
- Place to golang-xyz
- [X] [PATCH 3/3] gnu: Add shfmt.
- Place to shellutils
- Move snippet to the phase instead
- Refresh to 3.9.0
--
Oleg
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-08-23 17:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-05 21:56 [bug#72482] [PATCH 0/3] Add shfmt Brian Kubisiak
2024-08-05 23:04 ` [bug#72482] [PATCH 1/3] gnu: Add go-github-com-google-renameio-v2 Brian Kubisiak
2024-08-05 23:05 ` [bug#72482] [PATCH 2/3] gnu: Add go-mvdan-cc-editorconfig Brian Kubisiak
2024-08-05 23:05 ` [bug#72482] [PATCH 3/3] gnu: Add shfmt Brian Kubisiak
2024-08-23 17:42 ` bug#72482: [PATCH 0/3] " Sharlatan Hellseher
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).