copywrite: modernize version check and use tag

Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
This commit is contained in:
Ethan Carter Edwards
2025-03-13 22:43:08 -04:00
parent bec0a0519b
commit bc45eac0f9
+4 -8
View File
@@ -4,8 +4,7 @@
buildGoModule,
fetchFromGitHub,
installShellFiles,
testers,
copywrite,
versionCheckHook,
}:
let
@@ -19,7 +18,7 @@ buildGoModule rec {
src = fetchFromGitHub {
owner = "hashicorp";
repo = "copywrite";
rev = "v${version}";
tag = "v${version}";
hash = "sha256-DmlPioaw/wMk8GoBYNG24P4J1C6h0bjVjjOuMYW6Tgo=";
};
@@ -42,11 +41,8 @@ buildGoModule rec {
installShellCompletion copywrite.{bash,zsh,fish}
'';
passthru.tests.version = testers.testVersion {
package = copywrite;
command = "copywrite --version";
version = "${version}-${shortCommitHash}";
};
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
meta = {
description = "Automate copyright headers and license files at scale";