From 16e356cb23b1f7cd0ad7e4bf5792dcfd366c1ea9 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Tue, 29 Jul 2025 12:44:52 +0200 Subject: [PATCH 1/2] git-statuses: 0.4.0 -> 0.5.1 Changelog: https://github.com/bircni/git-statuses/blob/0.5.1/CHANGELOG.md --- pkgs/by-name/gi/git-statuses/package.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/gi/git-statuses/package.nix b/pkgs/by-name/gi/git-statuses/package.nix index 07c0c8271411..36166268e368 100644 --- a/pkgs/by-name/gi/git-statuses/package.nix +++ b/pkgs/by-name/gi/git-statuses/package.nix @@ -4,22 +4,23 @@ rustPlatform, pkg-config, openssl, + git, versionCheckHook, 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; @@ -31,6 +32,7 @@ rustPlatform.buildRustPackage (finalAttrs: { openssl ]; nativeInstallCheckInputs = [ + git versionCheckHook ]; doInstallCheck = true; From 607ab00371f5617e81b0e7c6054c7c2946f28432 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Tue, 29 Jul 2025 12:57:15 +0200 Subject: [PATCH 2/2] git-statuses: install shell completion --- pkgs/by-name/gi/git-statuses/package.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/by-name/gi/git-statuses/package.nix b/pkgs/by-name/gi/git-statuses/package.nix index 36166268e368..c9b95e545902 100644 --- a/pkgs/by-name/gi/git-statuses/package.nix +++ b/pkgs/by-name/gi/git-statuses/package.nix @@ -2,10 +2,12 @@ lib, fetchFromGitHub, rustPlatform, + installShellFiles, pkg-config, openssl, git, versionCheckHook, + stdenv, nix-update-script, }: @@ -26,6 +28,7 @@ rustPlatform.buildRustPackage (finalAttrs: { env.OPENSSL_NO_VENDOR = 1; nativeBuildInputs = [ + installShellFiles pkg-config ]; buildInputs = [ @@ -37,6 +40,13 @@ rustPlatform.buildRustPackage (finalAttrs: { ]; 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 = {