depot/third_party/nixpkgs/pkgs/tools/networking/oha/default.nix
Default email eaf6957cd3 Project import generated by Copybara.
GitOrigin-RevId: 4bb072f0a8b267613c127684e099a70e1f6ff106
2023-03-27 12:17:25 -07:00

43 lines
997 B
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, stdenv
, pkg-config
, openssl
, darwin
}:
rustPlatform.buildRustPackage rec {
pname = "oha";
version = "0.5.8";
src = fetchFromGitHub {
owner = "hatoo";
repo = pname;
rev = "refs/tags/v${version}";
sha256 = "sha256-BnaFpJquYr+Ap9e31juAPVCE+AcTO7r3WfL/+OSLXIg=";
};
cargoSha256 = "sha256-7IRhHLBH4bLHI6gZEaSwqMn0XP+yoSVWwc+jikZpeD0=";
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 ];
};
}