nixpkgs/pkgs/development/tools/moq/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
848 B
Nix
Raw Permalink Normal View History

2022-08-05 16:27:34 +02:00
{ stdenv, buildGoModule, fetchFromGitHub, lib }:
buildGoModule rec {
pname = "moq";
2024-02-12 05:07:43 +01:00
version = "0.3.4";
2022-08-05 16:27:34 +02:00
src = fetchFromGitHub {
owner = "matryer";
repo = "moq";
rev = "v${version}";
2024-02-12 05:07:43 +01:00
sha256 = "sha256-HJAfTTmsVIz/2gZxl5Sw+OMh6I6bjpZGd1afIjBWtXo=";
2022-08-05 16:27:34 +02:00
};
2024-02-12 05:07:43 +01:00
vendorHash = "sha256-2C5p2JTTCADGRsf0BMuxpQXk+25Q1YI25SSVE/5uZ1A=";
2022-08-05 16:27:34 +02: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";
mainProgram = "moq";
2022-08-05 16:27:34 +02: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 ];
};
}