From 80117c169987be0d1b4b80bc4bef267a8a9d326c Mon Sep 17 00:00:00 2001 From: Silvio Ankermann Date: Thu, 20 Aug 2026 13:11:53 +0200 Subject: [PATCH] yaookctl: add import checks --- pkgs/by-name/ya/yaookctl/package.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkgs/by-name/ya/yaookctl/package.nix b/pkgs/by-name/ya/yaookctl/package.nix index 239a03c6a241..a603a492553e 100644 --- a/pkgs/by-name/ya/yaookctl/package.nix +++ b/pkgs/by-name/ya/yaookctl/package.nix @@ -31,6 +31,20 @@ python3.pkgs.buildPythonApplication { typing-extensions ]; + # Try to import all submodules in order to get warned of new dependencies + checkPhase = '' + runHook preCheck + ${python3.interpreter} -c " + import pkgutil, importlib + import yaookctl + for _, name, _ in pkgutil.walk_packages(yaookctl.__path__, yaookctl.__name__ + '.'): + if name.endswith('.__main__'): + continue + importlib.import_module(name) + " + runHook postCheck + ''; + passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };