2024-07-27 06:49:29 +00:00
|
|
|
{ buildGoModule, fetchFromGitHub, lib }:
|
2022-08-21 13:32:41 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "moq";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.4.0";
|
2022-08-21 13:32:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "matryer";
|
|
|
|
repo = "moq";
|
|
|
|
rev = "v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
sha256 = "sha256-7egB+0JLHUbPc21XBC18M4m4fPqy1Qon3N9Fwkcmico=";
|
2022-08-21 13:32:41 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
vendorHash = "sha256-Kp0mRLmOlV3UpYSQJoc54tYU78sg+RZ5qy/1ime7j7w=";
|
2022-08-21 13:32:41 +00:00
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X main.Version=${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/matryer/moq";
|
|
|
|
description = "Interface mocking tool for go generate";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "moq";
|
2022-08-21 13:32:41 +00:00
|
|
|
longDescription = ''
|
|
|
|
Moq is a tool that generates a struct from any interface. The struct can
|
|
|
|
be used in test code as a mock of the interface.
|
|
|
|
'';
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ anpryl ];
|
|
|
|
};
|
|
|
|
}
|