toplevel: support derivation-type updateScripts

This commit is contained in:
2024-10-08 14:01:37 +00:00
parent f4798e5fcf
commit 722dfce78e

View File

@@ -143,7 +143,11 @@ let
updateArgv = lib.optionals (pkg ? updateScript) (
if builtins.isList pkg.updateScript then pkg.updateScript
else if pkg.updateScript ? command then builtins.map builtins.toString pkg.updateScript.command
else []
else if (pkg.updateScript.meta or {}) ? mainProgram then
# raw derivation like `writeShellScriptBin`
[ "${lib.getExe pkg.updateScript}" ]
else
[]
);
in {
"${prefix}" = {