woke: init at 0.19.0

This commit is contained in:
Heitor Augusto
2025-03-05 02:18:46 -03:00
parent fbce635908
commit aea362944d
+48
View File
@@ -0,0 +1,48 @@
{
lib,
buildGoModule,
fetchFromGitHub,
versionCheckHook,
}:
buildGoModule rec {
pname = "woke";
version = "0.19.0";
src = fetchFromGitHub {
owner = "get-woke";
repo = "woke";
tag = "v${version}";
hash = "sha256-X9fhExHhOLjPfpwrYPMqTJkgQL2ruHCGEocEoU7m6fM=";
};
vendorHash = "sha256-lRUvoCiE6AkYnyOCzev1o93OhXjJjBwEpT94JTbIeE8=";
# Tests require internet access and/or fail when building with Nix
doCheck = false;
ldflags = [
"-s"
"-w"
"-X=github.com/get-woke/woke/cmd.Version=${version}"
"-X=github.com/get-woke/woke/cmd.Commit=${src.tag}"
"-X=github.com/get-woke/woke/cmd.Date=1970-01-01T00:00:00Z"
];
postInstall = "rm $out/bin/docs";
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = "${placeholder "out"}/bin/woke";
versionCheckProgramArg = [ "--version" ];
meta = {
changelog = "https://github.com/get-woke/woke/releases/tag/${src.tag}";
description = "Detect non-inclusive language in your source code";
homepage = "https://github.com/get-woke/woke";
license = lib.licenses.mit;
mainProgram = "woke";
maintainers = with lib.maintainers; [ HeitorAugustoLN ];
sourceProvenance = [ lib.sourceTypes.fromSource ];
};
}