mirrorbits: set and check package version

This commit is contained in:
Franz Pletz 2025-05-09 18:55:50 +02:00
parent 73c3db4c42
commit 1a5ed277c2
No known key found for this signature in database
GPG key ID: EA0080A44798F201

View file

@ -1,5 +1,6 @@
{
lib,
versionCheckHook,
buildGoModule,
fetchFromGitHub,
pkg-config,
@ -36,8 +37,13 @@ buildGoModule (finalAttrs: {
ldflags = [
"-s"
"-w"
"-X github.com/etix/mirrorbits/core.VERSION=${finalAttrs.version}"
];
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "version";
meta = {
description = "Geographical download redirector for distributing files efficiently across a set of mirrors";
homepage = "https://github.com/etix/mirrorbits";