diff --git a/pkgs/by-name/gi/git-statuses/package.nix b/pkgs/by-name/gi/git-statuses/package.nix index 07c0c8271411..c9b95e545902 100644 --- a/pkgs/by-name/gi/git-statuses/package.nix +++ b/pkgs/by-name/gi/git-statuses/package.nix @@ -2,39 +2,51 @@ lib, fetchFromGitHub, rustPlatform, + installShellFiles, pkg-config, openssl, + git, versionCheckHook, + stdenv, nix-update-script, }: rustPlatform.buildRustPackage (finalAttrs: { pname = "git-statuses"; - version = "0.4.0"; + version = "0.5.1"; src = fetchFromGitHub { owner = "bircni"; repo = "git-statuses"; tag = finalAttrs.version; - hash = "sha256-e4g4tiewhN5acrkGN9Y5+WO+ihogiJXmT4PlhLtyWcs="; + hash = "sha256-nuWtW1NEECBqQ5uZKRqnvbjMUeYBg04j51zrHi/SDm0="; }; - cargoHash = "sha256-IqlVwh80yTzVHWi5L+EQzt5SksK7SlBowZy46HnA+FI="; + cargoHash = "sha256-WAr5AkT4C14HupJHHZi209jtE8a9IUwOCw76cYu8Yjc="; # Needed to get openssl-sys to use pkg-config. env.OPENSSL_NO_VENDOR = 1; nativeBuildInputs = [ + installShellFiles pkg-config ]; buildInputs = [ openssl ]; nativeInstallCheckInputs = [ + git versionCheckHook ]; doInstallCheck = true; + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + installShellCompletion --cmd git-statuses \ + --bash <($out/bin/git-statuses --completions bash) \ + --fish <($out/bin/git-statuses --completions fish) \ + --zsh <($out/bin/git-statuses --completions zsh) + ''; + passthru.updateScript = nix-update-script { }; meta = {