From f45ee9917f0a7d2d6e8029658208fb7e43f10876 Mon Sep 17 00:00:00 2001 From: kashw2 Date: Thu, 21 Dec 2023 20:45:56 +1000 Subject: [PATCH] goat-cli: init at 1.1.0 --- pkgs/by-name/go/goat-cli/mock-fix.patch | 12 +++++++ pkgs/by-name/go/goat-cli/package.nix | 43 +++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 pkgs/by-name/go/goat-cli/mock-fix.patch create mode 100644 pkgs/by-name/go/goat-cli/package.nix diff --git a/pkgs/by-name/go/goat-cli/mock-fix.patch b/pkgs/by-name/go/goat-cli/mock-fix.patch new file mode 100644 index 000000000000..4033e714c7db --- /dev/null +++ b/pkgs/by-name/go/goat-cli/mock-fix.patch @@ -0,0 +1,12 @@ +diff --git a/pkg/goatfile/unmarshal_test.go b/pkg/goatfile/unmarshal_test.go +index 089e89f..5b4191b 100644 +--- a/pkg/goatfile/unmarshal_test.go ++++ b/pkg/goatfile/unmarshal_test.go +@@ -8,7 +8,6 @@ import ( + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/assert" +- "github.com/studio-b12/goat/mocks" + "github.com/studio-b12/goat/pkg/set" + ) + diff --git a/pkgs/by-name/go/goat-cli/package.nix b/pkgs/by-name/go/goat-cli/package.nix new file mode 100644 index 000000000000..3c64d184b4f2 --- /dev/null +++ b/pkgs/by-name/go/goat-cli/package.nix @@ -0,0 +1,43 @@ +{ + lib, + fetchFromGitHub, + buildGoModule, + fetchpatch, +}: + +buildGoModule rec { + pname = "goat-cli"; + version = "1.1.0"; + + src = fetchFromGitHub { + repo = "goat"; + owner = "studio-b12"; + rev = "v${version}"; + hash = "sha256-H7ea3XOBfQ7bIX5SbxPd+fcSlMurSWXGXe+/LsqSc0A="; + }; + + vendorHash = "sha256-DtEXgGYSkWO876so6LEOkhVwDt/zrflDZdY4O2lz1mw="; + + ldflags = [ + "-s" + "-w" + "-X github.com/studio-b12/goat/internal/version.Version=${version}" + "-X github.com/studio-b12/goat/internal/version.CommitHash=${src.rev}" + ]; + + patches = [ + ./mock-fix.patch + ]; + + # Checks currently fail because of an issue with github.com/studio-b12/goat/mocks + doCheck = false; + + meta = { + description = "Integration testing tool for HTTP APIs using a simple script language"; + homepage = "https://studio-b12.github.io/goat/"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ kashw2 ]; + mainProgram = "goat"; + }; + +}