depot/third_party/nixpkgs/pkgs/tools/networking/oha/default.nix
Default email b450903751 Project import generated by Copybara.
GitOrigin-RevId: 74a1793c659d09d7cf738005308b1f86c90cb59b
2022-09-09 16:08:57 +02:00

36 lines
1 KiB
Nix

{ fetchFromGitHub, lib, pkg-config, rustPlatform, stdenv, openssl, Security }:
rustPlatform.buildRustPackage rec {
pname = "oha";
version = "0.5.4";
src = fetchFromGitHub {
owner = "hatoo";
repo = pname;
rev = "refs/tags/v${version}";
sha256 = "sha256-dk9OXUt31UIZLH3E50R8iE8zJqvdT1pBu1oU25QrOro=";
};
cargoSha256 = "sha256-WlAAuFz7DZ4PhlTgEXNK9sZKkS95pCrbX2AXC3c1rh8=";
nativeBuildInputs = lib.optional stdenv.isLinux pkg-config;
buildInputs = lib.optional stdenv.isLinux openssl
++ lib.optional stdenv.isDarwin Security;
# remove cargo config so it can find the linker
postPatch = ''
rm .cargo/config.toml
'';
# 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 ];
};
}