2021-10-17 09:34:42 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchCrate
|
|
|
|
, installShellFiles
|
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, Security
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "hyperfine";
|
2022-03-10 19:12:11 +00:00
|
|
|
version = "1.13.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-10-19 23:25:03 +00:00
|
|
|
src = fetchCrate {
|
|
|
|
inherit pname version;
|
2022-03-10 19:12:11 +00:00
|
|
|
sha256 = "sha256-1TWaLw1JxUE8RjPVVTldCbMSArNb+uhXM865iuJaJUo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-10 19:12:11 +00:00
|
|
|
cargoSha256 = "sha256-kzDjxWMXie6qjherzdXvHxrS4i8FAXcKiuk/+wbMkAA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-06-02 18:00:15 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2021-01-15 22:18:51 +00:00
|
|
|
buildInputs = lib.optional stdenv.isDarwin Security;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-06-02 18:00:15 +00:00
|
|
|
postInstall = ''
|
|
|
|
installManPage doc/hyperfine.1
|
|
|
|
|
|
|
|
installShellCompletion \
|
|
|
|
$releaseDir/build/hyperfine-*/out/hyperfine.{bash,fish} \
|
|
|
|
--zsh $releaseDir/build/hyperfine-*/out/_hyperfine
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Command-line benchmarking tool";
|
2021-10-17 09:34:42 +00:00
|
|
|
homepage = "https://github.com/sharkdp/hyperfine";
|
|
|
|
changelog = "https://github.com/sharkdp/hyperfine/blob/v${version}/CHANGELOG.md";
|
|
|
|
license = with licenses; [ asl20 /* or */ mit ];
|
|
|
|
maintainers = with maintainers; [ figsoda thoughtpolice ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|