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

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

35 lines
825 B
Nix
Raw Normal View History

2022-08-05 16:27:34 +02:00
{ stdenv, buildGoModule, fetchFromGitHub, lib }:
buildGoModule rec {
pname = "moq";
2022-11-22 19:09:38 +01:00
version = "0.3.0";
2022-08-05 16:27:34 +02:00
src = fetchFromGitHub {
owner = "matryer";
repo = "moq";
rev = "v${version}";
2022-11-22 19:09:38 +01:00
sha256 = "sha256-RdFffcj17CZdI6kL+d5fp8B8gX493k8h0EzDq8BN+SY=";
2022-08-05 16:27:34 +02:00
};
2022-11-22 19:09:38 +01:00
vendorSha256 = "sha256-lfs61YK5HmUd3/qA4o9MiWeTFhu4MTAkNH+f0iGlRe0=";
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";
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 ];
};
}