nixpkgs/pkgs/by-name/go/gofumpt/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

55 lines
1.1 KiB
Nix
Raw Normal View History

{
lib,
buildGoModule,
fetchFromGitHub,
nix-update-script,
testers,
gofumpt,
}:
2019-08-26 01:29:21 +01:00
buildGoModule rec {
pname = "gofumpt";
version = "0.7.0";
2019-08-26 01:29:21 +01:00
src = fetchFromGitHub {
owner = "mvdan";
repo = pname;
2021-01-13 21:17:31 +00:00
rev = "v${version}";
hash = "sha256-mJM0uKztX0OUQvynnxeKL9yft7X/Eh28ERg8SbZC5Ws=";
2019-08-26 01:29:21 +01:00
};
vendorHash = "sha256-kJysyxROvB0eMAHbvNF+VXatEicn4ln2Vqkzp7GDWAQ=";
2023-12-14 14:05:23 +00:00
CGO_ENABLED = "0";
ldflags = [
"-s"
"-X main.version=v${version}"
];
2023-12-14 14:05:23 +00:00
checkFlags = [
# Requires network access (Error: module lookup disabled by GOPROXY=off).
"-skip=^TestScript/diagnose$"
];
2019-08-26 01:29:21 +01:00
passthru = {
updateScript = nix-update-script { };
tests.version = testers.testVersion {
package = gofumpt;
version = "v${version}";
};
};
2019-08-26 01:29:21 +01:00
meta = with lib; {
description = "Stricter gofmt";
homepage = "https://github.com/mvdan/gofumpt";
changelog = "https://github.com/mvdan/gofumpt/releases/tag/v${version}";
2019-08-26 01:29:21 +01:00
license = licenses.bsd3;
maintainers = with maintainers; [
rvolosatovs
katexochen
];
2023-08-07 16:08:52 +01:00
mainProgram = "gofumpt";
2019-08-26 01:29:21 +01:00
};
}