depot/third_party/nixpkgs/pkgs/development/tools/goimports-reviser/default.nix
Default email 23b612e36f Project import generated by Copybara.
GitOrigin-RevId: ae5c332cbb5827f6b1f02572496b141021de335f
2024-01-25 23:12:00 +09:00

45 lines
968 B
Nix

{ lib
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "goimports-reviser";
version = "3.6.3";
src = fetchFromGitHub {
owner = "incu6us";
repo = "goimports-reviser";
rev = "v${version}";
hash = "sha256-wv09/Do8D05qP289g4HMxluEf7AROaJ/au35ZSVR1DQ=";
};
vendorHash = "sha256-z+FeAXPXKi653im2X2WOP1R9gRl/x7UBnndoEXoxdwA=";
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 ];
};
}