ddosify: 1.0.6 -> 2.6.0

This commit is contained in:
emaryn 2025-04-22 00:58:15 +08:00 committed by emaryn
parent c4170d9f2d
commit cd74b6e766

View file

@ -2,25 +2,28 @@
lib,
buildGoModule,
fetchFromGitHub,
versionCheckHook,
}:
buildGoModule rec {
buildGoModule (finalAttrs: {
pname = "ddosify";
version = "1.0.6";
version = "2.6.0";
src = fetchFromGitHub {
owner = "ddosify";
repo = "ddosify";
tag = "v${version}";
hash = "sha256-5K/qXtdlDC09dEjRwYvoh9SapGLNmvywDMiNdwZDDTQ=";
tag = "selfhosted-${finalAttrs.version}";
hash = "sha256-EPbpBCSaUVVhxGlj7gRqwHLuj5p6563iiARqkEjA6Rk=";
};
vendorHash = "sha256-Wg4JzA2aEwNBsDrkauFUb9AS38ITLBGex9QHzDcdpoM=";
sourceRoot = "${finalAttrs.src.name}/ddosify_engine";
ldflags = [
"-s"
"-w"
"-X=main.GitVersion=${version}"
"-X=main.GitVersion=${finalAttrs.version}"
"-X=main.GitCommit=unknown"
"-X=main.BuildDate=unknown"
];
@ -30,16 +33,16 @@ buildGoModule rec {
doInstallCheck = true;
installCheckPhase = ''
$out/bin/ddosify -version | grep ${version} > /dev/null
'';
nativeInstallCheckInputs = [ versionCheckHook ];
meta = with lib; {
versionCheckProgramArg = "-version";
meta = {
description = "High-performance load testing tool, written in Golang";
mainProgram = "ddosify";
homepage = "https://ddosify.com/";
changelog = "https://github.com/ddosify/ddosify/releases/tag/v${version}";
license = licenses.agpl3Plus;
maintainers = with maintainers; [ bryanasdev000 ];
changelog = "https://github.com/ddosify/ddosify/releases/tag/selfhosted-${finalAttrs.version}";
license = lib.licenses.agpl3Plus;
maintainers = with lib.maintainers; [ bryanasdev000 ];
};
}
})