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

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

50 lines
1.1 KiB
Nix
Raw Normal View History

{ buildGoModule
, fetchFromGitHub
, lib
, testers
, mockgen
}:
2022-04-25 20:56:49 +00:00
2020-06-22 12:50:31 +00:00
buildGoModule rec {
pname = "mockgen";
version = "0.4.0";
2022-04-25 20:56:49 +00:00
2020-06-22 12:50:31 +00:00
src = fetchFromGitHub {
owner = "uber-go";
2020-06-22 12:50:31 +00:00
repo = "mock";
rev = "v${version}";
sha256 = "sha256-3nt70xrZisK5vgQa+STZPiY4F9ITKw8PbBWcKoBn4Vc=";
2020-06-22 12:50:31 +00:00
};
vendorHash = "sha256-mcNVud2jzvlPPQEaar/eYZkP71V2Civz+R5v10+tewA=";
CGO_ENABLED = 0;
2020-06-22 12:50:31 +00:00
subPackages = [ "mockgen" ];
ldflags = [
"-X=main.version=${version}"
"-X=main.date=1970-01-01T00:00:00Z"
"-X=main.commit=unknown"
];
passthru.tests.version = testers.testVersion {
package = mockgen;
command = "mockgen -version";
version = ''
v${version}
Commit: unknown
Date: 1970-01-01T00:00:00Z
'';
};
2022-04-25 20:56:49 +00:00
2020-06-22 12:50:31 +00:00
meta = with lib; {
description = "GoMock is a mocking framework for the Go programming language";
homepage = "https://github.com/uber-go/mock";
changelog = "https://github.com/uber-go/mock/blob/v${version}/CHANGELOG.md";
2020-06-22 12:50:31 +00:00
license = licenses.asl20;
maintainers = with maintainers; [ bouk ];
mainProgram = "mockgen";
2020-06-22 12:50:31 +00:00
};
}