depot/third_party/nixpkgs/pkgs/tools/networking/oha/default.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

44 lines
1,018 B
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, stdenv
, pkg-config
, openssl
, darwin
}:
rustPlatform.buildRustPackage rec {
pname = "oha";
version = "1.4.4";
src = fetchFromGitHub {
owner = "hatoo";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-ghzBP7Y76eUmVbKAym7bujXdwJtHxuZKBt3kcbBriY4=";
};
cargoHash = "sha256-2QY4vmLvJ+QcSAfeDPGGW/YcUWd1kKeqKbYThYf4uOA=";
nativeBuildInputs = lib.optionals stdenv.isLinux [
pkg-config
];
buildInputs = lib.optionals stdenv.isLinux [
openssl
] ++ lib.optionals stdenv.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";
};
}