From c36ed8fed8f75e7a1b502b825dee810b7f4050d7 Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Tue, 2 Dec 2025 21:43:13 +0000 Subject: [PATCH 1/3] =?UTF-8?q?bat:=200.26.0=20=E2=86=92=200.26.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/by-name/ba/bat/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ba/bat/package.nix b/pkgs/by-name/ba/bat/package.nix index 9128100012ce..51f873ae66dd 100644 --- a/pkgs/by-name/ba/bat/package.nix +++ b/pkgs/by-name/ba/bat/package.nix @@ -11,16 +11,16 @@ rustPlatform.buildRustPackage rec { pname = "bat"; - version = "0.26.0"; + version = "0.26.1"; src = fetchFromGitHub { owner = "sharkdp"; repo = "bat"; rev = "v${version}"; - hash = "sha256-JWpdAO+OCqoWa6KVR8sxvHHy1SdR4BmRO0oU0ZAOWl0="; + hash = "sha256-IbTvFT37BFo0tKOiApDL9sT+/nMD33MO3TXuho+lF2c="; }; - cargoHash = "sha256-wb86yWWnRHs1vG8+oyhs6bUD4x7AdWvIvPPNBcLs4Hs="; + cargoHash = "sha256-WRLCs1hrwFT3tya9CzKUuh5g+6fYqKDtv3yvDx8Wws8="; nativeBuildInputs = [ pkg-config From c44aeaaaeddb7efbce8695ae47afab54188938fc Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Tue, 2 Dec 2025 21:45:00 +0000 Subject: [PATCH 2/3] bat: Use finalAttrs --- pkgs/by-name/ba/bat/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/ba/bat/package.nix b/pkgs/by-name/ba/bat/package.nix index 51f873ae66dd..fa4d14282515 100644 --- a/pkgs/by-name/ba/bat/package.nix +++ b/pkgs/by-name/ba/bat/package.nix @@ -9,14 +9,14 @@ zlib, }: -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage (finalAttrs: { pname = "bat"; version = "0.26.1"; src = fetchFromGitHub { owner = "sharkdp"; repo = "bat"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; hash = "sha256-IbTvFT37BFo0tKOiApDL9sT+/nMD33MO3TXuho+lF2c="; }; @@ -78,7 +78,7 @@ rustPlatform.buildRustPackage rec { meta = { description = "Cat(1) clone with syntax highlighting and Git integration"; homepage = "https://github.com/sharkdp/bat"; - changelog = "https://github.com/sharkdp/bat/raw/v${version}/CHANGELOG.md"; + changelog = "https://github.com/sharkdp/bat/raw/v${finalAttrs.version}/CHANGELOG.md"; license = with lib.licenses; [ asl20 # or mit @@ -91,4 +91,4 @@ rustPlatform.buildRustPackage rec { sigmasquadron ]; }; -} +}) From fad5cb39b7f6dca67abe7bd8bbb43b4538d0d25b Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Tue, 2 Dec 2025 21:46:49 +0000 Subject: [PATCH 3/3] bat: Add versionCheckHook --- pkgs/by-name/ba/bat/package.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/by-name/ba/bat/package.nix b/pkgs/by-name/ba/bat/package.nix index fa4d14282515..013e9b85b0c9 100644 --- a/pkgs/by-name/ba/bat/package.nix +++ b/pkgs/by-name/ba/bat/package.nix @@ -7,6 +7,7 @@ installShellFiles, makeWrapper, zlib, + versionCheckHook, }: rustPlatform.buildRustPackage (finalAttrs: { @@ -62,6 +63,9 @@ rustPlatform.buildRustPackage (finalAttrs: { "--skip=file_with_invalid_utf8_filename" ]; + nativeInstallCheckInputs = [ + versionCheckHook + ]; doInstallCheck = true; installCheckPhase = '' runHook preInstallCheck