2021-10-20 22:41:28 +02:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchCrate
|
|
|
|
, installShellFiles
|
|
|
|
, stdenv
|
2018-10-02 23:41:48 +02:00
|
|
|
, Security
|
|
|
|
}:
|
2018-02-15 20:46:40 +01:00
|
|
|
|
2018-06-12 00:10:56 +02:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-06-09 11:36:12 +02:00
|
|
|
pname = "hyperfine";
|
2023-03-21 21:09:41 +01:00
|
|
|
version = "1.16.1";
|
2018-02-15 20:46:40 +01:00
|
|
|
|
2020-10-17 08:30:52 +02:00
|
|
|
src = fetchCrate {
|
|
|
|
inherit pname version;
|
2023-03-21 21:09:41 +01:00
|
|
|
sha256 = "sha256-OdOlFdhIYxBi3e94QAief0xZqVdr+wnbaPFSKJ20DNM=";
|
2018-02-15 20:46:40 +01:00
|
|
|
};
|
|
|
|
|
2023-03-21 21:09:41 +01:00
|
|
|
cargoSha256 = "sha256-RgoMq52GkRbfhsBipMKhCSu3YQoOtDB/Fdg+9OPzGtk=";
|
2018-10-02 23:41:48 +02:00
|
|
|
|
2020-05-30 19:09:33 +02:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2021-01-15 10:19:50 +01:00
|
|
|
buildInputs = lib.optional stdenv.isDarwin Security;
|
2018-02-15 20:46:40 +01: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 20:46:40 +01:00
|
|
|
description = "Command-line benchmarking tool";
|
2021-10-20 22:41:28 +02: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 ];
|
2018-02-15 20:46:40 +01:00
|
|
|
};
|
|
|
|
}
|