2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchCrate, rustPlatform, installShellFiles
|
2018-10-02 22:41:48 +01:00
|
|
|
, Security
|
|
|
|
}:
|
2018-02-15 19:46:40 +00:00
|
|
|
|
2018-06-11 23:10:56 +01:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-06-09 10:36:12 +01:00
|
|
|
pname = "hyperfine";
|
2020-10-17 07:30:52 +01:00
|
|
|
version = "1.11.0";
|
2018-02-15 19:46:40 +00:00
|
|
|
|
2020-10-17 07:30:52 +01:00
|
|
|
src = fetchCrate {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "0dla2jzwcxkdx3n4fqkkh6wirqs2f31lvqsw2pjf1jbnnif54mzh";
|
2018-02-15 19:46:40 +00:00
|
|
|
};
|
|
|
|
|
2020-10-17 07:30:52 +01:00
|
|
|
cargoSha256 = "12qdllhydd29xh20l5gir6qpj4a1nkzp8ics344rcwj8wsj7g5zw";
|
2018-10-02 22:41:48 +01:00
|
|
|
|
2020-05-30 18:09:33 +01:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2021-01-15 09:19:50 +00:00
|
|
|
buildInputs = lib.optional stdenv.isDarwin Security;
|
2018-02-15 19:46:40 +00:00
|
|
|
|
2020-05-30 18:09:33 +01:00
|
|
|
postInstall = ''
|
|
|
|
installManPage doc/hyperfine.1
|
|
|
|
|
|
|
|
installShellCompletion \
|
|
|
|
$releaseDir/build/hyperfine-*/out/hyperfine.{bash,fish} \
|
|
|
|
--zsh $releaseDir/build/hyperfine-*/out/_hyperfine
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-02-15 19:46:40 +00:00
|
|
|
description = "Command-line benchmarking tool";
|
2019-11-30 21:12:50 +00:00
|
|
|
homepage = "https://github.com/sharkdp/hyperfine";
|
2018-02-15 19:46:40 +00:00
|
|
|
license = with licenses; [ asl20 /* or */ mit ];
|
|
|
|
maintainers = [ maintainers.thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|