ci/llm-agents: Propose and build version updates
Discover the upstream derivations installed by the box and home configurations. Refresh one update PR when their versions change, and run the targeted package build against its new commit. Closing the PR declines its versions until a later release, and the updater closes an open PR once master already has the latest versions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit was merged in pull request #5.
This commit is contained in:
1 parent
1119371d2e
commit
2a14417315
6 files changed
+345
-3
No files matched your search
@@ -0,0 +1,29 @@
|
||||
{ lib, inputs, nixfiles, system }:
|
||||
let
|
||||
inherit (builtins) any attrValues filter tryEval;
|
||||
inherit (lib) concatMap filterAttrs getName groupBy isDerivation;
|
||||
inherit (nixfiles.config) nixos home-manager;
|
||||
|
||||
systems = filter (box: box.system == system) (attrValues nixos.systems);
|
||||
homes = filter (home: home.system == system) (attrValues home-manager.homes);
|
||||
|
||||
installedPackages =
|
||||
concatMap
|
||||
(box:
|
||||
let cfg = box.rendered.config;
|
||||
in cfg.environment.systemPackages
|
||||
++ concatMap (home: home.home.packages) (attrValues cfg.home-manager.users))
|
||||
systems
|
||||
++ concatMap (home: home.configuration.config.home.packages) homes;
|
||||
|
||||
installedByName = groupBy getName installedPackages;
|
||||
in
|
||||
filterAttrs
|
||||
(_: package:
|
||||
# Check names before forcing output paths. Some unrelated upstream exports
|
||||
# are helpers or packages that cannot be evaluated on this platform.
|
||||
let name = tryEval (if isDerivation package then getName package else null);
|
||||
in name.success && name.value != null
|
||||
&& any (installed: installed.drvPath == package.drvPath)
|
||||
(installedByName.${name.value} or [ ]))
|
||||
(inputs.llm-agents.packages.${system} or { })
|
||||
Reference in new issue
Block a user