depot/third_party/nixpkgs/pkgs/development/tools/go-mockery/default.nix
Default email 686ce24904 Project import generated by Copybara.
GitOrigin-RevId: ac1f5b72a9e95873d1de0233fddcb56f99884b37
2023-02-16 18:41:37 +01:00

34 lines
819 B
Nix

{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "go-mockery";
version = "2.20.0";
src = fetchFromGitHub {
owner = "vektra";
repo = "mockery";
rev = "v${version}";
sha256 = "sha256-lWh0aX+VuSL0w592lNqXpwHq/b2WeDyYiBzm224qnzc=";
};
preCheck = ''
substituteInPlace ./pkg/generator_test.go --replace 0.0.0-dev ${version}
'';
ldflags = [
"-s" "-w"
"-X" "github.com/vektra/mockery/v2/pkg/config.SemVer=v${version}"
];
CGO_ENABLED = false;
vendorHash = "sha256-Dl8Q6fQa7BKp06a4OT82+wHYQRN1aWZ2qK25GzhOw8A=";
meta = with lib; {
homepage = "https://github.com/vektra/mockery";
description = "A mock code autogenerator for Golang";
maintainers = with maintainers; [ fbrs ];
mainProgram = "mockery";
license = licenses.bsd3;
};
}