diff options
author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-09-15 13:10:39 +0100 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-11-09 21:33:48 +0000 |
commit | 93c943cd62bac86fc2ecb27d9a327d64f6552a3f (patch) | |
tree | 7c6ef96b75b68aa3164a78aa1123e28b3d63886a | |
parent | 2cb863f2c36a7ef3bf30488d640a5a537d9aa7cd (diff) | |
download | guix-93c943cd62bac86fc2ecb27d9a327d64f6552a3f.tar.gz guix-93c943cd62bac86fc2ecb27d9a327d64f6552a3f.zip |
gnu: Add go-github-com-golang-mock.
* gnu/packages/golang-check.scm (go-github-com-golang-mock): New variable.
Change-Id: I9ae851e7eb1e4950594387604a41af330b8b4127
-rw-r--r-- | gnu/packages/golang-check.scm | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/gnu/packages/golang-check.scm b/gnu/packages/golang-check.scm index 914b5ea59b..11a8e365f9 100644 --- a/gnu/packages/golang-check.scm +++ b/gnu/packages/golang-check.scm @@ -360,6 +360,46 @@ reflect.DeepEqual but returns a list of differences. This is helpful when comparing complex types like structures and maps.") (license license:expat))) +(define-public go-github-com-golang-mock + (package + (name "go-github-com-golang-mock") + (version "1.6.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/golang/mock") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1hara8j0x431njjhqxfrg1png7xa1gbrpwza6ya4mwlx76hppap4")))) + (build-system go-build-system) + (arguments + (list + #:import-path "github.com/golang/mock" + #: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" + ;; Network access required + "-skip" "TestFileParser|TestImportsOfFile" + "./...")))))))) + (propagated-inputs + (list go-golang-org-x-tools go-golang-org-x-mod)) + (home-page "https://github.com/golang/mock") + (synopsis "Mocking framework for Golang") + (description + "gomock is a mocking framework for the @url{http://golang.org/,Go +programming language}. It integrates well with Go's built-in @code{testing} +package, but can be used in other contexts too.") + (license license:asl2.0))) + (define-public go-github-com-golangplus-testing (package (name "go-github-com-golangplus-testing") |