mirrorbits: 0.5.1 -> 0.6

Diff: https://github.com/etix/mirrorbits/compare/v0.5.1...v0.6
This commit is contained in:
emaryn 2025-05-09 08:40:17 +08:00
parent 50dd5a5327
commit 73c3db4c42

View file

@ -2,34 +2,30 @@
lib, lib,
buildGoModule, buildGoModule,
fetchFromGitHub, fetchFromGitHub,
fetchpatch,
pkg-config, pkg-config,
zlib, zlib,
geoip, geoip,
}: }:
buildGoModule rec { buildGoModule (finalAttrs: {
pname = "mirrorbits"; pname = "mirrorbits";
version = "0.5.1"; version = "0.6";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "etix"; owner = "etix";
repo = "mirrorbits"; repo = "mirrorbits";
rev = "v${version}"; tag = "v${finalAttrs.version}";
hash = "sha256-Ta3+Y3P74cvx09Z4rB5ObgBZtfF4grVgyeZ57yFPlGM="; hash = "sha256-99eOfVSlGIEzNm+0gI/y0+UPd+dnZiGzaHlkqUNtO1U=";
}; };
vendorHash = null; postPatch = ''
rm -rf vendor
'';
patches = [ vendorHash = "sha256-cdD9RvOtgN/SHtgrtrucnUI+nnO/FabUyPRdvgoL44o=";
# Add Go Modules support
(fetchpatch {
url = "https://github.com/etix/mirrorbits/commit/955a8b2e1aacea1cae06396a64afbb531ceb36d4.patch";
hash = "sha256-KJgj3ynnjjiXG5qsUmzBiMjGEwfvM/9Ap+ZgUdhclik=";
})
];
nativeBuildInputs = [ pkg-config ]; nativeBuildInputs = [ pkg-config ];
buildInputs = [ buildInputs = [
zlib zlib
geoip geoip
@ -42,8 +38,8 @@ buildGoModule rec {
"-w" "-w"
]; ];
meta = with lib; { 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";
longDescription = '' longDescription = ''
Mirrorbits is a geographical download redirector written in Go for Mirrorbits is a geographical download redirector written in Go for
@ -53,8 +49,8 @@ buildGoModule rec {
the distribution of large-scale Open-Source projects with a lot the distribution of large-scale Open-Source projects with a lot
of traffic. of traffic.
''; '';
license = licenses.mit; license = lib.licenses.mit;
maintainers = with maintainers; [ fpletz ]; maintainers = with lib.maintainers; [ fpletz ];
mainProgram = "mirrorbits"; mainProgram = "mirrorbits";
}; };
} })