guix_mirror_bot pushed a commit to branch go-team
in repository guix.
commit 92ea959cccf15490effa86c16f7adc341d0f34b3
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Tue Feb 10 22:28:03 2026 +0000
gnu: Add go-tools.
* gnu/packages/golang-build.scm (go-tools): New variable.
Change-Id: I2188eca052ee8b93e6bfc16e3fbad6e64d589a56
---
gnu/packages/golang-build.scm | 73 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 73 insertions(+)
diff --git a/gnu/packages/golang-build.scm b/gnu/packages/golang-build.scm
index 4215b65162..b0f956b15c 100644
--- a/gnu/packages/golang-build.scm
+++ b/gnu/packages/golang-build.scm
@@ -1767,6 +1767,79 @@ improved and cleaner API.")
;;; Executables:
;;;
+(define-public go-tools
+ (package/inherit go-golang-org-x-tools
+ (name "go-tools")
+ (arguments
+ (list
+ #:tests? #f
+ #:install-source? #f
+ #:import-path "golang.org/x/tools"
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'build
+ (lambda* (#:key import-path #:allow-other-keys #:rest arguments)
+ (for-each
+ (lambda (cmd)
+ (apply (assoc-ref %standard-phases 'build)
+ `(,@arguments #:import-path
+ ,(string-append import-path "/cmd/" cmd))))
+ (list "bisect" "bundle" "callgraph"
+ "compilebench" "deadcode" "digraph" "eg" "file2fuzz"
+ "fiximports" "go-contrib-init" "godex" "goimports"
+ "gomvpkg" "gonew" "goyacc" "html2article"
+ "present" "present2md" "signature-fuzzer/fuzz-driver"
+ "signature-fuzzer/fuzz-runner" "splitdwarf" "ssadump"
+ "stress" "stringer" "toolstash")))))))
+ (native-inputs
+ (package-propagated-inputs go-golang-org-x-tools))
+ (propagated-inputs '())
+ (inputs '())
+ (description
+ "This package provides a collection Go CLI tools to cover common
+development needs.
+
+@itemize
+@item bisect - fnds changes responsible for causing a failure.
+@item bundle - creates a single-source-file version of a source package
+suitable for inclusion in a particular target package
+@item callgraph - a tool for reporting the call graph of a Go program.
+@item compilebench - benchmarks the speed of the Go compiler
+@item deadcode - reports unreachable functions in Go programs
+@item digraph - performs queries over unlabelled directed graphs represented
+in text form
+@item eg - performs example-based refactoring
+@item file2fuzz - converts binary files, such as those used by go-fuzz, to the
+Go fuzzing corpus format
+@item fiximports - fixes import declarations to use the canonical import path
+for packages that have an \"import comment\" as defined by
+https://golang.org/s/go14customimport
+@item fuzz-driver - emits function-signature test code
+@item fuzz-runner - performs test runs using \"fuzz-driver\"
+@item go-contrib-init - helps new Go contributors get their development
+environment set up for the Go contribution process
+@item godex - prints (dumps) exported information of packages or selected
+package objects
+@item goimports - updates Go import lines, adding missing ones and removing
+unreferenced ones
+@item gomvpkg - moves go packages, updating import declarations
+@item gonew - starts a new Go module by copying a template module
+@item goyacc - version of yacc for Go
+@item html2article - takes an HTML file and outputs a corresponding article
+file in present format
+@item present - displays slide presentations and articles
+@item present2md - converts legacy-syntax present files to Markdown-syntax
+present files
+@item splitdwarf - uncompresses and copies the DWARF segment of a Mach-O
+executable into the \"dSYM\" file
+@item ssadump - displays and interprets the SSA form of Go programs
+@item stress - catches sporadic failures
+@item stringer - automates the creation of methods that satisfy the
+@code{fmt.Stringer} interface
+@item toolstash - provides a way to save, run, and restore a known good copy of
+the Go toolchain and to compare the object files generated by two toolchains
+@end itemize")))
+
(define-public govulncheck
(package
(inherit go-golang-org-x-vuln)