From 1796f99679328a353658f340b393e669f970fb26 Mon Sep 17 00:00:00 2001 From: Harinn Date: Tue, 5 May 2026 16:09:35 +0700 Subject: [PATCH] git-instafix: cleanup; use finalAttrs --- pkgs/by-name/gi/git-instafix/package.nix | 26 ++++++++---------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/pkgs/by-name/gi/git-instafix/package.nix b/pkgs/by-name/gi/git-instafix/package.nix index d3977dd29219..3df04ce4e9a3 100644 --- a/pkgs/by-name/gi/git-instafix/package.nix +++ b/pkgs/by-name/gi/git-instafix/package.nix @@ -1,48 +1,40 @@ { - git, + gitMinimal, lib, libgit2, rustPlatform, stdenv, fetchFromGitHub, }: -let - inherit (lib) - licenses - maintainers - ; - - version = "0.2.7"; -in -rustPlatform.buildRustPackage { +rustPlatform.buildRustPackage (finalAttrs: { pname = "git-instafix"; - inherit version; + version = "0.2.7"; src = fetchFromGitHub { owner = "quodlibetor"; repo = "git-instafix"; - rev = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-Uz+KQ8cQT3v97EtmbAv2II30dUrFD0hMo/GhnqcdBOs="; }; cargoHash = "sha256-B0XTk0KxA60AuaS6eO3zF/eA/cTcLwA31ipG4VjvO8Q="; buildInputs = [ libgit2 ]; - nativeCheckInputs = [ git ]; + nativeCheckInputs = [ gitMinimal ]; meta = { description = "Quickly fix up an old commit using your currently-staged changes"; mainProgram = "git-instafix"; homepage = "https://github.com/quodlibetor/git-instafix"; - license = with licenses; [ + changelog = "https://github.com/quodlibetor/git-instafix/releases/tag/v${finalAttrs.version}"; + license = with lib.licenses; [ mit asl20 ]; - maintainers = with maintainers; [ + maintainers = with lib.maintainers; [ mightyiam quodlibetor ]; - changelog = "https://github.com/quodlibetor/git-instafix/releases/tag/v${version}"; broken = stdenv.hostPlatform.isDarwin; }; -} +})