diff options
| author | Thomas Ieong <th.ieong@free.fr> | 2023-03-04 00:01:55 +0100 |
|---|---|---|
| committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-01-30 22:58:22 +0000 |
| commit | aab6ea6f41fcabd183b8cc6ad25b1fbd8ca64621 (patch) | |
| tree | 6358e4daf7974eec5f4918c9568557ef60c063f4 | |
| parent | b998d582218a9c35828f138cde9da5a2e8fdbea7 (diff) | |
gnu: Add go-github-com-matryer-try.
* gnu/packages/golang-check.scm (go-github-com-matryer-try): New variable.
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Change-Id: Ic354425938374fcd29e871a597da63a7a390cfa1
| -rw-r--r-- | gnu/packages/golang-xyz.scm | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm index 778868001d2..c58228ec444 100644 --- a/gnu/packages/golang-xyz.scm +++ b/gnu/packages/golang-xyz.scm | |||
| @@ -23,7 +23,8 @@ | |||
| 23 | #:use-module (guix git-download) | 23 | #:use-module (guix git-download) |
| 24 | #:use-module (guix packages) | 24 | #:use-module (guix packages) |
| 25 | #:use-module (guix utils) | 25 | #:use-module (guix utils) |
| 26 | #:use-module (gnu packages)) | 26 | #:use-module (gnu packages) |
| 27 | #:use-module (gnu packages golang-check)) | ||
| 27 | 28 | ||
| 28 | ;;; Commentary: | 29 | ;;; Commentary: |
| 29 | ;;; | 30 | ;;; |
| @@ -55,6 +56,40 @@ | |||
| 55 | atimes for files.") | 56 | atimes for files.") |
| 56 | (license license:expat))) | 57 | (license license:expat))) |
| 57 | 58 | ||
| 59 | (define-public go-github-com-matryer-try | ||
| 60 | (package | ||
| 61 | (name "go-github-com-matryer-try") | ||
| 62 | (version "1") | ||
| 63 | (source | ||
| 64 | (origin | ||
| 65 | (method git-fetch) | ||
| 66 | (uri (git-reference | ||
| 67 | (url "https://github.com/matryer/try") | ||
| 68 | (commit (string-append "v" version)))) | ||
| 69 | (file-name (git-file-name name version)) | ||
| 70 | (sha256 | ||
| 71 | (base32 "15f0m5ywihivnvwzcw0mh0sg27aky9rkywvxqszxka9q051qvsmy")))) | ||
| 72 | (build-system go-build-system) | ||
| 73 | (arguments | ||
| 74 | (list | ||
| 75 | #:import-path "github.com/matryer/try" | ||
| 76 | #:phases | ||
| 77 | #~(modify-phases %standard-phases | ||
| 78 | (add-after 'unpack 'fix-tests | ||
| 79 | (lambda* (#:key import-path #:allow-other-keys) | ||
| 80 | (substitute* (string-append "src/" import-path | ||
| 81 | "/try_test.go") | ||
| 82 | (("var value string") | ||
| 83 | "") | ||
| 84 | (("value, err = SomeFunction\\(\\)") | ||
| 85 | "_, err = SomeFunction()"))))))) | ||
| 86 | (native-inputs | ||
| 87 | (list go-github-com-cheekybits-is)) | ||
| 88 | (home-page "https://github.com/matryer/try") | ||
| 89 | (synopsis "Simple idiomatic retry package for Go") | ||
| 90 | (description "This package provides an idiomatic Go retry module.") | ||
| 91 | (license license:expat))) | ||
| 92 | |||
| 58 | ;;; | 93 | ;;; |
| 59 | ;;; Avoid adding new packages to the end of this file. To reduce the chances | 94 | ;;; Avoid adding new packages to the end of this file. To reduce the chances |
| 60 | ;;; of a merge conflict, place them above by existing packages with similar | 95 | ;;; of a merge conflict, place them above by existing packages with similar |
