2024-01-02 11:29:13 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, nix-update-script
|
|
|
|
, testers
|
|
|
|
, gofumpt
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "gofumpt";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "0.5.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mvdan";
|
|
|
|
repo = pname;
|
2021-01-15 22:18:51 +00:00
|
|
|
rev = "v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-3buGLgxAaAIwLXWLpX+K7VRx47DuvUI4W8vw4TuXSts=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
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 = testers.testVersion {
|
|
|
|
package = gofumpt;
|
|
|
|
version = "v${version}";
|
|
|
|
};
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A stricter gofmt";
|
|
|
|
homepage = "https://github.com/mvdan/gofumpt";
|
2024-01-02 11:29:13 +00:00
|
|
|
changelog = "https://github.com/mvdan/gofumpt/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
2024-01-02 11:29:13 +00:00
|
|
|
maintainers = with maintainers; [ rvolosatovs katexochen ];
|
2023-08-10 07:59:29 +00:00
|
|
|
mainProgram = "gofumpt";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2020-08-20 17:08:02 +00:00
|
|
|
}
|