2023-02-09 11:40:11 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, stdenv
|
|
|
|
, pkg-config
|
|
|
|
, openssl
|
|
|
|
, darwin
|
|
|
|
}:
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "oha";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "1.4.4";
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hatoo";
|
|
|
|
repo = pname;
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-ghzBP7Y76eUmVbKAym7bujXdwJtHxuZKBt3kcbBriY4=";
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
cargoHash = "sha256-2QY4vmLvJ+QcSAfeDPGGW/YcUWd1kKeqKbYThYf4uOA=";
|
2021-09-18 10:52:07 +00:00
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
nativeBuildInputs = lib.optionals stdenv.isLinux [
|
|
|
|
pkg-config
|
|
|
|
];
|
2021-09-18 10:52:07 +00:00
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isLinux [
|
|
|
|
openssl
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.Security
|
|
|
|
];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
# 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";
|
2022-08-12 12:06:08 +00:00
|
|
|
changelog = "https://github.com/hatoo/oha/blob/v${version}/CHANGELOG.md";
|
2021-09-18 10:52:07 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "oha";
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
|
|
|
}
|