diff options
author | Mario Rodas <marsam@users.noreply.github.com> | 2023-08-03 08:14:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-03 08:14:15 -0500 |
commit | 7c3cd3a9631b14e10e40fd492c021150e629a603 (patch) | |
tree | ea355a08900be4127625046e1100501c68211f78 /pkgs/development | |
parent | 5c301987d4fa9a593e4f23caecfdc54dc8f474b6 (diff) | |
parent | e2d13e9af2544d19fa4ee9d1507ac221260cd5cc (diff) |
Merge pull request #246791 from 06kellyjac/goimports-reviser
goimports-reviser: init at 3.3.1
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/tools/goimports-reviser/default.nix | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/development/tools/goimports-reviser/default.nix b/pkgs/development/tools/goimports-reviser/default.nix new file mode 100644 index 0000000000000..2d36c207fdbeb --- /dev/null +++ b/pkgs/development/tools/goimports-reviser/default.nix @@ -0,0 +1,45 @@ +{ lib +, buildGoModule +, fetchFromGitHub +}: + +buildGoModule rec { + pname = "goimports-reviser"; + version = "3.3.1"; + + src = fetchFromGitHub { + owner = "incu6us"; + repo = "goimports-reviser"; + rev = "v${version}"; + hash = "sha256-JIXBC7fk/Bd3tTHiK+qtB+5CdAATaB/j1nvKOJrz4n4="; + }; + 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 ]; + }; +} |