mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-30 20:00:10 +00:00
55 lines
1.2 KiB
Nix
55 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
nix-update-script,
|
|
versionCheckHook,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
|
pname = "hyperfine";
|
|
version = "1.20.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "sharkdp";
|
|
repo = "hyperfine";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-Ee889Fx2Mi2005SrlcKc7TwG8ZIpTqisfLebXYadvSg=";
|
|
};
|
|
|
|
cargoHash = "sha256-0e6QDVv//WQtfvrJj6jW1sEz7jFv3VC6UKLvclyytLs=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = ''
|
|
installManPage doc/hyperfine.1
|
|
|
|
installShellCompletion \
|
|
$releaseDir/build/hyperfine-*/out/hyperfine.{bash,fish} \
|
|
--zsh $releaseDir/build/hyperfine-*/out/_hyperfine
|
|
'';
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
nativeInstallCheckInputs = [
|
|
versionCheckHook
|
|
];
|
|
doInstallCheck = true;
|
|
|
|
meta = {
|
|
description = "Command-line benchmarking tool";
|
|
homepage = "https://github.com/sharkdp/hyperfine";
|
|
changelog = "https://github.com/sharkdp/hyperfine/blob/v${finalAttrs.version}/CHANGELOG.md";
|
|
license = with lib.licenses; [
|
|
asl20 # or
|
|
mit
|
|
];
|
|
maintainers = with lib.maintainers; [
|
|
mdaniels5757
|
|
thoughtpolice
|
|
];
|
|
mainProgram = "hyperfine";
|
|
};
|
|
})
|