2023-02-02 16:49:12 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, stdenv
|
|
|
|
, pkg-config
|
|
|
|
, openssl
|
|
|
|
, darwin
|
|
|
|
}:
|
2021-09-09 14:03:45 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "oha";
|
2023-06-24 14:15:28 +00:00
|
|
|
version = "0.6.0";
|
2021-09-09 14:03:45 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hatoo";
|
|
|
|
repo = pname;
|
2022-08-05 01:31:03 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-06-24 14:15:28 +00:00
|
|
|
sha256 = "sha256-IMr4CAh+XyPnv1GToZVZVpMi0eI565N6W9DivmivU70=";
|
2021-09-09 14:03:45 +00:00
|
|
|
};
|
|
|
|
|
2023-06-24 14:15:28 +00:00
|
|
|
cargoSha256 = "sha256-AXm9tNv0buR40B8cWZRaSvbYXwqalwqJZnBAwrjvBiY=";
|
2021-09-09 14:03:45 +00:00
|
|
|
|
2023-02-02 16:49:12 +00:00
|
|
|
nativeBuildInputs = lib.optionals stdenv.isLinux [
|
|
|
|
pkg-config
|
|
|
|
];
|
2021-09-09 14:03:45 +00:00
|
|
|
|
2023-02-02 16:49:12 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isLinux [
|
|
|
|
openssl
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.Security
|
|
|
|
];
|
2022-08-27 19:35:46 +00:00
|
|
|
|
2021-09-09 14:03:45 +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-05 01:31:03 +00:00
|
|
|
changelog = "https://github.com/hatoo/oha/blob/v${version}/CHANGELOG.md";
|
2021-09-09 14:03:45 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
};
|
|
|
|
}
|