0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-12 05:16:25 +03:00

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