2025-08-10 07:54:08 +00:00

48 lines
1.1 KiB
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
testers,
}:
buildGoModule (finalAttrs: {
pname = "vacuum-go";
version = "0.17.8";
src = fetchFromGitHub {
owner = "daveshanley";
repo = "vacuum";
# using refs/tags because simple version gives: 'the given path has multiple possibilities' error
tag = "v${finalAttrs.version}";
hash = "sha256-Vrvb4xLY7vxTaAlaPScBKmLfOgOzxGHpt4GJu8DnwUg=";
};
vendorHash = "sha256-IOlJHVzmBR4Re3VxAwLjpws3DTJSzG8JBya6L3WTeoQ=";
env.CGO_ENABLED = 0;
ldflags = [
"-s"
"-w"
"-X main.version=v${finalAttrs.version}"
];
subPackages = [ "./vacuum.go" ];
passthru = {
tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
command = "vacuum version";
version = "v${finalAttrs.version}";
};
};
meta = {
description = "World's fastest OpenAPI & Swagger linter";
homepage = "https://quobix.com/vacuum";
changelog = "https://github.com/daveshanley/vacuum/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
mainProgram = "vacuum";
maintainers = with lib.maintainers; [ konradmalik ];
};
})