44 lines
1 KiB
Nix
44 lines
1 KiB
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, stdenv
|
|
, pkg-config
|
|
, openssl
|
|
, darwin
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "oha";
|
|
version = "1.4.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "hatoo";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-9nyQvzxOwBFsh6TzczYZ5Tlu7LyxuFYVECBXL5IX6TY=";
|
|
};
|
|
|
|
cargoHash = "sha256-EPF/NU6qFTS4K3UWd2c2poshZkACljrxfCHyDahDWxY=";
|
|
|
|
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
|
|
openssl
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
darwin.apple_sdk.frameworks.Security
|
|
];
|
|
|
|
# tests don't work inside the sandbox
|
|
doCheck = false;
|
|
|
|
meta = with lib; {
|
|
description = "HTTP load generator inspired by rakyll/hey with tui animation";
|
|
homepage = "https://github.com/hatoo/oha";
|
|
changelog = "https://github.com/hatoo/oha/blob/v${version}/CHANGELOG.md";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ figsoda ];
|
|
mainProgram = "oha";
|
|
};
|
|
}
|