about summary refs log tree commit diff
path: root/pkgs/tools/nix
diff options
context:
space:
mode:
authorfigsoda <figsoda@pm.me>2023-09-15 10:04:00 -0400
committerfigsoda <figsoda@pm.me>2023-09-15 10:12:11 -0400
commit676f94431d82d0ccc408a4534fa6e22f03aca5ab (patch)
tree70b80a76c2cb9e027e536758299b0bb15df89f81 /pkgs/tools/nix
parent3b1f3712a415f6bf8352f3bb457973daa8bce91d (diff)
fh: 0.1.3 -> 0.1.4
Diff: https://github.com/DeterminateSystems/fh/compare/v0.1.3...v0.1.4
Diffstat (limited to 'pkgs/tools/nix')
-rw-r--r--pkgs/tools/nix/fh/default.nix15
1 files changed, 12 insertions, 3 deletions
diff --git a/pkgs/tools/nix/fh/default.nix b/pkgs/tools/nix/fh/default.nix
index e4368e58012b2..cc1cb8861294b 100644
--- a/pkgs/tools/nix/fh/default.nix
+++ b/pkgs/tools/nix/fh/default.nix
@@ -1,6 +1,7 @@
 { lib
 , rustPlatform
 , fetchFromGitHub
+, installShellFiles
 , stdenv
 , darwin
 , gcc
@@ -9,18 +10,19 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "fh";
-  version = "0.1.3";
+  version = "0.1.4";
 
   src = fetchFromGitHub {
     owner = "DeterminateSystems";
     repo = "fh";
     rev = "v${version}";
-    hash = "sha256-9dWd0syDzoyjnhVoOCazRVA4pAAXud+cxggVlxXzJFg=";
+    hash = "sha256-Fxwy+PagG9FYeURQxM0rV1Lx9T+SFt58d2HfiFD5XTc=";
   };
 
-  cargoHash = "sha256-GzS/grxiMlrpJ2OG5BSne4RmSMUXXjKiwYyW4Aj69gc=";
+  cargoHash = "sha256-WbwAW9+c9cemog5Mlb/Czc5VZwFkGLJZzSVckgomiDw=";
 
   nativeBuildInputs = [
+    installShellFiles
     rustPlatform.bindgenHook
   ];
 
@@ -33,6 +35,13 @@ rustPlatform.buildRustPackage rec {
     NIX_CFLAGS_COMPILE = "-I${lib.getDev libcxx}/include/c++/v1";
   };
 
+  postInstall = ''
+    installShellCompletion --cmd fh \
+      --bash <($out/bin/fh completion bash) \
+      --fish <($out/bin/fh completion fish) \
+      --zsh <($out/bin/fh completion zsh)
+  '';
+
   meta = with lib; {
     description = "The official FlakeHub CLI";
     homepage = "https://github.com/DeterminateSystems/fh";