about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2020-05-31 09:53:09 -0500
committerGitHub <noreply@github.com>2020-05-31 09:53:09 -0500
commit9aecb84807a6683549a15299db20253ac40681e6 (patch)
treed38508db63f1fc9332c9231b2aaf458c7e3041aa
parentba6bc5fd229ad243746d6101ad4efeb88578a105 (diff)
parentc06682b9864512af9ea9194a9738c2b04554cbb6 (diff)
downloadnixlib-9aecb84807a6683549a15299db20253ac40681e6.tar
nixlib-9aecb84807a6683549a15299db20253ac40681e6.tar.gz
nixlib-9aecb84807a6683549a15299db20253ac40681e6.tar.bz2
nixlib-9aecb84807a6683549a15299db20253ac40681e6.tar.lz
nixlib-9aecb84807a6683549a15299db20253ac40681e6.tar.xz
nixlib-9aecb84807a6683549a15299db20253ac40681e6.tar.zst
nixlib-9aecb84807a6683549a15299db20253ac40681e6.zip
Merge pull request #89225 from minijackson/hyperfine-shell-files
hyperfine: install man and shell completion
-rw-r--r--pkgs/tools/misc/hyperfine/default.nix11
1 files changed, 10 insertions, 1 deletions
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";