From bcf71190d6c57e95377ec09abc148f6d60d9043c Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Thu, 14 May 2026 09:03:37 -0500 Subject: [PATCH] yaziPlugins: support finalAttrs pattern --- pkgs/by-name/ya/yazi/plugins/default.nix | 36 +++++++++++++----------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/pkgs/by-name/ya/yazi/plugins/default.nix b/pkgs/by-name/ya/yazi/plugins/default.nix index 95a96de7c653..e028c313b148 100644 --- a/pkgs/by-name/ya/yazi/plugins/default.nix +++ b/pkgs/by-name/ya/yazi/plugins/default.nix @@ -8,21 +8,23 @@ let root = ./.; updateScript = ./update.py; - mkYaziPlugin = - args@{ - pname, - src, - meta ? { }, - installPhase ? null, - ... - }: - let - # Extract the plugin name from pname (removing .yazi suffix if present) - pluginName = lib.removeSuffix ".yazi" pname; - in - stdenvNoCC.mkDerivation ( - args - // { + mkYaziPlugin = lib.extendMkDerivation { + constructDrv = stdenvNoCC.mkDerivation; + + extendDrvArgs = + finalAttrs: + { + pname, + src, + meta ? { }, + installPhase ? null, + ... + }@args: + let + # Extract the plugin name from pname (removing .yazi suffix if present) + pluginName = lib.removeSuffix ".yazi" pname; + in + { installPhase = if installPhase != null then installPhase @@ -66,8 +68,8 @@ let supportedFeatures = [ "commit" ]; }; }; - } - ); + }; + }; call = name: callPackage (root + "/${name}") { inherit mkYaziPlugin; }; in