yaziPlugins: support finalAttrs pattern

This commit is contained in:
Austin Horstman
2026-05-14 09:03:37 -05:00
parent fe057ffe8d
commit bcf71190d6
+19 -17
View File
@@ -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