mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
flap-alerted: init at 4.5.0
This commit is contained in:
parent
78011ee130
commit
ef322bf350
1 changed files with 62 additions and 0 deletions
62
pkgs/by-name/fl/flap-alerted/package.nix
Normal file
62
pkgs/by-name/fl/flap-alerted/package.nix
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
lib,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
versionCheckHook,
|
||||
nix-update-script,
|
||||
|
||||
# modules (https://github.com/Kioubit/FlapAlerted#module-documentation)
|
||||
withHttpApi ? true,
|
||||
withLog ? true,
|
||||
withScript ? true,
|
||||
withWebhook ? true,
|
||||
withCollector ? true,
|
||||
withHistory ? true,
|
||||
withRoaFilter ? false,
|
||||
}:
|
||||
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "flap-alerted";
|
||||
version = "4.5.0";
|
||||
__structuredAttrs = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Kioubit";
|
||||
repo = "FlapAlerted";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-D4+FLAMt/cHXCks4GQI33ymbZIHzBajpvKU6QQntofk=";
|
||||
};
|
||||
|
||||
vendorHash = null;
|
||||
|
||||
env.CGO_ENABLED = 0;
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X main.Version=v${finalAttrs.version}"
|
||||
];
|
||||
|
||||
tags =
|
||||
lib.optionals (!withHttpApi) [ "disable_mod_httpAPI" ]
|
||||
++ lib.optionals (!withLog) [ "disable_mod_log" ]
|
||||
++ lib.optionals (!withScript) [ "disable_mod_script" ]
|
||||
++ lib.optionals (!withWebhook) [ "disable_mod_webhook" ]
|
||||
++ lib.optionals (!withCollector) [ "disable_mod_collector" ]
|
||||
++ lib.optionals (!withHistory) [ "disable_mod_history" ]
|
||||
++ lib.optionals withRoaFilter [ "mod_roaFilter" ];
|
||||
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
doInstallCheck = true;
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
description = "BGP Update based flap detection & statistics";
|
||||
homepage = "https://github.com/Kioubit/FlapAlerted";
|
||||
changelog = "https://github.com/Kioubit/FlapAlerted/releases/tag/v${finalAttrs.version}";
|
||||
license = lib.licenses.agpl3Plus;
|
||||
maintainers = with lib.maintainers; [ defelo ];
|
||||
mainProgram = "FlapAlerted";
|
||||
};
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue