From 48e9de7c830295a6cb3b765448995a56bda8dd40 Mon Sep 17 00:00:00 2001 From: amesgen Date: Tue, 4 Oct 2022 22:20:02 +0200 Subject: [PATCH] difftastic: adopt `finalAttrs` style --- pkgs/tools/text/difftastic/default.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pkgs/tools/text/difftastic/default.nix b/pkgs/tools/text/difftastic/default.nix index 9af09d4ada879..b16995534e647 100644 --- a/pkgs/tools/text/difftastic/default.nix +++ b/pkgs/tools/text/difftastic/default.nix @@ -3,7 +3,6 @@ , rustPlatform , fetchFromGitHub , testers -, difftastic }: let @@ -14,14 +13,14 @@ let }; in -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage (finalAttrs: { pname = "difftastic"; version = "0.46.0"; src = fetchFromGitHub { owner = "wilfred"; - repo = pname; - rev = version; + repo = "difftastic"; + rev = finalAttrs.version; sha256 = "sha256-uXSmEJUpcw/PQ5I9nR1b6N1fcOdCSCM4KF0XnGNJkME="; }; @@ -37,14 +36,14 @@ rustPlatform.buildRustPackage rec { -p1 < ${mimallocPatch} ''; - passthru.tests.version = testers.testVersion { package = difftastic; }; + passthru.tests.version = testers.testVersion { package = finalAttrs.finalPackage; }; meta = with lib; { description = "A syntax-aware diff"; homepage = "https://github.com/Wilfred/difftastic"; - changelog = "https://github.com/Wilfred/difftastic/blob/${version}/CHANGELOG.md"; + changelog = "https://github.com/Wilfred/difftastic/blob/${finalAttrs.version}/CHANGELOG.md"; license = licenses.mit; maintainers = with maintainers; [ ethancedwards8 figsoda ]; mainProgram = "difft"; }; -} +})