45 lines
916 B
Nix
45 lines
916 B
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
openssl,
|
|
zlib,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "siege";
|
|
version = "4.1.7";
|
|
|
|
src = fetchurl {
|
|
url = "http://download.joedog.org/siege/${pname}-${version}.tar.gz";
|
|
hash = "sha256-7BQM7dFZl5OD1g2+h6AVHCwSraeHkQlaj6hK5jW5MCY=";
|
|
};
|
|
|
|
NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isLinux [
|
|
"-lgcc_s"
|
|
];
|
|
|
|
buildInputs = [
|
|
openssl
|
|
zlib
|
|
];
|
|
|
|
prePatch = ''
|
|
sed -i -e 's/u_int32_t/uint32_t/g' -e '1i#include <stdint.h>' src/hash.c
|
|
'';
|
|
|
|
configureFlags = [
|
|
"--with-ssl=${openssl.dev}"
|
|
"--with-zlib=${zlib.dev}"
|
|
];
|
|
|
|
meta = {
|
|
description = "HTTP load tester";
|
|
homepage = "https://www.joedog.org/siege-home/";
|
|
changelog = "https://github.com/JoeDog/siege/blob/v${version}/ChangeLog";
|
|
license = lib.licenses.gpl2Plus;
|
|
maintainers = with lib.maintainers; [ raskin ];
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
}
|