GNU bug report logs - #72482
[PATCH 0/3] Add shfmt.

Previous Next

Package: guix-patches;

Reported by: Brian Kubisiak <brian <at> kubisiak.com>

Date: Mon, 5 Aug 2024 22:58:01 UTC

Severity: normal

Tags: patch

Done: Sharlatan Hellseher <sharlatanus <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 72482 in the body.
You can then email your comments to 72482 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#72482; Package guix-patches. (Mon, 05 Aug 2024 22:58:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Brian Kubisiak <brian <at> kubisiak.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 05 Aug 2024 22:58:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Brian Kubisiak <brian <at> kubisiak.com>
To: guix-patches <at> gnu.org
Subject: [PATCH 0/3] Add shfmt.
Date: Mon, 5 Aug 2024 14:56:29 -0700
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





Information forwarded to guix-patches <at> gnu.org:
bug#72482; Package guix-patches. (Mon, 05 Aug 2024 23:06:02 GMT) Full text and rfc822 format available.

Message #8 received at 72482 <at> debbugs.gnu.org (full text, mbox):

From: Brian Kubisiak <brian <at> kubisiak.com>
To: 72482 <at> debbugs.gnu.org
Subject: [PATCH 1/3] gnu: Add go-github-com-google-renameio-v2.
Date: Mon, 5 Aug 2024 16:04:58 -0700
* 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





Information forwarded to guix-patches <at> gnu.org:
bug#72482; Package guix-patches. (Mon, 05 Aug 2024 23:06:02 GMT) Full text and rfc822 format available.

Message #11 received at 72482 <at> debbugs.gnu.org (full text, mbox):

From: Brian Kubisiak <brian <at> kubisiak.com>
To: 72482 <at> debbugs.gnu.org
Subject: [PATCH 2/3] gnu: Add go-mvdan-cc-editorconfig.
Date: Mon, 5 Aug 2024 16:05:17 -0700
* 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





Information forwarded to guix-patches <at> gnu.org:
bug#72482; Package guix-patches. (Mon, 05 Aug 2024 23:07:02 GMT) Full text and rfc822 format available.

Message #14 received at 72482 <at> debbugs.gnu.org (full text, mbox):

From: Brian Kubisiak <brian <at> kubisiak.com>
To: 72482 <at> debbugs.gnu.org
Subject: [PATCH 3/3] gnu: Add shfmt.
Date: Mon, 5 Aug 2024 16:05:37 -0700
* 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





Reply sent to Sharlatan Hellseher <sharlatanus <at> gmail.com>:
You have taken responsibility. (Fri, 23 Aug 2024 17:44:02 GMT) Full text and rfc822 format available.

Notification sent to Brian Kubisiak <brian <at> kubisiak.com>:
bug acknowledged by developer. (Fri, 23 Aug 2024 17:44:02 GMT) Full text and rfc822 format available.

Message #19 received at 72482-done <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 72482-done <at> debbugs.gnu.org
Subject: [PATCH 0/3] Add shfmt.
Date: Fri, 23 Aug 2024 18:42:00 +0100
[Message part 1 (text/plain, inline)]
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
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 21 Sep 2024 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 328 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.