From 4b208b92d8df85004e8c61434a423d8d8e9923b4 Mon Sep 17 00:00:00 2001 From: Herman Rimm Date: Tue, 3 Dec 2024 14:14:56 +0100 Subject: [PATCH] gnu: Add go-gopkg-in-dnaeon-go-vcr-v3. * gnu/packages/golang-check.scm (go-gopkg-in-dnaeon-go-vcr-v3-recorder): New variable. Signed-off-by: Sharlatan Hellseher Change-Id: I5bff0cc6ea8f2c54fa6310a5fcb92e6688dfff73 --- gnu/packages/golang-check.scm | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/gnu/packages/golang-check.scm b/gnu/packages/golang-check.scm index 5d81e9a3813c906a5d2ec11e1b355fcb50cb0246..879f89f4e1c8e43201db4edba7907f7e910d9c42 100644 --- a/gnu/packages/golang-check.scm +++ b/gnu/packages/golang-check.scm @@ -1345,6 +1345,46 @@ reformat the source code, it only prints out style mistakes.") (description "This package provides a test library for the Go language.") (license license:bsd-2))) +(define-public go-gopkg-in-dnaeon-go-vcr-v3 + (package + (name "go-gopkg-in-dnaeon-go-vcr-v3") + (version "3.2.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://gopkg.in/dnaeon/go-vcr.v3") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1nij7rjbnrbsgjlm7fwpg298qffrgi2ic3wb51vqzxl6s9qkbzrq")) + (snippet + #~(begin (use-modules (guix build utils)) + (delete-file-recursively "vendor"))))) + (build-system go-build-system) + (arguments + (list + #:import-path "gopkg.in/dnaeon/go-vcr.v3" + #: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" "./...")))))))) + (propagated-inputs + (list go-gopkg-in-yaml-v3)) + (home-page "https://gopkg.in/dnaeon/go-vcr.v3") + (synopsis "Record and replay your HTTP interactions") + (description + "@@code{go-vcr} simplifies testing by recording your HTTP interactions +and replaying them in future runs in order to provide fast, deterministic and +accurate testing of your code.") + (license license:bsd-2))) + (define-public go-gopkg-in-go-playground-assert-v1 (package (name "go-gopkg-in-go-playground-assert-v1")