at 23.11-beta 40 lines 1.1 kB view raw
1{ lib 2, rustPlatform 3, fetchFromGitHub 4, installShellFiles 5, stdenv 6, Security 7}: 8 9rustPlatform.buildRustPackage rec { 10 pname = "hyperfine"; 11 version = "1.18.0"; 12 13 src = fetchFromGitHub { 14 owner = "sharkdp"; 15 repo = "hyperfine"; 16 rev = "v${version}"; 17 hash = "sha256-9YfnCHiG9TDOsEAcrrb0GOxdq39Q+TiltWKwnr3ObAQ="; 18 }; 19 20 cargoHash = "sha256-E2y/hQNcpW6b/ZJBlsp+2RDH2OgpX4kbn36aBHA5X6U="; 21 22 nativeBuildInputs = [ installShellFiles ]; 23 buildInputs = lib.optional stdenv.isDarwin Security; 24 25 postInstall = '' 26 installManPage doc/hyperfine.1 27 28 installShellCompletion \ 29 $releaseDir/build/hyperfine-*/out/hyperfine.{bash,fish} \ 30 --zsh $releaseDir/build/hyperfine-*/out/_hyperfine 31 ''; 32 33 meta = with lib; { 34 description = "Command-line benchmarking tool"; 35 homepage = "https://github.com/sharkdp/hyperfine"; 36 changelog = "https://github.com/sharkdp/hyperfine/blob/v${version}/CHANGELOG.md"; 37 license = with licenses; [ asl20 /* or */ mit ]; 38 maintainers = with maintainers; [ figsoda thoughtpolice ]; 39 }; 40}