2023-08-04 22:07:22 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "goimports-reviser";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "3.4.5";
|
2023-08-04 22:07:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "incu6us";
|
|
|
|
repo = "goimports-reviser";
|
|
|
|
rev = "v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-VsG3Y7V59tTh1XS45s3NKGwMxS/y6KbIxWbRK6bHdaw=";
|
2023-08-04 22:07:22 +00:00
|
|
|
};
|
2023-10-09 19:29:22 +00:00
|
|
|
vendorHash = "sha256-aYhUsO3Z0uue66XB+/oSVYLG9QGyVcFeZ0ngzhpBZxo=";
|
2023-08-04 22:07:22 +00:00
|
|
|
|
|
|
|
CGO_ENABLED = 0;
|
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X=main.Tag=${src.rev}"
|
|
|
|
];
|
|
|
|
|
|
|
|
checkFlags = [
|
|
|
|
"-skip=TestSourceFile_Fix_WithAliasForVersionSuffix/success_with_set_alias"
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
# unset to run all tests
|
|
|
|
unset subPackages
|
|
|
|
# unset as some tests require cgo
|
|
|
|
unset CGO_ENABLED
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Right imports sorting & code formatting tool (goimports alternative)";
|
|
|
|
homepage = "https://github.com/incu6us/goimports-reviser";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jk ];
|
|
|
|
};
|
|
|
|
}
|