Skip to content

Commit

Permalink
difftastic: adopt finalAttrs style
Browse files Browse the repository at this point in the history
  • Loading branch information
amesgen committed Apr 12, 2023
1 parent 72d0ef4 commit 48e9de7
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions pkgs/tools/text/difftastic/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
, rustPlatform
, fetchFromGitHub
, testers
, difftastic
}:

let
Expand All @@ -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=";
};

Expand All @@ -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";
};
}
})

0 comments on commit 48e9de7

Please sign in to comment.