mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 05:39:41 -05:00
gnu: govulncheck: Swap inheritance with go-golang-org-x-vuln.
Inheritance from source library for final binary build does simplify the maintenance and readability of the package. This changes adjust govulncheck to inherit from go-golang-org-x-vuln. * gnu/packages/golang.scm (govulncheck): Rename variable to go-golang-org-x-vuln. [arguments]: <#:import-path>: Adjust to reflect go.mod. <#:unpack-path>: Remove it. <#:install-source>: Remove it. [native-inputs]: Remove coreutils-minimal. (go-golang-org-x-vuln): Rename variable to govulncheck. [arguments]: <#:import-path>: Adjust it to reflect go.mod cmd/ path. <#:unpack-path>: Add it. <#:install-source>: Add it. [native-inputs]: Add coreutils-minimal. Change-Id: Id78faf00f2b992d36df0c6e2caa72cbacf607aac
This commit is contained in:
parent
33edddb2ca
commit
5e1b47b8ad
1 changed files with 25 additions and 18 deletions
|
@ -3154,9 +3154,9 @@ (define-public go-github-com-tj-docopt
|
||||||
(home-page "https://github.com/tj/docopt")
|
(home-page "https://github.com/tj/docopt")
|
||||||
(license license:expat)))
|
(license license:expat)))
|
||||||
|
|
||||||
(define-public govulncheck
|
(define-public go-golang-org-x-vuln
|
||||||
(package
|
(package
|
||||||
(name "govulncheck")
|
(name "go-golang-org-x-vuln")
|
||||||
;; XXX: Newer version of govulncheck requires golang.org/x/telemetry,
|
;; XXX: Newer version of govulncheck requires golang.org/x/telemetry,
|
||||||
;; which needs to be discussed if it may be included in Guix.
|
;; which needs to be discussed if it may be included in Guix.
|
||||||
(version "0.0.0-20230110180137-6ad3e3d07815")
|
(version "0.0.0-20230110180137-6ad3e3d07815")
|
||||||
|
@ -3173,11 +3173,19 @@ (define-public govulncheck
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
#:tests? #f ; it tires to download modules from the network
|
#:tests? #f ; it tires to download modules from the network
|
||||||
#:install-source? #f
|
#:import-path "golang.org/x/vuln"
|
||||||
#:import-path "golang.org/x/vuln/cmd/govulncheck"
|
#:phases
|
||||||
#:unpack-path "golang.org/x/vuln"))
|
#~(modify-phases %standard-phases
|
||||||
(native-inputs
|
;; XXX: Workaround for go-build-system's lack of Go modules support.
|
||||||
(list coreutils-minimal))
|
(delete 'build)
|
||||||
|
(replace 'check
|
||||||
|
(lambda* (#:key tests? import-path #:allow-other-keys)
|
||||||
|
(when tests?
|
||||||
|
(with-directory-excursion (string-append "src/" import-path)
|
||||||
|
(invoke "go" "test" "-v"
|
||||||
|
"./doc/..."
|
||||||
|
"./internal/..."
|
||||||
|
"./scan/..."))))))))
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
(list go-github-com-google-go-cmdtest
|
(list go-github-com-google-go-cmdtest
|
||||||
go-github-com-google-go-cmp-cmp
|
go-github-com-google-go-cmp-cmp
|
||||||
|
@ -3192,19 +3200,18 @@ (define-public govulncheck
|
||||||
the @url{https://vuln.go.dev,Go Vulnerability Database}.")
|
the @url{https://vuln.go.dev,Go Vulnerability Database}.")
|
||||||
(license license:bsd-3)))
|
(license license:bsd-3)))
|
||||||
|
|
||||||
(define-public go-golang-org-x-vuln
|
(define-public govulncheck
|
||||||
(package
|
(package
|
||||||
(inherit govulncheck)
|
(inherit go-golang-org-x-vuln)
|
||||||
(name "go-golang-org-x-vuln")
|
(name "govulncheck")
|
||||||
(arguments
|
(arguments
|
||||||
`(#:import-path "golang.org/x/vuln"
|
(list
|
||||||
#:tests? #f
|
#:tests? #f
|
||||||
#:install-source? #t
|
#:install-source? #f
|
||||||
#:phases (modify-phases %standard-phases
|
#:import-path "golang.org/x/vuln/cmd/govulncheck"
|
||||||
(delete 'build))))
|
#:unpack-path "golang.org/x/vuln"))
|
||||||
(propagated-inputs (package-inputs govulncheck))
|
(native-inputs
|
||||||
(native-inputs '())
|
(list coreutils-minimal))))
|
||||||
(inputs '())))
|
|
||||||
|
|
||||||
(define-public gopls
|
(define-public gopls
|
||||||
(package
|
(package
|
||||||
|
|
Loading…
Reference in a new issue