2023-08-04 22:07:22 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "goimports-reviser";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "3.6.5";
|
2023-08-04 22:07:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "incu6us";
|
|
|
|
repo = "goimports-reviser";
|
|
|
|
rev = "v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-46s6A1sGqoJR3XihaCkVCxTpManl330mMcJ8hv66zDc=";
|
2023-08-04 22:07:22 +00:00
|
|
|
};
|
2024-01-13 08:15:51 +00:00
|
|
|
vendorHash = "sha256-z+FeAXPXKi653im2X2WOP1R9gRl/x7UBnndoEXoxdwA=";
|
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)";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "goimports-reviser";
|
2023-08-04 22:07:22 +00:00
|
|
|
homepage = "https://github.com/incu6us/goimports-reviser";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jk ];
|
|
|
|
};
|
|
|
|
}
|