Merge pull request #277625 from maxbrunet/feat/uber-go-mockgen

mockgen: change upstream to uber-go fork
This commit is contained in:
Nick Cao 2023-12-31 10:40:06 -05:00 committed by GitHub
commit df2e067678
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 9 deletions

View File

@ -128,6 +128,8 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
`globalRedirect` can now have redirect codes other than 301 through
`redirectCode`.
- The source of the `mockgen` package has changed to the [go.uber.org/mock](https://github.com/uber-go/mock) fork because [the original repository is no longer maintained](https://github.com/golang/mock#gomock).
- [](#opt-boot.kernel.sysctl._net.core.wmem_max_) changed from a string to an integer because of the addition of a custom merge option (taking the highest value defined to avoid conflicts between 2 services trying to set that value), just as [](#opt-boot.kernel.sysctl._net.core.rmem_max_) since 22.11.
- `services.zfs.zed.enableMail` now uses the global `sendmail` wrapper defined by an email module

View File

@ -1,28 +1,49 @@
{ buildGoModule, fetchFromGitHub, lib }:
{ buildGoModule
, fetchFromGitHub
, lib
, testers
, mockgen
}:
buildGoModule rec {
pname = "mockgen";
version = "1.6.0";
version = "0.4.0";
src = fetchFromGitHub {
owner = "golang";
owner = "uber-go";
repo = "mock";
rev = "v${version}";
sha256 = "sha256-5Kp7oTmd8kqUN+rzm9cLqp9nb3jZdQyltGGQDiRSWcE=";
sha256 = "sha256-3nt70xrZisK5vgQa+STZPiY4F9ITKw8PbBWcKoBn4Vc=";
};
vendorHash = "sha256-5gkrn+OxbNN8J1lbgbxM8jACtKA7t07sbfJ7gVJWpJM=";
vendorHash = "sha256-mcNVud2jzvlPPQEaar/eYZkP71V2Civz+R5v10+tewA=";
CGO_ENABLED = 0;
subPackages = [ "mockgen" ];
preCheck = ''
export GOROOT="$(go env GOROOT)"
'';
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
'';
};
meta = with lib; {
description = "GoMock is a mocking framework for the Go programming language";
homepage = "https://github.com/golang/mock";
homepage = "https://github.com/uber-go/mock";
changelog = "https://github.com/uber-go/mock/blob/v${version}/CHANGELOG.md";
license = licenses.asl20;
maintainers = with maintainers; [ bouk ];
mainProgram = "mockgen";
};
}