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