mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-31 16:42:38 -05:00
gnu: go-golang-org-x-mod: Enable tests.
* gnu/packages/golang-build.scm (go-golang-org-x-mod): Apply new package style. [source]: Swap URI to <https://go.googlesource.com/mod> as for other go-golang-org-x-* packages. [arguments]: <#:phases>: Add 'remove-test-files phase. Use custom 'check phase. Change-Id: I806d0beab89047be5fbb181db4b410c1f8df0764
This commit is contained in:
parent
c332715019
commit
4798af971c
1 changed files with 24 additions and 6 deletions
|
@ -248,18 +248,36 @@ (define-public go-golang-org-x-mod
|
|||
(origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/golang/mod")
|
||||
(url "https://go.googlesource.com/mod")
|
||||
(commit (string-append "v" version))))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32 "02wilb8q2bp6qhqcrbjxq1pjy3y5k8p11pxlg481609zx4rjiszc"))))
|
||||
(build-system go-build-system)
|
||||
(arguments
|
||||
'(#:import-path "golang.org/x/mod/"
|
||||
#:tests? #f
|
||||
#:phases (modify-phases %standard-phases
|
||||
;; Source-only package
|
||||
(delete 'build))))
|
||||
(list
|
||||
#:import-path "golang.org/x/mod"
|
||||
#:phases
|
||||
#~(modify-phases %standard-phases
|
||||
(add-after 'unpack 'remove-test-files
|
||||
(lambda* (#:key import-path #:allow-other-keys)
|
||||
(with-directory-excursion (string-append "src/" import-path)
|
||||
(for-each delete-file
|
||||
(list
|
||||
;; Break cycle: go-golang-org-x-mod ->
|
||||
;; go-golang-org-x-tools -> go-golang-org-x-mod.
|
||||
"zip/zip_test.go"
|
||||
;; Trying to access
|
||||
;; <http://ct.googleapis.com/logs/argon2020/ct/v1/get-sth>.
|
||||
"sumdb/tlog/ct_test.go")))))
|
||||
;; XXX: Workaround for go-build-system's lack of Go modules
|
||||
;; support.
|
||||
(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" "./..."))))))))
|
||||
(home-page "https://golang.org/x/mod")
|
||||
(synopsis "Tools to work directly with Go module mechanics")
|
||||
(description
|
||||
|
|
Loading…
Reference in a new issue