about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/nix/fh/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/nix/fh/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/nix/fh/default.nix16
1 files changed, 13 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/tools/nix/fh/default.nix b/nixpkgs/pkgs/tools/nix/fh/default.nix
index e4368e58012b..9ee82ba6aa12 100644
--- a/nixpkgs/pkgs/tools/nix/fh/default.nix
+++ b/nixpkgs/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.5";
 
   src = fetchFromGitHub {
     owner = "DeterminateSystems";
     repo = "fh";
     rev = "v${version}";
-    hash = "sha256-9dWd0syDzoyjnhVoOCazRVA4pAAXud+cxggVlxXzJFg=";
+    hash = "sha256-DWuGtjwz3cIR1IxJV8Kwm7vn2LijGGuPX8TOcwFvWXc=";
   };
 
-  cargoHash = "sha256-GzS/grxiMlrpJ2OG5BSne4RmSMUXXjKiwYyW4Aj69gc=";
+  cargoHash = "sha256-vZJRDVraDMSzBpZ8W6EENySJz44dkWdejSuvaYTFs6Q=";
 
   nativeBuildInputs = [
+    installShellFiles
     rustPlatform.bindgenHook
   ];
 
@@ -33,9 +35,17 @@ 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";
+    changelog = "https://github.com/DeterminateSystems/fh/releases/tag/${src.rev}";
     license = licenses.asl20;
     maintainers = with maintainers; [ figsoda ];
     mainProgram = "fh";