From 7c147222011f45cd19249f34fa55d620d225f9a7 Mon Sep 17 00:00:00 2001 From: figsoda Date: Thu, 9 Sep 2021 10:03:45 -0400 Subject: [PATCH] oha: init at 0.4.6 --- pkgs/tools/networking/oha/default.nix | 30 +++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/tools/networking/oha/default.nix diff --git a/pkgs/tools/networking/oha/default.nix b/pkgs/tools/networking/oha/default.nix new file mode 100644 index 000000000000..185176440c1b --- /dev/null +++ b/pkgs/tools/networking/oha/default.nix @@ -0,0 +1,30 @@ +{ fetchFromGitHub, lib, pkg-config, rustPlatform, stdenv, openssl, Security }: + +rustPlatform.buildRustPackage rec { + pname = "oha"; + version = "0.4.6"; + + src = fetchFromGitHub { + owner = "hatoo"; + repo = pname; + rev = "v${version}"; + sha256 = "0vx8ki0wi9xil2iksvxzh8mhx4c5ikkhdcnc8mcwqn14cvjkggja"; + }; + + cargoSha256 = "1nx2lvbjflsjma5q9ck6vq499hf75w91i4h8wlzr83wqk37i7rhc"; + + nativeBuildInputs = lib.optional stdenv.isLinux pkg-config; + + buildInputs = lib.optional stdenv.isLinux openssl + ++ lib.optional stdenv.isDarwin 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"; + license = licenses.mit; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 12d312b657a1..b62324b99e3e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7708,6 +7708,10 @@ with pkgs; ocserv = callPackage ../tools/networking/ocserv { }; + oha = callPackage ../tools/networking/oha { + inherit (darwin.apple_sdk.frameworks) Security; + }; + opencorsairlink = callPackage ../tools/misc/opencorsairlink { }; openfpgaloader = callPackage ../development/embedded/fpga/openfpgaloader { };