From c06682b9864512af9ea9194a9738c2b04554cbb6 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Sat, 30 May 2020 19:09:33 +0200 Subject: [PATCH] hyperfine: install man and shell completion --- pkgs/tools/misc/hyperfine/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/misc/hyperfine/default.nix b/pkgs/tools/misc/hyperfine/default.nix index 5e2b654f4f98..b51ca76b12c9 100644 --- a/pkgs/tools/misc/hyperfine/default.nix +++ b/pkgs/tools/misc/hyperfine/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, rustPlatform +{ stdenv, fetchFromGitHub, rustPlatform, installShellFiles , Security }: @@ -15,8 +15,17 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "06scvp7x1yixdadarsm461hbc256spx4aqhmjjn72x7hxn22h9cg"; + nativeBuildInputs = [ installShellFiles ]; buildInputs = stdenv.lib.optional stdenv.isDarwin Security; + postInstall = '' + installManPage doc/hyperfine.1 + + installShellCompletion \ + $releaseDir/build/hyperfine-*/out/hyperfine.{bash,fish} \ + --zsh $releaseDir/build/hyperfine-*/out/_hyperfine + ''; + meta = with stdenv.lib; { description = "Command-line benchmarking tool"; homepage = "https://github.com/sharkdp/hyperfine";