depot/third_party/nixpkgs/pkgs/tools/networking/oha/default.nix
Default email 60f07311b9 Project import generated by Copybara.
GitOrigin-RevId: f8e2ebd66d097614d51a56a755450d4ae1632df1
2024-02-06 17:22:34 -08:00

43 lines
993 B
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, stdenv
, pkg-config
, openssl
, darwin
}:
rustPlatform.buildRustPackage rec {
pname = "oha";
version = "1.3.0";
src = fetchFromGitHub {
owner = "hatoo";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-UZPC1Arp7/u8XafBvupAAwVu7lx5/F1Ahp944pfe2gw=";
};
cargoHash = "sha256-6uGJ6cuMXFLJ6vvUNmUwc+r/4jRHEH5jiOTNb6Fkf6Y=";
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 ];
};
}