mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: go-mvdan-cc-gofumpt: Move to golang-xyz.
* gnu/packages/golang.scm (go-mvdan-cc-gofumpt): Move from here ... * gnu/packages/golang-xyz.scm: ... to here. Change-Id: I8be3ad98190babe01838b66c96da27d6a826cfb9
This commit is contained in:
parent
132c403ceb
commit
8862b6878b
2 changed files with 71 additions and 70 deletions
|
@ -16023,6 +16023,63 @@ recognizers) at run time.")
|
|||
defined in @url{https://editorconfig.org/,https://editorconfig.org/}.")
|
||||
(license license:bsd-3)))
|
||||
|
||||
(define-public go-mvdan-cc-gofumpt
|
||||
(package
|
||||
(name "go-mvdan-cc-gofumpt")
|
||||
(version "0.7.0")
|
||||
(source
|
||||
(origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/mvdan/gofumpt")
|
||||
(commit (string-append "v" version))))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32 "0sz58av4jg0q26y1s4pznnvrzp1gi8brz9zw8aa46pzdmjw394wq"))))
|
||||
(build-system go-build-system)
|
||||
(arguments
|
||||
(list
|
||||
#:go go-1.22
|
||||
#:build-flags
|
||||
;; Gofumpt formats Go files, and therefore modifies them. To help the
|
||||
;; developers diagnose issues, it replaces any occurrence of a
|
||||
;; `//gofumpt:diagnose` comment with some debugging information which
|
||||
;; includes the module version.
|
||||
#~(list (format #f "-ldflags=-X ~s"
|
||||
(string-append "main.version=" #$version " (GNU Guix)")))
|
||||
#:import-path "mvdan.cc/gofumpt"
|
||||
#:skip-build? #t
|
||||
#:test-flags #~(list "-skip" "TestScript/diagnose")
|
||||
#:phases
|
||||
#~(modify-phases %standard-phases
|
||||
(add-after 'unpack 'set-fallback-version
|
||||
;; In the event gofumpt was built without module support, it falls
|
||||
;; back to a string "(devel)". Since our build system does not yet
|
||||
;; support modules, we'll inject our version string instead, since
|
||||
;; this is more helpful.
|
||||
(lambda* (#:key import-path #:allow-other-keys)
|
||||
(with-directory-excursion (string-append "src/" import-path)
|
||||
(substitute* "internal/version/version.go"
|
||||
(("^const fallbackVersion.+")
|
||||
(format #f "const fallbackVersion = ~s~%"
|
||||
(string-append #$version " (GNU Guix)"))))))))))
|
||||
(native-inputs
|
||||
(list go-github-com-go-quicktest-qt))
|
||||
(propagated-inputs
|
||||
(list go-github-com-google-go-cmp
|
||||
go-github-com-rogpeppe-go-internal
|
||||
go-golang-org-x-mod
|
||||
go-golang-org-x-sync
|
||||
go-golang-org-x-sys
|
||||
go-golang-org-x-tools))
|
||||
(home-page "https://mvdan.cc/gofumpt/")
|
||||
(synopsis "Formats Go files with a stricter ruleset than gofmt")
|
||||
(description
|
||||
"Enforce a stricter format than @code{gofmt}, while being backwards
|
||||
compatible. That is, @code{gofumpt} is happy with a subset of the formats
|
||||
that @code{gofmt} is happy with.")
|
||||
(license license:bsd-3)))
|
||||
|
||||
(define-public go-mvdan-cc-sh-v3
|
||||
(package
|
||||
(name "go-mvdan-cc-sh-v3")
|
||||
|
@ -16716,6 +16773,20 @@ tool."))))
|
|||
" This package provides an command line interface (CLI)
|
||||
tool."))))
|
||||
|
||||
(define-public gofumpt
|
||||
(package
|
||||
(inherit go-mvdan-cc-gofumpt)
|
||||
(name "gofumpt")
|
||||
(arguments
|
||||
(substitute-keyword-arguments
|
||||
(package-arguments go-mvdan-cc-gofumpt)
|
||||
((#:tests? _ #t) #f)
|
||||
((#:install-source? _ #t) #f)
|
||||
((#:skip-build? _ #t) #f)))
|
||||
(native-inputs (package-propagated-inputs go-mvdan-cc-gofumpt))
|
||||
(propagated-inputs '())
|
||||
(inputs '())))
|
||||
|
||||
(define-public misspell
|
||||
(package
|
||||
(inherit go-github-com-client9-misspell)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue