2021-03-09 03:18:52 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "go-mockery";
|
2023-03-04 12:14:45 +00:00
|
|
|
version = "2.20.2";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vektra";
|
|
|
|
repo = "mockery";
|
|
|
|
rev = "v${version}";
|
2023-03-04 12:14:45 +00:00
|
|
|
sha256 = "sha256-MIEVAEjXM3QNz3PnjB/g5Ury+N9NJhxtcXF+SLAvqR4=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
preCheck = ''
|
|
|
|
substituteInPlace ./pkg/generator_test.go --replace 0.0.0-dev ${version}
|
|
|
|
'';
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s" "-w"
|
|
|
|
"-X" "github.com/vektra/mockery/v2/pkg/config.SemVer=v${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
CGO_ENABLED = false;
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
vendorHash = "sha256-3lx3wHnPQ/slRXnlVAnI1ZqSykDXNivjwg1WUITGj64=";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/vektra/mockery";
|
|
|
|
description = "A mock code autogenerator for Golang";
|
|
|
|
maintainers = with maintainers; [ fbrs ];
|
2022-04-27 09:35:20 +00:00
|
|
|
mainProgram = "mockery";
|
2021-03-09 03:18:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|