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