Files
nixpkgs/pkgs/by-name/mi/mirrorbits/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

63 lines
1.5 KiB
Nix

{
lib,
versionCheckHook,
buildGoModule,
fetchFromGitHub,
pkg-config,
zlib,
geoip,
}:
buildGoModule (finalAttrs: {
pname = "mirrorbits";
version = "0.6.1";
src = fetchFromGitHub {
owner = "etix";
repo = "mirrorbits";
tag = "v${finalAttrs.version}";
hash = "sha256-PqPE/PgIyQylbYoABC/saxLF83XjgRAS0QimragJ8P8=";
};
postPatch = ''
rm -rf vendor
'';
vendorHash = "sha256-cdD9RvOtgN/SHtgrtrucnUI+nnO/FabUyPRdvgoL44o=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [
zlib
geoip
];
subPackages = [ "." ];
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";
longDescription = ''
Mirrorbits is a geographical download redirector written in Go for
distributing files efficiently across a set of mirrors. It offers
a simple and economic way to create a Content Delivery Network
layer using a pure software stack. It is primarily designed for
the distribution of large-scale Open-Source projects with a lot
of traffic.
'';
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fpletz ];
mainProgram = "mirrorbits";
};
})