From 67400e37eaa8e88bb3931d8aecfbd647e17fc508 Mon Sep 17 00:00:00 2001 From: Defelo Date: Tue, 28 Oct 2025 22:51:58 +0100 Subject: [PATCH] dua: use finalAttrs pattern --- pkgs/by-name/du/dua/package.nix | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/du/dua/package.nix b/pkgs/by-name/du/dua/package.nix index 4043d4267153..f85381031b43 100644 --- a/pkgs/by-name/du/dua/package.nix +++ b/pkgs/by-name/du/dua/package.nix @@ -6,14 +6,14 @@ nix-update-script, }: -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage (finalAttrs: { pname = "dua"; version = "2.32.0"; src = fetchFromGitHub { owner = "Byron"; repo = "dua-cli"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-u8g7X/70ZsZF6vUiVnisItwSMiNXgiAdOXqGUT34EaY="; # Remove unicode file names which leads to different checksums on HFS+ # vs. other filesystems because of unicode normalisation. @@ -32,9 +32,7 @@ rustPlatform.buildRustPackage rec { "--skip=interactive::app::tests::unit::it_can_handle_ending_traversal_without_reaching_the_top" ]; - nativeInstallCheckInputs = [ - versionCheckHook - ]; + nativeInstallCheckInputs = [ versionCheckHook ]; versionCheckProgramArg = "--version"; doInstallCheck = true; @@ -43,7 +41,7 @@ rustPlatform.buildRustPackage rec { meta = { description = "Tool to conveniently learn about the disk usage of directories"; homepage = "https://github.com/Byron/dua-cli"; - changelog = "https://github.com/Byron/dua-cli/blob/v${version}/CHANGELOG.md"; + changelog = "https://github.com/Byron/dua-cli/blob/v${finalAttrs.version}/CHANGELOG.md"; license = with lib.licenses; [ mit ]; maintainers = with lib.maintainers; [ figsoda @@ -51,4 +49,4 @@ rustPlatform.buildRustPackage rec { ]; mainProgram = "dua"; }; -} +})