Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv, buildGoModule, fetchFromGitHub, lib }: 2 3buildGoModule rec { 4 pname = "moq"; 5 version = "0.3.1"; 6 7 src = fetchFromGitHub { 8 owner = "matryer"; 9 repo = "moq"; 10 rev = "v${version}"; 11 sha256 = "sha256-nareKBRPL7DVmclTqZCvImxXmHxXxbus1+U1QWCeSy0="; 12 }; 13 14 vendorHash = "sha256-lfs61YK5HmUd3/qA4o9MiWeTFhu4MTAkNH+f0iGlRe0="; 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 longDescription = '' 28 Moq is a tool that generates a struct from any interface. The struct can 29 be used in test code as a mock of the interface. 30 ''; 31 license = licenses.mit; 32 maintainers = with maintainers; [ anpryl ]; 33 }; 34}