nixpkgs/pkgs/development/tools/goimports-reviser/default.nix
2023-08-26 14:03:15 +00:00

46 lines
968 B
Nix

{ lib
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "goimports-reviser";
version = "3.4.1";
src = fetchFromGitHub {
owner = "incu6us";
repo = "goimports-reviser";
rev = "v${version}";
hash = "sha256-aQVjnJ//fV3i6blGKb05C2Sw1Bum9b4/o00q6krFtVI=";
};
vendorHash = "sha256-lyV4HlpzzxYC6OZPGVdNVL2mvTFE9yHO37zZdB/ePBg=";
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 ];
};
}