Merge pull request #274237 from katexochen/gofumpt/0-5-0

gofumpt: 0.3.1 -> 0.5.0, refactor
This commit is contained in:
Fabián Heredia Montiel
2023-12-15 15:46:17 +00:00
committed by GitHub
+29 -5
View File
@@ -1,23 +1,47 @@
{ lib, buildGoModule, fetchFromGitHub }:
{ lib
, buildGoModule
, fetchFromGitHub
, nix-update-script
, testVersion
, gofumpt
}:
buildGoModule rec {
pname = "gofumpt";
version = "0.3.1";
version = "0.5.0";
src = fetchFromGitHub {
owner = "mvdan";
repo = pname;
rev = "v${version}";
sha256 = "sha256-uXRYVLFDyRZ83mth8Fh+MG9fNv2lUfE3BTljM9v9rjI=";
hash = "sha256-3buGLgxAaAIwLXWLpX+K7VRx47DuvUI4W8vw4TuXSts=";
};
vendorHash = "sha256-Il1E1yOejLEdKRRMqelGeJbHRjx4qFymf7N98BEdFzg=";
vendorHash = "sha256-W0WKEQgOIFloWsB4E1RTICVKVlj9ChGSpo92X+bjNEk=";
CGO_ENABLED = "0";
ldflags = "-s -w -X main.version=v${version}";
checkFlags = [
# Requires network access (Error: module lookup disabled by GOPROXY=off).
"-skip=^TestScript/diagnose$"
];
passthru = {
updateScript = nix-update-script { };
tests.version = testVersion {
package = gofumpt;
version = "v${version}";
};
};
meta = with lib; {
description = "A stricter gofmt";
homepage = "https://github.com/mvdan/gofumpt";
changelog = "https://github.com/mvdan/gofumpt/releases/tag/v${version}";
license = licenses.bsd3;
maintainers = with maintainers; [ rvolosatovs ];
maintainers = with maintainers; [ rvolosatovs katexochen ];
mainProgram = "gofumpt";
};
}