diff options
author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-07-12 15:03:34 +0100 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-07-15 12:17:50 +0100 |
commit | e0ca0978c8ffdb9e8954a82d7a18945bd359e823 (patch) | |
tree | 2e77cc88c4bd23233f89c58724844b3aedd29a49 | |
parent | 3fde511b7a2c44d1a40afeb3420a678f37e1c5be (diff) | |
download | guix-e0ca0978c8ffdb9e8954a82d7a18945bd359e823.tar.gz guix-e0ca0978c8ffdb9e8954a82d7a18945bd359e823.zip |
gnu: go-golang-org-x-text: Enable tests.
* gnu/packages/golang-build.scm (go-golang-org-x-text): Enable tests.
[source]: Adjust FILE-NAME.
[arguments]: <#:phases>: Use custom 'check phase.
[description]: Place on a new line.
Change-Id: I1f72a418d60c92c3663bcc6603e705f8a715370a
-rw-r--r-- | gnu/packages/golang-build.scm | 41 |
1 files changed, 32 insertions, 9 deletions
diff --git a/gnu/packages/golang-build.scm b/gnu/packages/golang-build.scm index a0f7008bd0..487dc00ccb 100644 --- a/gnu/packages/golang-build.scm +++ b/gnu/packages/golang-build.scm @@ -491,21 +491,44 @@ terminals, as commonly found on Unix systems.") (uri (git-reference (url "https://go.googlesource.com/text") (commit (string-append "v" version)))) - (file-name (string-append "go.googlesource.com-text-" - version "-checkout")) + (file-name (git-file-name name version)) (sha256 (base32 "0pmn0i1xbpwvzl4cdgmjqcsk9vckhqrq6699fnr9mkglh4xj3p7a")))) (build-system go-build-system) (arguments - `(#:import-path "golang.org/x/text" - ;; Source-only package - #:tests? #f - #:phases - (modify-phases %standard-phases - (delete 'build)))) + (list + #:import-path "golang.org/x/text" + #:phases + #~(modify-phases %standard-phases + ;; 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" + "./cases/..." + ;; cmd - cycle with go-golang-org-x-tools + "./collate/..." + "./currency/..." + "./date/..." + "./encoding/..." + "./feature/..." + "./internal/..." + "./language/..." + ;; message - cycle with go-golang-org-x-tools + "./number/..." + "./runes/..." + "./search/..." + "./secure/..." + "./transform/..." + "./unicode/..." + "./width/...")))))))) (home-page "https://go.googlesource.com/text") (synopsis "Supplemental Go text processing libraries") - (description "This package provides supplemental Go libraries for text + (description + "This package provides supplemental Go libraries for text processing.") (license license:bsd-3))) |