about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/nix/fh/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-09-22 19:21:26 +0000
committerAlyssa Ross <hi@alyssa.is>2023-09-22 19:21:26 +0000
commitea2acbed493e218f696673a004a95829392c5e33 (patch)
treec5716552f205bbf4d4addfa4675ea5073786bd06 /nixpkgs/pkgs/tools/nix/fh/default.nix
parent06ba6c84f858b011fb1132721e5d5e28fcda4a8a (diff)
parent8aa8cd68f4745eb92f003666bfd300f3e67cd9c1 (diff)
downloadnixlib-ea2acbed493e218f696673a004a95829392c5e33.tar
nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar.gz
nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar.bz2
nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar.lz
nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar.xz
nixlib-ea2acbed493e218f696673a004a95829392c5e33.tar.zst
nixlib-ea2acbed493e218f696673a004a95829392c5e33.zip
Merge branch 'staging' of https://github.com/NixOS/nixpkgs
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";