1{ buildGoModule, fetchFromGitHub, lib }:
2
3buildGoModule rec {
4 pname = "moq";
5 version = "0.3.4";
6
7 src = fetchFromGitHub {
8 owner = "matryer";
9 repo = "moq";
10 rev = "v${version}";
11 sha256 = "sha256-HJAfTTmsVIz/2gZxl5Sw+OMh6I6bjpZGd1afIjBWtXo=";
12 };
13
14 vendorHash = "sha256-2C5p2JTTCADGRsf0BMuxpQXk+25Q1YI25SSVE/5uZ1A=";
15
16 subPackages = [ "." ];
17
18 ldflags = [
19 "-s"
20 "-w"
21 "-X main.Version=${version}"
22 ];
23
24 meta = with lib; {
25 homepage = "https://github.com/matryer/moq";
26 description = "Interface mocking tool for go generate";
27 mainProgram = "moq";
28 longDescription = ''
29 Moq is a tool that generates a struct from any interface. The struct can
30 be used in test code as a mock of the interface.
31 '';
32 license = licenses.mit;
33 maintainers = with maintainers; [ anpryl ];
34 };
35}